File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Referencing a DIV Tag from another JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Referencing a DIV Tag from another JSP" Watch "Referencing a DIV Tag from another JSP" New topic
Author

Referencing a DIV Tag from another JSP

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1490
    
    1
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

Joined: Jan 10, 2002
Posts: 61769
    
  67



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.


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

Joined: Nov 16, 2004
Posts: 1490
    
    1
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

Joined: Jan 10, 2002
Posts: 61769
    
  67

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


Quote of the week!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

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
 
subject: Referencing a DIV Tag from another JSP