View Single Post
  #1 (permalink)  
Old 05-22-06, 02:53 PM
pkcidstudio's Avatar
pkcidstudio pkcidstudio is offline
Coding Addict
 
Join Date: Nov 2005
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
not working on a php page

any thoughts of why this wouldnt be working in a php page?
Code:
// JavaScript Document
function contractall(){
if (document.getElementById){
var inc=0
while (document.getElementById("hidden"+inc)){
document.getElementById("hidden"+inc).style.display="none"
inc++
}
}
}

function expandone(){
if (document.getElementById){
var selectedItem=document.priceform.priceoption.selectedIndex
contractall()
document.getElementById("hidden"+selectedItem).style.display="block"
}
}

if (window.addEventListener)
window.addEventListener("load", expandone, false)
else if (window.attachEvent)
window.attachEvent("onload", expandone)
it works with a html page but not in my php. am i missing something here?
Reply With Quote