Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open url in a block on a page

Status
Not open for further replies.

hunt00

Technical User
Mar 6, 2005
79
US
Wondering if javascript could open an url at a specific location on a page.

if ( test == "a") {
document.write("Below is the page");
//here will be the page that 1st url referred to
} else {
document.write("Here is another page");
//here will be the page that 2nd url referred to
}
 
Your best bet would be to use IFRAME tags to display pages within pages.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
i'm trying to avoid iframe..is there another way in javascript?
 
You could use a HTTP object to hit the URL and set the innerHTML property of a div tag with the returned HTML.

Can I ask why you're trying to avoid using a construct that is designed to do exactly what you wish to do? Is this some new masochistic programming trend that I've missed the boat on?

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Thanks very much! I will try that out. Just personally i dont like iframe much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top