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!

Form Submit buttons

Status
Not open for further replies.

Nis81

Technical User
Dec 11, 2006
14
0
0
GB

Hi,

Just a quick question:
I am using javascript to submit form results to my email address. The form uses a submit button with the OnClick function. Problem is the button displays the name "Submit Query" in a browser, not simply "Submit" as in dreamweaver. Hope that makes sense.

Can any one help?


This is the script i used:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--

function get_radio_value()
{
for (var i=0; i < document.subscribeform.option.length; i++)
{
if (document.subscribeform.option.checked)
{
var rad_val = document.orderform.option.value;
}

//-->
</SCRIPT>

And this is the form:
<form action="mailto:xxxxx@.com?subject=subscription" method=POST name=Subscribeform class="style17" form>
<input type="radio" name="option" value="subscribe"checked>
<span class="style1">Subscribe</span>
<input type="radio" name="option" value="unsubscribe">
<span class="style1">Unsubscribe</span><br>
<input type="text" name="email" value="enter your email..." size="26" onFocus="this.value='';return false;">
<br>
<input type="text" name= name value="enter your name..." size "26" onfocus="this value='';return false;">
<br>
<input type="SUBMIT" onClick="get_radio_value()">
</form>

Thanks,
 
>Problem is the button displays the name "Submit Query" in a browser, not simply "Submit"
><input type="SUBMIT" onClick="get_radio_value()">
That display is controlled by the value. If none assign, the default assignment "Submit Query".
[tt]<input type="SUBMIT" value=[blue]"Submit"[/blue] onClick="get_radio_value()">[/tt]

>Just a quick question:
Quick means slow. Proof-read your script! And the free-flow style of quotes around attributes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top