PDA

View Full Version : Need help with ":: Tabbed Document Viewer"



Riker
01-27-2011, 09:27 PM
1) Script Title: :: Tabbed Document Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/tabdocviewer.htm

3) Describe problem:

At the bottom of the Iframe it ask if you want to open window in browser, problem is if visitor checks it it opens in same window,visitor leaves, what I need is to figure out how to have when the box is checked to open the tab in new window.

This way I will not loose a visitor, since we are a fundraising site we can afford to upset anyone, or have them click away.

I am not a coder and rely of sites like this for help many times.

Any idea would be appreciated.

Thank you,

ddadmin
01-29-2011, 09:40 PM
Try replacing the original script with the below version instead:


<script type="text/javascript">

/***********************************************
* Tabbed Document Viewer script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var selectedtablink=""
var tcischecked=false

function handlelink(aobject){
selectedtablink=aobject.href
tcischecked=(document.tabcontrol && document.tabcontrol.tabcheck.checked)? true : false
if (document.getElementById && !tcischecked){
var tabobj=document.getElementById("tablist")
var tabobjlinks=tabobj.getElementsByTagName("A")
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
document.getElementById("tabiframe").src=selectedtablink
return false
}
else{
window.open(selectedtablink)
return false
}
}

function handleview(){
}

</script>

Everything else can stay the same.