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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending A Value to the Querystring

Status
Not open for further replies.

MayoorPatel

Programmer
Apr 10, 2006
35
GB
Hi there I would like to append a value to the submit action, depending on which DIV tab is clicked. Here are the DIV tabs

Code:
<tr class="tab">
						    <td id="cardActivitySchemeTab" class="selectedTab" onclick="moveTabSectorSkillsReports(this.id, 'cardActivityScheme');">Card Activity by Scheme</td>
						    <td id="allNewCardsTab" class="tab" onclick="moveTabSectorSkillsReports(this.id, 'allNewCards');">All New Cards</td>													
						    <td id="cardsIssuedTab" class="tab" onclick="moveTabSectorSkillsReports(this.id, 'cardsIssued');">Cards Issued</td>													
						    <td id="verifierActivityTab" class="tab" onclick="moveTabSectorSkillsReports(this.id, 'verifierActivity');">Verifier Activity</td>													
						    <td id="verifierActivityDetailedTab" class="tab" onclick="moveTabSectorSkillsReports(this.id, 'verifierActivityDetailed');">Verifier Activity Detailed</td>													
						    <td class="tableContinuance" style="width:40px;">&nbsp;</td>					
						</tr>

and here is the submit action

Code:
<form method="post" action="sectorskillsreports.asp">

Any ideas HOW I append the querystring....?
 
First off, just for ease, give your form an ID.

Code:
<form [!]id="thisForm"[/!] method="post" action="sectorskillsreports.asp">

Next, whenever a div tab is clicked, in your function

moveTabSectorSkillsReports put the following where it applies (I don't know exactly where, cause I don't see that function, but use the parameters from the function to assign the correct query string):

Code:
document.getElementById("thisForm").action += "?queryStringVariable=value";

Where queryStringVariable and value is the specific things you want to add to your query string.






[monkey][snake] <.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top