I have a question on how I get pages that are linked in the site map to open in the main frame of TP. I have everything installed in my root folder. I have been going into admin--->block manager--->site map edit--->ad menu item---> and select the option of link. Now for the address i have done it a couple different ways. /roster.php and http:://www.mysite.com/roster.php. Each way it is opening up into a new screen. I have looked over the forums for the last two days and can't seem to find an answer to my question. I know it can be done because I have seen other sites with it working. Any help would be apprciated.
Thanks
If you go to Menu manager> Edit menu item, there are two options
Same window
Open in a new window
I have the Same window marked and it is still opening in a new window.
can you give me a link
Sure. www.killingspreeguild.com thanks
I can see 3 links
* Guild Roster
* Downloads
* Guild Application
all 3 open in the same window
Really? That is strange. Wonder why it is not for me. :-\
Make sure you don't have a shift or ctrl key stuck on your keyboard. :)
Perhaps I am not being clear. (sorry if that is the case) I want the roster to open up like the article i created for downloads and the application, in the center block within TP.
Not being a expert with php, but could you put the code for your roster page within a php article, maybe some here has a better way to do this
That's a good idea. Let me try that. Though I have a feeling that it might not work since it calls on it's own database as well. Doesn't hurt to try. :)
just thought use a iframe in your article, that would be a lot easier
I tried creating a php article with the roster code and that didn't work. I'll try the iframe.
I really appreciate you helping me.
Ok try this, I have put in your roster page url so just copy and paste this into a article (not php)
<script type="text/javascript">
/***********************************************
* IFrame SSI script II- Ã,© Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</script>
<iframe id="myframe" src="http://www.killingspreeguild.com/roster.php" marginwidth="0" marginheight="0" vspace="0" hspace="0" style="width: 100%; display: none;" frameborder="0" scrolling="no"></iframe>
That worked!!!!! Thanks so much! It looks beautimus!!
your welcome :) I just had a look, looks good!