calling functions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • niv

    calling functions

    how do i call a vbscript function (which is between <%%>)
    from a vbscript script function (which is between script
    tags-<script language="vbscr ipt"></script>, and how do the
    argument are reffered/transfered?
    the code goes like this:
    <%function LegalCatNum(num )
    if....then
    LegalCatNum=tru e
    else
    LegalCatNum=fal se
    end if
    end function %>
    <script language="vbscr ipt">
    function XY
    if LeaglCatNum(arg ) then <--this line is the problem
    else ....
    end if
    end function
    </script>

    thanks a lot in advance
    niv
  • Ken Schaefer

    #2
    Re: calling functions

    You can't do that per se.

    <% ' This code is run on the server %>

    <script language="vbscr ipt">
    ' This code is run on the client
    </script>

    You can't call server-side code from a client-side function, because by the
    time the page has been delivered to the client, the server has forgotten all
    about the page.

    Cheers
    Ken


    "niv" <aviniva1@012.n et.il> wrote in message
    news:1e7001c33e cc$b3044d80$a60 1280a@phx.gbl.. .
    : how do i call a vbscript function (which is between <%%>)
    : from a vbscript script function (which is between script
    : tags-<script language="vbscr ipt"></script>, and how do the
    : argument are reffered/transfered?
    : the code goes like this:
    : <%function LegalCatNum(num )
    : if....then
    : LegalCatNum=tru e
    : else
    : LegalCatNum=fal se
    : end if
    : end function %>
    : <script language="vbscr ipt">
    : function XY
    : if LeaglCatNum(arg ) then <--this line is the problem
    : else ....
    : end if
    : end function
    : </script>
    :
    : thanks a lot in advance
    : niv


    Comment

    Working...