Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 9th, 2004, 09:15 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default div is disapeared when go to other page then back

Hi All,
i am writing a jscript in asp.net page , all i have done is i make a checkbox to display or not certain <div> and i use this code,

if (chk1.checked==false)
document.getelementbyid("div1").style.display="non e";
else document.getelementbyid("div1").style.display="";



every thing works fine but when i forward to a certain page and press the back navigation button in IE i find that the div is disappeared.

any one have a Sol.
thanks

Ahmed Ali
Software Developer
__________________
Ahmed Ali
Senior Software Developer
Reply With Quote
  #2 (permalink)  
Old February 9th, 2004, 10:15 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Presumably the box is not checked when accessed via back button. Hard to tell without more info. Are you sure function is being called? What is the default state of div?

--

Joe
Reply With Quote
  #3 (permalink)  
Old February 10th, 2004, 03:16 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

by default the div is not displayed
i think there is no event happen when IE back to previous happened
and when back the checkbox is still checked but the div is hidden

Ahmed Ali
Software Developer
Reply With Quote
  #4 (permalink)  
Old February 13th, 2004, 02:51 PM
Friend of Wrox
 
Join Date: Oct 2003
Location: Cairo, , Egypt.
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

IS IT A Bug in internet explorer
i am using win2000 with service pack 4,

Any One Have seen that

any one can test that
1- drag both the div id=div1,checkbox id=chk1
2- make the difault display for the div1 to "none"
3- write this code to switch display for div1 using chk1
using onclick event:
///
function chk1_onclick() {
if (document.getElementById("chk1").checked==false){
document.getElementById("div1").style.display="non e";
}
else{
document.getElementById("div1").style.display="inl ine";
}
////

4- drag any url to the page
5- exexcute then swith the display for div1 to a state different to the default then click the url then do back !!!!!!!! you will find div1 in the state of default not the last state it was before going and back!!!!!!!!!!!!!!!!

5- any one have a solution


Ahmed Ali
Software Developer
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Content page DIV tag problem msbsam ASP.NET 2.0 Professional 0 September 19th, 2008 12:12 AM
Login page back to original page pablohoney Classic ASP Basics 1 October 3rd, 2006 07:09 PM
Graphic disapeared vnt C# 0 May 25th, 2005 07:47 PM
go back previous page hosefo81 PHP How-To 2 February 11th, 2004 01:50 PM
div is disapear when page back alyeng2000 ASP.NET 1.0 and 1.1 Basics 0 February 6th, 2004 09:05 AM



All times are GMT -4. The time now is 03:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.