Re: php / JS / DOM question
| From: | M. Sokolewicz | Date: | Fri, 30 Dec 2005 00:20:23 +0000 |
| Subject: | Re: php / JS / DOM question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227994@lists.php.net to get a copy of this message | ||
which is not part of the standards. It's accepted by most browsers because a lot of sites use it (due to the fact that IE is so popular), but it's *NOT* standard. So, don't do it! Dan showed the correct way.
- tul
Kirk.Johnson@zootweb.com wrote:
Add the "value" property: document.forms['query_form'].elements['q'] .value. Kirk jonathan <news_php@arclocal.com> wrote on 12/29/2005 02:45:23 PM:<form name="query_form"> <input type="text" name="q"></input> <input type="button" onclick="drawImg('A',document.forms ['query_form'].elements['q']);" value="Search"></input> </form> When the user clicks on the button, I want the text that is in input elment 'q' to be sent to the Javascript function drawImg but when I debug it via alerts, it appears to be NULL.