View Full Version : (Dynamic Ajax Content) Links opening externally

01-31-2007, 02:38 PM
1) Script Title:
Dynamic Ajax Content

2) Script URL (on DD):

3) Describe problem:
Hi - Im having a problem with the Dynamic Ajax Content script. I am using this to load a forum (PHPBB) into my site (www.ancientsguild.dk, currently using Iframe)), but once the forum has loaded any link I click loads the content into a new page and out of the DIV that I want everything to stay in. Is there a solution for this? Going through all the forum code to change the HREF tags (would that work?) is extremely impractical.

Ive looked through about 30 pages but not found anything.

Any help/tips would be appreciated. Thinking about moving over to this ajax script from an Iframe (eurgh@iframes and resizing issues:( ) and so far this is the only problem Ive encountered.

Many Thanks,

02-01-2007, 02:03 PM
Bump :(

This is the only real alternative to using Iframes (that I can see), so if anyone could reply with a pointer or ideas, it would be greatly appreciated

02-11-2007, 02:05 PM
:confused: Hi folks, I am facing the same problem.

The question is how to refer to an element inside the div where the content is loaded in.

If we'd know that referrer you could use some function (I use to swap images used as labels for radio buttons to select your gender in a form) like the follow to change all href / hyperlinks onload, e.g. so that they'd be loaded in the div as well.

Any clue, please post it!!!

//if (document.getElementById) onload = function ()
// var a = document.getElementsByTagName("label");
// for(var i=0,j=a.length;i<j;i++){
// if(a[i].hasChildNodes && a[i].childNodes.item(0).tagName == "IMG")
// {
// a[i].onclick = function()
// {
// var e0 = document.getElementById("order_by_gender0labelimg");
// var e1 = document.getElementById("order_by_gender1labelimg");
// var e2 = document.getElementById("order_by_gender2labelimg");
// var e = document.getElementById(this.htmlFor);
// switch(e.type){
// case "radio": e.checked|=1;break;
// case "checkbox": e.checked=!e.checked;break;
// case "text": case "password": case "textarea": e.focus(); break;
// }
// e0.src="img/order_by_gender0labeloff.gif";
// e1.src="img/order_by_gender1labeloff.gif";
// e2.src="img/order_by_gender2labeloff.gif";
// var thisimg = document.getElementById(this.id+'img');
// thisimg.src='img/'+this.id+'on.gif';
// }
// }
// }

03-09-2007, 01:57 AM
Me too!
Same question as Penski, any additional help would be most apprecieated.

03-10-2007, 01:24 AM
Use this <a href="javascript:ajaxpage('page-name.htm', 'rightcolumn');" > Page Name </a> in the external page that loads in to your ajax page.

Works for me... I surprise myself sometimes. :)