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

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -