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

Building Servlet Url

Status
Not open for further replies.

moonoo

Programmer
May 17, 2000
62
US
Hi ,
I am trying to build a servlet url in a Javascript function like this.
function ExportReport()
{
// colsort is a hidden variable
var sortcol = document.forms[0].colsort.value;
document.forms[0].action = "RptEntBySalesPerson?spid=${spdata.spId}&stid=${spdata.stId}&isst=${isst}&colsort=sortcol";
document.forms[0].submit();
}

The Probem is with the &colsort=sortcol part . Its interpreting colsort as a string and not as a variable which is declared above . How can force it to intrepret as a variable.
Any Help will be appreciated.
Regards
Deb
 
try :
Code:
ment.forms[0].action = "RptEntBySalesPerson?spid=${spdata.spId}&stid=${spdata.stId}&isst=${isst}&colsort=" +sortcol;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top