can i use the HTML DOM inside a PHP function?

Chris L

New member
Sorry i'm quite new to php i am trying to change the value of a dropdown list(catid) to the value i have saved in a file ($selected) in a function. Just wondering if this is possible or have i made a mistake?? cheers

function getSelectedItem()
{
$selected = $product->get_catID();
document.getElementById("catID").options[].selectedIndex = $selected;
}
 
Back
Top