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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.