Re: Re: php / JS / DOM question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Al wrote:
jonathan wrote:

I know that this is more of a Javascript / DOM question but I cannot for the life of me figure this out:

I have this form:

<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>

get firefox and learn to use the javascript console, the DOM inspector and
the javascript debugger in that order - in this case the DOM inspector
would have been your biggest friend as it would have shown you 'correct'
name for the element (object) whose value you were trying to grab - in general
the DOM inspector is very handy for learning more about the structure
and the content of the DOM.


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. Looking at the examples online, I feel like this should work. Does anybody know why this might not be working correctly?

-jonathan


You need to ask in the JAVASCRIPT newsgroup.  This is not a php question.

anyone every noticed that the question as to where a good javascript mailing
can be found comes up every week or so. and nobody ever has an answer.

so where the **** is this 'JAVASCRIPT newsgroup' ??

<wait thats not a php question either - maybe we can ask John Nichel
to ajudicate the validity of the question in light of the 'somehow
related to IBM' criteria [which is in fact the true measure of a relevant
question on this list]> ;-)



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux