473,395 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1141
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: laura | last post by:
I'm doing a page which gathers some text in the form of a text box in a <form>. This text is saved to a text file, notices.txt and I want to be able to display the saved text on the page, as soon...
7
by: Sens Fan Happy In OH | last post by:
I'm having majour issues with FrontPage 2K and a webpage that I am having to create from scratch based on someone else's prior work. I hope someone can look at the source code for the page in...
7
by: Brian Paul | last post by:
When a user clicks on a linkbutton on a page, i would like to render a printer-friendly version of the asp.net page and download it as an html attachment to the browser. The code below works great,...
0
by: Niks | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
3
by: Arun K | last post by:
Hi, I am creating a simple .aspx page to add some fields with validation. I have used different .NET validations like REquiredFieldValidator, RegularExpressionValidator and showed the summary...
0
by: bindslind | last post by:
The script does most of what it's supposed to do, but I have what seems to be a simple problem that I can't figure out. When the page intitially loads the first page does not display images. The same...
1
by: Benny Ng | last post by:
Dear All, Now I met one problem in the development of my one application. I have one ASP.NET page. It's for disply the information of customer. But now I have one new requirement. It's to...
2
by: erag | last post by:
Hi im newbie to java, and i want to set the language change according to main page..how to create it? here is my coding: main page: import org.eclipse.swt.SWT; import...
2
by: stevemtno | last post by:
I've got a problem with a web page I'm working on. I have 4 modules - one of them has 2 tabs, two of them have 4 tabs. When the user clicks on the tabs, the content below them changes. However, when...
7
by: imtmub | last post by:
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted. Check this page for reference....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.