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!

Passing Value of Variable - HREF

Status
Not open for further replies.

bloise

Programmer
Jun 21, 2001
67
US
I have a form with 2 tables. The first table contains the result of a query which list some data. Within this data row i have a hidden field which contains the key which makes the row uniqu. The row also contains a radio button. The button is used to select a single row. Only one row can be selected. When the user clicks the radio button. The key is stored within a hidden field in the form. This all works fine.

The second table contains a list of reports. The reports will be run based on the row selected in the first table.

What I am trying to do is pass the value of the hidden as a parameter within the ahref statement.

Thanks for all replies,
Mike




 
onClick of the href run a small script to append the URL
example
function appendURL() {
url = "somewhere.htm"
apnd = document.formname.hiddenfieldname[/i].value
url = url + "?hiddenfieldname=" + apnd
// output if form field equals 1 and name equals amount
// url outputs somewhere.htm?amount=1
window.location = url
// you can also concatinate the name of the hidden
// into the url variable if the conditions may call
// for different fields
}

hope that helps out
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
Works like a charm,
Thanks a bunch...
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top