This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Including html page to specific div (want better code)

 
Rajasekhar Eega
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here I am facing a problem that, whenever i clicked on the menu Item of the webpage I want to include a html page in a particular <div> with some ID divname.


I am trying in the following manner. But that filename as it is displaying on the page.... but not inserting...

document.getElementById("divname").innerHTML="something.html";

and I found a jQuery method

$(#divname).load("something.html")

It is working fine, but not with Google chrome... I cannot understand why it is not?

Any body please help me....


Thanks in Advance....


 
Rob Spoor
Sheriff
Pie
Posts: 20510
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way to properly include a full HTML page inside another is to use an IFRAME. You can set its "src" attribute to the page to load.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic