Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

radio buttons and form submissions

Status
Not open for further replies.

Phred

Programmer
Apr 6, 1999
20
0
0
US
i'm in dire striaghts...<br>
i'm trying to design a survey that will automatically send results to a predetermined email address (mine).<br>
the questions i have are:<br>
(1)how can i assign a value to radio buttons which can be totalled upon submission? (like, making a row of buttons, of which you may choose only 1, and that determines the point value for that row?)<br>
(2)how can i send this totalled point value to a specific email address, while at the same time, creating a popup window displaying the point total?<br>
sorry if this isn't descriptive enough, but i'm really desparate. any questions, please email me! <br>
thanks!!!<br>

 
(1) This is an HTML problem (I'd RTFM you but I'm not that mean). You would need to create the radio button with &lt;input type=&quot;radio&quot; value=&quot;x&quot;&gt; where x would be the value for that button in that form (you would need to create different forms for different rows of buttons). So if you wanted a row of four buttons of which you wanted only one selected and each having its own value, it would have its own form. To create four columns of such buttons, then you would need to create a seperate forms to do this. You may see that this is a fairly inefficient way of doing things. Some have utilized JavaScript to create checkboxes that act in a similar manner, but they don't require their own form for each instance. I don't know how to do this off hand since I've yet to have need of such a tool.<br>
(2)If you want it so that different values to send to your e-mail with different subject headers, then use an array. I don't have a whole lot of time on my hands so I will give you the code for something similar that I did (it was for random links).<br>
<br>
// All code is mine unless otherwise specified (although I won't actually enforce, it is under the GNU Public License, sort of, in so being that I don't mind you using code from this site for on your site). You can find the GNU Public License at <A HREF=" TARGET="_new"> This does NOT, however, give you the right to PLAGIARIZE MY CONTENT AND IDEAS! (Sorry if it seems like I'm really paranoid, I'm not, really...and don't even think of trying to find me...)<br>
<br>
links = new Array(window.status = &quot;Sorry, not this time&quot;, &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> &quot;<A HREF=" TARGET="_new"> HREF=" TARGET="_new"><br>
function random() {<br>
var a = Math.random();<br>
var b = links.length*a;<br>
var c = Math.round(b);<br>
linkit(c);<br>
}<br>
<br>
function linkit(i) {<br>
window.location.href=links<i>;<br>
}<br>
<br>
I will RTFM you a little. Check out this site: <A HREF=" TARGET="_new">You can find out a heck of a lot of info. <p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href= by Linux</a><br>Learn Linux and Leave out the Windows :)
 
Phred-<br>
If you still need any help; please feel free to e-mail me with some more specifics & we'll see if we can't adapt a custome JavaScriptlet to your precise needs :) (Then I'll post the script in here {modified to protect any secure data} so everyone else can have it as a reference if they so desire :) <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= shared.freeservers.com/searchmaster.html>SearchMaster Interface...11-in-1</a><br>Wanting to learn Assembler; please e-mail me any tutorials or links for it that are useful to you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top