• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DIV Tag Loading Behavior is Erratic

 
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's practically impossible to comment without understanding the DOM constructs in question.
 
Steve Dyke
Ranch Hand
Posts: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2206
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic