To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-12-2006, 02:26 AM   #1
kanuj
Junior Member
 
Join Date: Jan 2006
Location: New Delhi, India
Posts: 16
Javascript: Submitting form with multiple text links

I've a form with multiple radiobutton entries and at the bottom of the form are three functions that operate on the selected radiobutton field. I could use the following code I found, to work with a single "text link form submit", but what do I do for 3 different submits? Each different text link performs a different function. Do I make three different Javascript functions like this one below? Also, how do I pass the value of the field that is in the radiobutton? Each field that appears has a hidden variable that I wish to pass to each of these functions.

The JS function:

<script language="JavaScript" type="text/javascript">
<!--
function getsupport ( selectedtype )
{
document.supportform.supporttype.value = selectedtype ;
document.supportform.submit() ;
}
-->
</script>

The hidden input reqd. for text link form submission:

<input type="hidden" name="supporttype" />

The link itself:

<a href="javascript:getsupport('Paid')">Link Function</a>

Thanks.
kanuj is offline   Reply With Quote
Old 04-20-2006, 06:06 AM   #2
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,126
Use a different value for selectedtype when you call the getsupport() function in the link, and in the getsupport() function work out what to do based on the value of selectedtype.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 03:30 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.