hello!
i'm actually new to JavaScript. There's something i don't understand. here's the piece of code first:
HTML:
JavaScript:
The function Enable enables first two buttons - this works.
But why is the parameter table undefined? Does this.value work only on input tags? If so, what how can i execute similar action on table tag?
P.S.: the code posted is acutaly a part of PHP.
i'm actually new to JavaScript. There's something i don't understand. here's the piece of code first:
HTML:
Code:
<td class=\"tekst\" align=\"center\" value=$question_array[$pom] onClick=\"Enable(this.value)\">$question_array[$index_q]</td>
JavaScript:
Code:
<script type="text/javascript">
<!--
function Enable(table) {
var x=document.getElementById("preview_question");
var y=document.getElementById("edit_question");
x.disabled=false;
y.disabled=false;
var newInput=document.createElement("<input type='hidden' name='question' value=table />");
document.body.insertBefore(newInput);
}
//-->
</script>
The function Enable enables first two buttons - this works.
But why is the parameter table undefined? Does this.value work only on input tags? If so, what how can i execute similar action on table tag?
P.S.: the code posted is acutaly a part of PHP.