PDA

View Full Version : load html page in div



flashbie
05-22-2007, 07:24 PM
Hi All,
First question in this forum.

I am using AJAX Div tag script from this website.

Works great.

My question :
I can load external page in the Div tag like Google.com and sure there are links on goggle .com. So when I click those links it open up in new window or in same window replacing my website.

Is it possible that if I click any link with in that div tag then it open up in the same div tag?

I understand there may be some security thing going on. But I want to make it work with in the same domain without changing the links in the existing html pages. I know this can be done easily with iframes. But I am rebuilding the web site with new flash drop down menu which doesn't work in fire fox when the drop downs overlap on the iframe.
That is why I trying to use DIV.

Any suggestion would be appreciated.

Thanks

Medyman
05-23-2007, 02:54 PM
As far as loading it in the div i have no suggestions as those are not my area of expertise. Try posting is a non-flash forum and you might be able to get some of the better coders here to help you out..

I would personally go the iframe route...
Yes I know there is a glitch with overlapping flash elements and iframes but there are tricks around that...

It's a three step process:
Position your flash movie and iframe with CSS
Set the corresponding z-index properties
Set the "Window mode" of the flash movie

Just google "z-index + flash" and you'll find a ton of resources
But for starters, check this out : http://joshuaink2006.johnoxton.co.uk/blog/82/flash-content-and-z-index

ddadmin
05-23-2007, 03:06 PM
You can use Ajax to load an external file into a DIV, though that file would need to be from the same domain as your own. So a link to Google.com won't work.

With that in mind, see this script: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

Asmith
07-20-2008, 01:36 PM
I'm having some problems using the script from the link referenced above^^. When I test it using FireFox, the content loads normally and everything is fine. When I test it using IE7 nothing happens and I get a JavaScript error below. Am I doing something wrong? I'm pretty new to this stuff so any advice would helpful. Thank You

molendijk
07-20-2008, 02:00 PM
This (http://codinginparadise.org/weblog/2007_08_15_archive.html), perhaps?
===
Arie Molendijk.

jscheuer1
07-20-2008, 02:38 PM
I'm having some problems using the script from the link referenced above^^. When I test it using FireFox, the content loads normally and everything is fine. When I test it using IE7 nothing happens and I get a JavaScript error below. Am I doing something wrong? I'm pretty new to this stuff so any advice would helpful. Thank You

Probably not. To work in IE 7 the script must be live.

Asmith
07-20-2008, 02:46 PM
Thank you for your help. I should have known that.

molendijk
07-20-2008, 03:46 PM
I find this interesting:
<head>

<style type="text/css">
a{font-family:verdana; font-size:12px}
#google{position:relative; left:50px; height:280px;width:500px; overflow:auto; border:1px dashed red;

display:none}
</style>

<script src="http://codinginparadise.org/projects/purple-include/purple-include.js"></script>

</head>

<body>

<a href="#" onclick="document.getElementById('google').style.display='block'; return false">Google</a>
<div id="google" href="http://www.google.nl#xpath(//html)"></div>

</body>
but it probably won't serve all your needs.
===
Arie Molendijk.