Converting to string

Results 1 to 2 of 2

Thread: Converting to string

  1. #1
    Dilip Guest

    Default Converting to string

    Hi,<BR><BR>In the server side script I&#039m assigning value to variable cityname by using following syntax. <BR><BR>cityname = Request.Form("Name")<BR><BR>where Name is hidden control.<BR><BR>In the client side javascript function I&#039m assigning value of cityname to varibale defined in function as follows :<BR>&#060;script language="javascript"&#062;<BR> function process(pageNumber){<BR> var buffer1<BR> buffer1 = &#060;%=cityname%&#062;<BR> }<BR>&#060;/script&#062;<BR><BR>If the value of the hidden control is "Atlanta" then in the javascript function <BR>buffer1 = Atlanta<BR><BR>gives compilation error Undefined : Atlanta<BR><BR>How to convert it to string before assigning it to buffer1 ?<BR><BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Converting to string

    Try this<BR><BR>buffer1 = "&#060;%=cityname%&#062;"

Posting Permissions

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