• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DIV Tag Loading Behavior is Erratic

 
Steve Dyke
Ranch Hand
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's practically impossible to comment without understanding the DOM constructs in question.
 
Steve Dyke
Ranch Hand
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
webpage.JPG
[Thumbnail for webpage.JPG]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic