File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Referencing a DIV Tag from another JSP

 
Steve Dyke
Ranch Hand
Posts: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • 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).

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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: 1602
1
  • 0
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Steve Dyke wrote:Not everyone knows what they are talking about do they.


Quote of the week!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic