Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    Code:
    <script language="JavaScript">
    
    function CalString(Day,Month,Year) {
    var names =
     .....
    .....
    Code:
    xxx= CalString("12","12","1952")

    The former code works fine in standalone. I enclosed in in function CalString(...) {
    ....
    }

    and attempted to call it from the latter code and WaLAAAAA! error.


    Error Type:
    Microsoft VBScript runtime (0x800A000D)
    Type mismatch: 'CalString'
    /CCPD.asp, line 57

    the file is declared as an outside file, but that doesn't matter, since I get the same error when I tried including the calling function in the calling page.

    Any suggestions?
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    may be an idiot answer but i don't think you need double quotes around numbers LOL
    JR

  4. #3
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    or maybe try single quotes if that doesn't work
    JR

  5. #4
    Senior Member
    Join Date
    Mar 2002
    Location
    Alabama sans the damn flag
    Posts
    263
    Member #
    38
    I tried double, single and none. Same response. In fact, I did that prior to posting.
    DerFarm
    I talk to squirrels.
    Squirrels Answer.

  6. #5
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    The problem is that you're declaring the function as a JavaScript function. If you're going to be calling it from ASP, you need to declare it as an ASP function (Server Side).

    Try doing this:
    Code:
    <%
    function CalString(Day,Month,Year) {
    var names =
     .....
    .....
    
    %>

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Or, if you want to use the script tags, you can do this:
    Code:
    <script language="JScript" runat="server">
    
    function CalString(Day,Month,Year) {
    var names =
     .....
    .....
    
    </script>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:14 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com