Passing variables from server side script to clien

Results 1 to 2 of 2

Thread: Passing variables from server side script to clien

  1. #1
    Chad Tanner Guest

    Default Passing variables from server side script to clien

    In my server side scripting I made a variable MyString = Blah, Blah, Blah. <BR><BR>If I take this variable and put it into the HTML like this:<BR>&#060;Script langauge = vbscript&#062;<BR>data = &#060;%= MyString %&#062;<BR>&#060;/Script&#062;<BR>Should this work?<BR>To see if it works, I am trying to get the variable that is passed to show up in a message box when a button is pushed.<BR>Does all this client side scripting go inside the header tags?<BR>Any suggestions? Thanks

  2. #2
    Join Date
    Dec 1969
    Posts
    17

    Default RE: Passing variables from server side script to c

    &#060;Script langauge = vbscript&#062;<BR>data = &#060;%= MyString %&#062;<BR>&#060;/Script&#062;<BR>if this is the way u coded in ur asp page then u don&#039t need the delimiters for the mystring variable because its already inside the scripting tags.<BR>alternatively u can include the code b/w scripting delimiters.<BR>&#060;%<BR> mystring = "blah blah"<BR> data = mystring <BR>%&#062; <BR>u can call a vbscript function in the OnClick event of the button.<BR>&#060;script language="vbscript"&#062;<BR> Function Display(data)<BR> Response.Write("Data is " & data) &#039display the contents of mystring <BR> End Function<BR>&#060;/script&#062;<BR><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
  •