This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Showing HTML from another page

 
Tarik Ansari
Ranch Hand
Posts: 50
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

I have a requirement.. I have three html pages Menu.html, Display1.html and Display2.html.

Menu.html has two links-> Display1 and Diplay2. Onclick of either Diplay1 or Disply2 link it has to open the appropriate html (Display1.html or Display2.html) within the Menu.html. (Embed another html in menu html)

Hint: Get innerhtml from external page.

Please help me.

Thanks
Tarik
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the click hander for the link, use Ajax to fetch the page to insert and stick it into the DOM.

This is a lot of rather advanced JavaScript code, and I get the impression you are not very familiar with JavaScript.

I'd recommend using a library like jQuery or Dojo to help you with the event handling, Ajax, and DOM manipulation. You'll still need to learn some JavaScript, but not as much all at once.

Also bear in the mind that the "sub-pages" should not be full HTML pages, they should be HTML fragments suitable for where you want to load them.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic