my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Including html page to specific div  (want better code) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Including html page to specific div  (want better code)" Watch "Including html page to specific div  (want better code)" New topic
Author

Including html page to specific div (want better code)

Rajasekhar Eega
Greenhorn

Joined: Jul 31, 2012
Posts: 11
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

Joined: Oct 27, 2005
Posts: 19649
    
  18

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Including html page to specific div (want better code)
 
Similar Threads
populating table with database values
Get Image height and width
dynamic Checkboxe value retrieval
JSP IN HTML
Struts2 layout issue