Stringer
05-03-2006, 11:35 PM
http://www.dynamicdrive.com/dynamicindex5/button3.htm
Please someone help a noob.
I have a 'header' frame with nav buttons. I want to default target to be the frame called 'middle'. I thought I read the instr correctly but the page does not open. I can use the buttons in parent window np.
My code:
<script type="text/javascript">
<!--
/***********************************************
* Rollover background-color button Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify optional button target: "_new" for new window, or name of FRAME target (ie "myframe")
var buttontarget="middle"
function change(e, color){
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button")
el.style.backgroundColor=color
}
function jumpto2(url){
if (buttontarget=="")
window.location=url
else if (buttontarget=="_new")
window.open(url)
else
parent[buttontarget].location=url
}
//-->
</script>
Please someone help a noob.
I have a 'header' frame with nav buttons. I want to default target to be the frame called 'middle'. I thought I read the instr correctly but the page does not open. I can use the buttons in parent window np.
My code:
<script type="text/javascript">
<!--
/***********************************************
* Rollover background-color button Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify optional button target: "_new" for new window, or name of FRAME target (ie "myframe")
var buttontarget="middle"
function change(e, color){
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button")
el.style.backgroundColor=color
}
function jumpto2(url){
if (buttontarget=="")
window.location=url
else if (buttontarget=="_new")
window.open(url)
else
parent[buttontarget].location=url
}
//-->
</script>