PDA

View Full Version : Dynamic Ajax Content question



mk47funk
04-11-2006, 08:23 PM
Dynamic Ajax Content
http://dynamicdrive.com/dynamicindex17/ajaxcontent.htm


Quick Question

When creating a link that opens in the Ajax frame, using this:

<a href="javascript:ajaxpage('test.htm', 'contentarea');">test</a>
<div id="contentarea"></div>

Is there a way to open 2 separate pages in 2 separate Ajax frames, with the same link? Is it even possible to have 2 Ajax frames on the same page?

Thanks!

mk47funk
04-12-2006, 08:57 PM
Anyone?

ddadmin
04-12-2006, 09:21 PM
If I understand your question, you wish to use more than one DIV (ie: contentarea) to hold various Ajax content? Something like:


<a href="javascript:ajaxpage('test.htm', 'contentarea'); ajaxpage('test2.htm', 'contentarea2')">test</a>

<div id="contentarea"></div>
<div id="contentarea2"></div>

Now, I haven't tested this out yet, and trying to request two ajax content at the same time may fail based on the way the script was created. Worth a shot.

mk47funk
04-13-2006, 02:12 PM
Thanks, that looks like exactly what I'm trying to do.... I'll try it out and post if it worked.