Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2002
    Location
    Washington, DC
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP Functions - multiple parameters

    Hi, all.

    I'm trying to re-work the members-content of our website to allow visitors to see the documents we have available, but not write the link to the page unless they are logged in.

    So I'm trying to write a function that tests the condition of the 'loggedOn' variable, and if true writes a line using the URL of the file and the file name. In order to do this, I need to pass the function 2 parameters but it doesn't seem to want to do it.

    Here's what I've been working with:
    Code:
    function callBack(url, fileName)
    Response.write "<a href='" & url & "'>" & fileName & "</a>" & vbCrLf
    end function
    Then, in my page I have:
    Code:
    <%callBack("/docs/myFile.asp","My File in ASP")%>
    Any ideas as to what I'm doing wrong?

    Thanks!

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it is more a sub than a function .... there is no returned value
    but that is not the error

    sub callBack(url, fileName)
    Response.write "<a href='" & url & "'>" & fileName & "</a>" & vbCrLf
    end sub


    <%CALL callBack("/docs/myFile.asp","My File in ASP")%>

  • #3
    New Coder
    Join Date
    Sep 2002
    Location
    Washington, DC
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, Gwendaal. That fixed it.

    =^_^=


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •