Jump to content

Passing dynamically created javascript variables to PHP in Firefox


thecommonthread

Recommended Posts

So I have a script that dynamically edits the innerHTML of a span.

 

<span id="reg_opt_hid_field"><input name="reg_opt_details" id="reg_opt_details" type="hidden" value="" /></span>
<span id="reg_price_hid_field"><input name="reg_price" id="reg_price" type="hidden" value="" />

 

Basically, if you choose certain radio button(s) in my form, it will create a hidden form value that stores the price of a service based upon the option(s) you choose.

 

So this passes the variable fine in Internet Explorer (I tested in v.8), but for some reason Firefix will not pass this variable over.  What the heck is the deal???

 

Any help would be greatly appreciated.

The page is located at http://www.akapa.org/events/conf_reg.php.

 

As you can see, the javascript should be creating a hidden input tag in the form (using post method) that displays the "total" registration cost:

 

document.getElementById('reg_price_hid_field').innerHTML='<input name="reg_price" id="reg_price" type="hidden" value="'+total+'" />';

 

This method works in Internet Explorer 8, but I noticed in Firefox that it didn't carry the post variable over.

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.