Jump to content

[SOLVED] Function call failing


stockton

Recommended Posts

Please tell me why

<input type=image img src=images/Delete.png> <onclick="DeleteMessage(<?php echo $intID ?>)">

fails to call the javascript function DeleteMessage()

whereas

<input type=button value="Delete" onclick="DeleteMessage(<?php echo $intID ?>)">

worked fine.

Link to comment
https://forums.phpfreaks.com/topic/58391-solved-function-call-failing/
Share on other sites

I marked what you did wrong in red

 

<input type=image img src=images/Delete.png> <onclick="DeleteMessage(<?php echo $intID ?>)">

 

 

I suggest next time you check your browsers source so you will see how it is generated without php code

and btw what is the use of using an input if you are using an image seems pretty useless the second option seems more correct

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.