M
Mr. Bean
In brief am using javascript to enable show/hide layers in an ASP web
appplication.
but its not working.
I made a small web application, which is a web form that has many input
fields. There are many fields that rely on the value of the previous
entries.
The application worked fine, but i tried to register a javascript
function to hide the parts of the page that fillled, but after the page
reloads the fields only disappear for a second.
//stage 1
has 2 input fields and one btn
//stage 2 relies on the previous input
has 2 fields and a button
I need to have all the fields on one page. The javascript fucntion am
using is:
<SCRIPT language="javascript">
function DoToggle(s) {
var theStage = s;
//alert(s);//String(<% = Application["stage"] %>);
var stages = new Array(5);
stages[0]= "stage1";
stages[1]= "stage2";
stages[2]= "stage3";
stages[3]= "stage4";
stages[4]= "stage5";
for ( ii=0; ii < 5; ii++ ) {
p = stages[ii];
if (theStage == p) {
document.getElementById(p).className='csShow';}
else {
document.getElementById(p).className='csHide';}
}
}
</SCRIPT>
/////////////////////////////////////
when the function is called it hides the other layers but then the
layers reappear again...
Help!!
appplication.
but its not working.
I made a small web application, which is a web form that has many input
fields. There are many fields that rely on the value of the previous
entries.
The application worked fine, but i tried to register a javascript
function to hide the parts of the page that fillled, but after the page
reloads the fields only disappear for a second.
//stage 1
has 2 input fields and one btn
//stage 2 relies on the previous input
has 2 fields and a button
I need to have all the fields on one page. The javascript fucntion am
using is:
<SCRIPT language="javascript">
function DoToggle(s) {
var theStage = s;
//alert(s);//String(<% = Application["stage"] %>);
var stages = new Array(5);
stages[0]= "stage1";
stages[1]= "stage2";
stages[2]= "stage3";
stages[3]= "stage4";
stages[4]= "stage5";
for ( ii=0; ii < 5; ii++ ) {
p = stages[ii];
if (theStage == p) {
document.getElementById(p).className='csShow';}
else {
document.getElementById(p).className='csHide';}
}
}
</SCRIPT>
/////////////////////////////////////
when the function is called it hides the other layers but then the
layers reappear again...
Help!!