PDA

View Full Version : Ajax Includes script from Iframe Help



TjL30
05-21-2006, 05:15 PM
So my old site used Iframe’s to display all my content inside my template. The problem was if the content was longer than the Iframe then I would get a scroller bar. What I wanted was the page to expand with the content. Then I found this sweet site and I think I am falling in love with JavaScript and this Dynamic website :).

So In the older version of the site I had all the different pages links load into the Iframe. I just put this Ajax Includes script in, and I am wondering if I can make different links load into the same area. Hope you get what I am saying...

Any help would be greatly appreciated.

jscheuer1
05-21-2006, 06:39 PM
Yes. Just use the same syntax with a different url for the page than you used for the first link.

Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

TjL30
05-21-2006, 06:58 PM
O sry about that
Script: Ajax Includes script
http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm

OK so I have my list of links

<a href="/news/latest.php">Blog</a><br />
<a href="/content/Tutorials/tutorials.html">Tutorials</a><br />
<a href="/content/Projects/projectsmain.html">Projects</a><br />
<a herf... ext ext


Then I have my Include thing in another div

<div id="content_mid">
<script type="text/javascript">
ajaxinclude("/news/latest.php")
</script>
</div>

So my quetion is what do I do to make the links open in the include script?
With Iframes it was
target="iframename" but how would I do this with the ajaxinclude script?

jscheuer1
05-21-2006, 07:21 PM
You need this script:

Dynamic Ajax Content (http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm)

TjL30
05-21-2006, 10:43 PM
Great thanks :)