js string in aspx page

D

DavidC

I have a javascript function in my aspx page that is grabbing values in ddl
and textboxes. I am forming a string to call the report server page via url
and having problems. I suspect it has to do with string conversion of values
pulled from the page, but I cannot figure out why as it works in other areas
of the page. The commented out section does work when hard coded. Below is
the snippet of js that I am having trouble with. Can someone point out the
problem? I tried it both with and without the .toString() function. Thanks.

var varQuarter = new String();
varQuarter =
document.getElementById('ctl00_ContentMain_ddlQtr').value;
varQuarter.toString(1);
var varYear = new String();
varYear =
document.getElementById('ctl00_ContentMain_txtYear1').value;
varYear.toString(4);
rpturl += varPageName + '&Quarter=' + varQuarter +
'&Year=' + varYear + '&Branch=' + varBranch.toString(2);
//rpturl += varPageName + '&Quarter=2&Year=2010' +
'&Branch=' + varBranch;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top