Page Display

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!!
 
O

Otis Mukinfus

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!!
This appears to be an ASP.NET question. Have you tried the ASP.NET news groups?

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 

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

Top