Hi experts,

I am trying to use ajax in my webpage.

I got the values from the database and displayed as links as below.

param1
param2
param3

I used the following code to call a javascript function func() with dynamic parameter param in jsp.


out.println("<a href='#' onclick='javascript:func('"+ param +"')'>"+ param +"</a>

where param is the dynamic variable that recieved from database.

My problem is If i click the link above mentioned, the javascript function didn't called.

I want to know What is the problem clearly??

Thanks in advance,

yuvi

check the java console at browser..

then find out the error...

post the console error if u can't fix it....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.