[snip] I have a form and Im doing a check on submission to check whether there are any blank field and if there are I want to call function.. error_popup(); does this make anymore sense to you. Now I understand that you cant call javascript from within php. wot would you recommend as an alternative. I dont have a button or anything that I want to press, just want to call the function so it can open a popup window. [/snip] You would then be using pure JavaScript ... I think onBlur is what you are looking for IIRC. You might want to send this to a JavaScript list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php