Jump to content

My Function Is Not Called When Button Is Clicked.


chitchirya

Recommended Posts

Good day!This is my first time to post here in forums. Sorry for my bad english.Hopefully you can help me with my problem. This is my Function

function showResult(class){alert(class);}

This is my Php code;

do{   echo "<input type='button' value=".$result['class_name']." name=".$result['class_name']." onclick='showResult(this.value)'>";   $result = mysql_fetch_assoc($query);  }while($result);

My button seems working properly but when I call the function during the event onClick, it does not work. Please help me. God bless all =)

Link to comment
Share on other sites

Do you mean like this?

value='".$result['class_name']."' name='".$result['class_name']."'

It does not work also. but why this code work...

<select name=".addslashes($result['skill_name'])." onChange='showRlvl(this.value,this.name);   showEffect(this.value,this.name,".$result['skill_id']."); showPoints2(this.value)'>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...