File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Can we access document object model of a parent JSP, from a child JSP ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Can we access document object model of a parent JSP, from a child JSP ?" Watch "Can we access document object model of a parent JSP, from a child JSP ?" New topic
Author

Can we access document object model of a parent JSP, from a child JSP ?

Tagore Noo
Greenhorn

Joined: Nov 29, 2011
Posts: 4
Hello everyone. I have a question regarding the dom. It will be great if someone provides some help.

I have a jsp (Page 1) included in another jsp (Page 2) .

Can we access Page 2's DOM from Page 1's javascript? Like an alert box from page 1 if we click on page 2's body..

Appreciate any help..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

JSP knows nothing of the DOM -- that's an HTML concept. So if both JSPs end up creating a single HTML page, then there's only one DOM.

It has nothing whatsoever to do with JSP (or whatever) that created the HTML page on the server to be sent to the browser. Only the HTML send to the browser matters.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we access document object model of a parent JSP, from a child JSP ?
 
Similar Threads
Manipulating HTML dom from a custom JSF component???
Newbie Question: XML on Java
Problem with the Scriptless JSps Page 378 question (Code Magents) from the Head First book 1st edt
How to substitue a DOM L2 method for getElementsByTagNameNS
Hidden fields in Javascript