aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes DIV Tag Loading Behavior is Erratic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "DIV Tag Loading Behavior is Erratic" Watch "DIV Tag Loading Behavior is Erratic" New topic
Author

DIV Tag Loading Behavior is Erratic

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
I don't know if I can explain this where it is understandable or not but here gos.

I am using DIV tags and jQuery.load on my web pages. The erratic behavior is this:

On a page link I display a DIV tag(1) by loading it with a servlet request. That DIV displays with all of its content defined in the page called. In its content there may be another link that loads and displays another DIV tag(2). DIV tag(2) displays okay but when I close it(move it out of the viewable screen and set its display to none) some of the content of DIV tag(1) gets moved to the bottom of the parent HTML page.

Thanks for your help.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You never like posting code do you? What browser?

Have you inspected the mark up before and after and figure out why?

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Eric Pascarello wrote:You never like posting code do you? What browser?

Have you inspected the mark up before and after and figure out why?

Eric


I don't mind posting code it's just somtimes I don't really know what to post and I am afraid of making my mess more confussing.

I am using IE7. It is hard to see the mark up using DIV tags and external JS. The only HTML I see is at the index page level. Do you have any suggestions on how I can view the source at any level?

While waiting on a response to this post I did discover that if I place jQuery.empty() on the second DIV tag(2) close function, not just move it and set display to none, the DIV tag(1) stays in tack.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do you not have IE8 installed?

IE8 can run as IE7 and you get all of the great debugging features of IE8. Web Developer Toolbar also lets you see the mark-up.

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Eric Pascarello wrote:Do you not have IE8 installed?

IE8 can run as IE7 and you get all of the great debugging features of IE8. Web Developer Toolbar also lets you see the mark-up.

Eric


I will run windows update and get the IE upgraded.

You did not comment on the jQuery.empty() solution.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

It's practically impossible to comment without understanding the DOM constructs in question.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Bear Bibeault wrote:It's practically impossible to comment without understanding the DOM constructs in question.


This is my top level jsp. The two divs involved are genericListDisplay and causeofrejectionDisplay.

My problem: When I close the second popup the second cell of the first row of the first div moves to bottom of main display(index page).



Here is the js that loads the causeofrejectionDisplay div:



Here is the page that loads:



Here is the code that loads the genericListDisplay:



Here is the page that loads:

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Well I found out that removing the FORM tags from second popup(which served no purpose) solved my problem.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Yeah, it's always a good idea to remove superfluous code and/or markup. You never know what's going to trip on it!
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1391
Bear Bibeault wrote:Yeah, it's always a good idea to remove superfluous code and/or markup. You never know what's going to trip on it!


My problem is back and I need some more help. I have upgraded IE to version 8 and used it to look at the HTML but don't see anything obvious.

I have included a screen shot of what is happening. Look at the content of upper left text area then look at lower left corner. This happens after I click on link of upper left popup to open a second popup, and then close second popup.


[Thumbnail for webpage.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DIV Tag Loading Behavior is Erratic
 
Similar Threads
JavaScript: "Wait while loading" message
Facing problem when I am mixing struts and AJAX
JQuery replace div
Web Application DIV Tag Usage
html & CSS & JSP