Jump to content

unique variables being passed via a static name


gerkintrigg

Recommended Posts

I want to define multiple variables under the same name like this:

<span id="1" onclick="javascript: MyAjaxRequest(\'ajax\',\'../hello.php?state='state1');">'.$word.'</span>
<span id="2" onclick="javascript: MyAjaxRequest(\'ajax\',\'../hello.php?state='state2');">'.$word.'</span>

 

but currently it seems that the variable "state" can only be defined once.

 

Any suggestions?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.