Re: [PHP] calling javascript function from a form image
form name=formMoviesSearch method=post action=imagesubmit.htm input type=image border=0 name=sub src=genre.png onclick=set_category() input type=hidden name=submit_form value=true /form I understand Netscape is a real pain in the a**... but that should work... maybe it (Netscape)'s being picky about syntax... trye being perfectionist... like: input type=image name=sub value= src=genre.png onClick=set_category(); _ . Christian Dechery . . Gaita-L Owner / Web Developer . . http://www.webstyle.com.br . . http://www.tanamesa.com.br -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] calling javascript function from a form image
Hi, I have a form which contains an: input type=image When the user clicks this image I want a javascript function to be called. I have added an onclick event to this input line (see code below) which works great in IE and all is well. Netscape doesn't recognise this onclick event though for the image so how do you call a javascript function here? Normally I'd wrap an img with a/a tags but I don't think a form will like this. Has anyone a solution? Here is my code # head titleimagesubmit.htm/title script function set_category() { alert(category set); } /script /head body bgcolor=#FF text=#00 ?php if ($submit_form) //if this equals true then the form has been submitted { echo scriptalert(\form submitted\);/script; } else { echo scriptalert(\not submitted\);/script; } ? form name=formMoviesSearch method=post action=imagesubmit.htm input type=image border=0 name=sub src=genre.png onclick=set_category() input type=hidden name=submit_form value=true /form /body /html # Neil Email: [EMAIL PROTECTED] [EMAIL PROTECTED]