From: DavidC on
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;


--
David
From: DavidC on
Ignore this...spelling error.
--
David


"DavidC" wrote:

> 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;
>
>
> --
> David