stockton Posted July 4, 2007 Share Posted July 4, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/58391-solved-function-call-failing/ Share on other sites More sharing options...
RichardRotterdam Posted July 4, 2007 Share Posted July 4, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/58391-solved-function-call-failing/#findComment-289540 Share on other sites More sharing options...
stockton Posted July 4, 2007 Author Share Posted July 4, 2007 Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/58391-solved-function-call-failing/#findComment-289552 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.