PDA

View Full Version : Dynamic Ajax Content - opening 2 pages at once



pjb007
05-30-2006, 09:11 AM
I was looking at this
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

Using a link like the one below

<a href="javascript:ajaxpage('test.php', 'mainarea');">Link Text</a>

That works great it pulls the information from test.php into mainarea without reloading the banner and logo of the main page.

But if I have another area 'furtherinfo' how do I fill that with details from a page called 'moredetails.php'

NXArmada
05-30-2006, 01:41 PM
U have this link

<a href="javascript:ajaxpage('test.php', 'mainarea');">Link Text</a>

Add this link


<a href="javascript:ajaxpage('test.php', 'mainarea');">Link Text</a>
<a href="javascript:ajaxpage('moredetails.php', 'furtherinfo');">Link Text</a>


Then add a second DIV tag to your site with an id = to furtherinfo

pjb007
05-30-2006, 02:52 PM
Sorry I was not clear in my opening post.

What I want is a link what will do both those on one click.

NXArmada
05-30-2006, 05:44 PM
<a href="javascript:ajaxpage('test.php', 'mainarea', 'moredetails.php', 'furtherinfo');">Link Text</a>


I believe this will do it.

jscheuer1
05-30-2006, 06:33 PM
<a href="javascript:ajaxpage('test.php', 'mainarea', 'moredetails.php', 'furtherinfo');">Link Text</a>


I believe this will do it.

Nope, at least not the way the script referred to at the beginning of this thread is written, if that is what is being used but, this should work:




<a href="javascript:ajaxpage('test.php', 'mainarea');ajaxpage('moredetails.php', 'furtherinfo');">Link Text</a>

NXArmada
05-30-2006, 06:51 PM
Thats right John i remember doing it but i could not remember exactly how it was down I do remember it was somewhere along that line which probably is why i tipped mine out that way.