Passing String parameter into Javascript -


I am passing string parameters in javascript. But it is not being called. This is my script:

  function downloadpop (test) {warning (test); }  

I am calling javascript from my jsp page like this:

   test = "DSfsdsfd"; & Gt%; & Lt; A href = "javascript: downloadpop (& lt;% = test%>)" & gt; & Lt; / A & gt;  

How can I solve it?

I think you are missing quotation around your string:

  & lt;% string tests = "DSfsdsfd"; & Gt%; & Lt; A href = "javascript: downloadpop ('<% = test%>')" & gt; & Lt; / A & gt;  

Comments

Popular posts from this blog

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -