Using Javascript in ASP

Results 1 to 3 of 3

Thread: Using Javascript in ASP

  1. #1
    Behag Guest

    Default Using Javascript in ASP

    I want to call a javascript function in my asp.<BR>The function contain server-side scripting.<BR><BR>For example,<BR><BR>function abc()<BR>{<BR> &#060;%Request.querystring("Status")%&#062;<BR>}<B R><BR>&#060;table&#062;<BR>&#060;td width=10% "text-align=left"&#062;&#060;INPUT TYPE="button" NAME="submit" VALUE=" Browse" onClick="abc();"&#062;&#060;/td&#062;&#060;/tr&#062;<BR>&#060;td width=50%&#062;&nbsp&#060;/td&#062;<BR>&#060;/table&#062;<BR><BR>Is this the correct way of doing it ?<BR>Any help is appreciated.<BR><BR>Thanks.<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    915

    Default RE: Using Javascript in ASP

    The way I have done this in the past is to create a hidden form field on the page and populate it with request.querystring("Status"). Then from within the javascript function, you can use document.FormName.FormField.Value to evaluate the field.<BR><BR>Hope this helps.<BR><BR>Jerry

  3. #3
    behag Guest

    Default RE: Using Javascript in ASP

    Thanks for the input<BR>But my problem seems to be like this..<BR>Iam not able to use server scripting inside the function<BR>like <BR>function abc()<BR>{<BR>&#060;%Response.write "open"<BR> set object<BR>%&#062;<BR>}<BR>When i call this function ,it doesnt recognise the script at all<BR><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
  •