Re: Re: php / JS / DOM question

From: Date: Fri, 30 Dec 2005 12:45:04 +0000
Subject: Re: Re: php / JS / DOM question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-228001@lists.php.net to get a copy of this message
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]> ;-)


« previous php.general (#228001) next »