• 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

Referencing a DIV Tag from another JSP

 
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 am trying to load a DIV tag on my parent page from an embeded JSP located on the same page but in a different DIV two levels down(DIV in a JSP that is in a DIV.

I have tried this but it loads the servlet reponse to the entire parent page(replaces every thing).

 
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


What's up with the call to document.getElementById? Completely unnecessary! jQuery selectors do it all.

Remember, that whether the source is a JSP or an included JSP, is completely moot. It's all just one big HTML file by the time it gets tot he browser.

Once you fix the code, post back with any continued problems.
 
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:

Once you fix the code, post back with any continued problems.



I went back and took out the document.get... and made it like I had it before which didn't work then and sure enough it didn't work this time.

But since you said that was what was correct I looked a little closer and found out that wasn't the problem.

I was firing two loads in one function. The first set a session variable the the second one needed to read. Both fire athe same time the second one doesn't pick up the change. Put call back on first to fire second and it is fixed.

By the way I got my syntax for the load from an example on the net. Not everyone knows what they are talking about do they.

Thanks again I'd buy you a Dr. Pepper if you were close.
 
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

Steve Dyke wrote:Not everyone knows what they are talking about do they.



Quote of the week!
 
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

Steve Dyke wrote:Thanks again I'd buy you a Dr. Pepper if you were close.


Though if it's not too pushy, I'd probably request a fresh lemonade!
 
reply
    Bookmark Topic Watch Topic
  • New Topic