Forum Moderators: open
Currently I am doing the following...which works... but doesn't send variable data:
<a href='/mylink' onClick="new generate_mask(['val1'], ['resultdiv']); return false;">
generate_mask is my Ajax defined function in my script.
Any idea how I can set val1 to a value?
I know how to do so if I'm using <form - but I am using just links (project requirment...)
Uh... that's kind of a dumb project requirement. You can't even use hidden form fields? Also, it sounds like your application will not function at all if JavaScript is disabled... probably not a very good project design. You might want to start be re-evaluating the project requirements.
Is there any reason that you need to call generate_mask directly from the link? Could your link's onclick handler call some other JavaScript function which then calls generate_mask with the desired variables?