close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Onclick / Onsubmit Radio Buttons

Thread began 6/20/2011 4:15 pm by ryndog427452 | Last modified 7/12/2011 10:04 am by ryndog427452 | 14690 views | 11 replies

ryndog427452

Re-Opened: Onclick / Onsubmit Radio Buttons | Disable Submit Button On Click

Hey there,
I am new here to this community. I am hoping I am in the right section for posting this question, if I am not I apologize in advance. I recently took over a project and have a question/issue with a form. I have posted on another website (showthread.php?p=1103551#post1103551), but I thought maybe it could be answered here too as if my understanding is correct alot of this coding was made with WebAssist.

Acheivment: When a user clicks on a radio button on our confirm.php page, the form will automaticaly submit and refresh itself without the user have to actually press 'submit' button (which I will hide later). The reason for this is because users are making a radio selection but NOT pressing 'submit' and we are receiving the default or previous selection.

What I have tried: I have tried these coding options, all with the same result. The result is that the page DOES refresh, but the information DOES NOT change or save. The form isn't acutally submitting?

<input  <?php if (!(strcmp($_SESSION['shippingmethod'],"1"))) {echo "checked=\"checked\"";} ?> name="grpshipping" type="radio" id="grpshipping_0" value="1" checked="checked" onclick="document.getElementById('Update_shipping').submit()" />



<input  <?php if (!(strcmp($_SESSION['shippingmethod'],"2"))) {echo "checked=\"checked\"";} ?> type="radio" name="grpshipping" value="2" id="grpshipping_1" on onChange="this.form.submit();" />



<input  <?php if (!(strcmp($_SESSION['shippingmethod'],"3"))) {echo "checked=\"checked\"";} ?> type="radio" name="grpshipping" value="3" id="grpshipping_2" onClick="this.form.action='confirm.php';this.form.submit()" />



Form header:

<form action="" method="post" name="Update_shipping" id="Update_shipping">



Form footer:

<input type="image" name="Update_shipping" id="Update_shipping" value="Update_shipping" alt="Update_shipping" src="WA_eCart/Images/Nautica/Btn4_EN_update.gif" class="eC_ImageButton"  />



I think I am on the right track, but I am thinking that something with WebAssist may not prevent things to happen correctly. Maybe not. I have attached the entire php file just in case there is something else incorrect. You can also try the form live by clicking on the link in the begining of the post. There are instructions and information on getting to the live test site and see how its acting.

I appreciate your help, and if can provide anymore information please let me know.

Attached Files
confirm.php.zip

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...