471,321 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,321 software developers and data experts.

Page Display

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

Feb 20 '06 #1
1 1080
On 19 Feb 2006 23:22:14 -0800, "Mr. Bean" <mk*****@gmail.com> wrote:
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
Feb 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by laura | last post: by
7 posts views Thread by Sens Fan Happy In OH | last post: by
7 posts views Thread by Brian Paul | last post: by
reply views Thread by Niks | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.