Problem with forms and JScript

Results 1 to 3 of 3

Thread: Problem with forms and JScript

  1. #1
    Nils Kaiser Guest

    Default Problem with forms and JScript

    I want to know if a script is called directly or by a form.<BR>I used the following that works fine on vbscript(test is a text box in my form):<BR><BR>if (Request("Text")=="")<BR> //direct call - some code here<BR>else<BR> //indirect code<BR><BR>but Request("Text") returns "undefined" so i changed my code to if (Request("Text")=="undefined") but it doesn&#039t work...<BR><BR>Where is the error???<BR><BR><BR><BR><BR>

  2. #2
    Joe Mac Guest

    Default RE: Problem with forms and JScript

    Try this....<BR><BR><BR>var xyz = new String(Request("Text"));<BR>if (xyz=="undefined")<BR>//direct call - some code here<BR>else<BR>//indirect code<BR>Please let me know if this helps.<BR>Joe<BR> <BR> <BR><BR>

  3. #3
    Nils Kaiser Guest

    Default Thanks

    Ok its working now. Thank you very much!<BR>

Posting Permissions

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