Help me plz it 's error (passing value to function when click link)
plz help me.
I found the error when i run it. For my propose, i want to sent values to function when click links and show a value that has sent into textbox. I had made two links for testing passing value to function but it didn't work it don't sent value to "loadToTextBox" function.
Please help me for solving this problem ~-_-~.
Thank in advance
From Aranyuth
//////////////////it don't work, i want to do like this/////////////////////
<html>
<script language="javascript">
<!--
function loadToTextBox(code, bg_or_font) {
if(bg_or_font == "bg") {
document.submitColor.bg_code.value = code;
}else{
document.submitColor.font_code.value = code;
}
}
//-->
</script>
//////////////////it it like this, it work why?? ///////////
// i'm confuse
<html>
<script language="javascript">
<!--
function loadToTextBox(code) {
document.submitColor.bg_code.value = code;
}
//-->
</script>
Bookmarks