simple question

Results 1 to 6 of 6

Thread: simple question

  1. #1
    Join Date
    Dec 1969

    Default simple question

    can you call a javascript function from asp code. i understand how the code runs as far as when and how and all that, so it seems logical. but is it possible? <BR><BR>also, if it is possible, can you also pass a value to that function

  2. #2
    Kasper Guest

    Default RE: simple answer

    No, seeing as javascript is executed clienside, after the servside asp is executed.

  3. #3
    J. Paul Schmidt Guest

    Default Alert Box works sometimes

    The following JavaScript alert() often works written from VBScript:<BR><BR>Response.Write "&#060;script language=&#039JavaScript&#039&#062;alert(&#039Blah , blah, blah.&#039);&#060;/script&#062;"<BR><BR>Best regards,<BR>-Paul<BR><BR>J. Paul Schmidt, MBA<BR>Databases on the Web<BR><BR>

  4. #4
    Join Date
    Dec 1969

    Default sometimes meaning????

    does it have to be a perfect scenerio for this and this to happen for it to work. I tried it and it works, but when you say sometimes, do you know of something that would cause it to not work?

  5. #5
    Jef Guest

    Default RE: simple question

    Sometimes you can (depending on what you&#039re doing).<BR><BR>for example:<BR>Response.write "&#060;BODY onload=&#039f_function(as_value)&#039&#062;"<BR><B R>f_function is your client-side function

  6. #6
    J. Paul Schmidt Guest

    Default RE: sometimes meaning????

    Either it works or it doesn&#039t - it&#039s not a browser issue.<BR><BR>But if the code listed above is placed in a VBScript function, sometimes you get a "JavaScript can&#039t be in VBScript function" or some similar error message.

Posting Permissions

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