This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have 3 pages welcome.jsp, creator.jsp and admin.jsp
When a button labelled "create" is clicked in admin.jsp, i should load the creator.jsp into the <div id="holder"> of welcome.jsp How should i do this?
If the div tag is in the same page i know that i could use like
But since the div is in a different page, how should i do this?
welcome.jsp is my home page which has an accordian menu for creator.jsp and admin.jsp. When a menu item is clicked, the corresponding page loads on the div element of welcome.jsp(according to my page design, the div element is on the right part of the page). in the admin.jsp(loaded on the div) has a button which should invoke creator.jsp on the div element.
And script like
I want this function to load creator.jsp into the div tag of welcome.jsp
The id "#holder" is in the welcome page... so my jQuery code would not work.. so how should i proceed?
You need to clarify what you mean by "page"? Are you taking about the HTML page that ends up at the browser, or multiple JSP "pages" (which aren't really "pages at all) which end up creating the single HTML page?
When it comes to jQuery (and anything else on the client), what happens at the JSP layer is completely moot. All that matters is the HTML that is delivered to the browser.
Joined: Sep 15, 2011
I mean the jsp... i want to load creator.jsp into the div element of welcome.jsp upon clicking a button in admin.jsp.
PS: Above load() of the jQuery is written inside admin.jsp.