Re: calling javascript
| From: | Ben Ramsey | Date: | Mon, 01 Nov 2004 15:14:32 +0000 |
| Subject: | Re: calling javascript | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-200838@lists.php.net to get a copy of this message | ||
Jay Blanchard wrote:
[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.Nah. I was just using the button as an example to get you started. You'll probably want to call it from the onsubmit attribute of the form tag. I didn't want to get into too much of an HTML/Javascript discussion, since that's off-topic for this list. Google for form handling and javascript, etc. There're plenty of resources on it. -- Regards, Ben Ramsey http://benramsey.com --------------------------------------------------- Atlanta PHP - http://www.atlphp.org/ The Southeast's premier PHP community. ---------------------------------------------------