Re: HTML_AJAX and formSubmit method - Yes ! But why ?

From: Date: Wed, 05 Apr 2006 13:05:39 +0000
Subject: Re: HTML_AJAX and formSubmit method - Yes ! But why ?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-233249@lists.php.net to get a copy of this message
> does the following make it work? ... Yes it did ! But why ? I'm passing string ... not variable... I don't understand .... > > Georgi Ivanov wrote: > > ... > > > formSubmit: function (form, target, customRequest) > > { > > if (typeof form == 'string') { > > form = document.getElementById(form); > > if (!form) { > > // let the submit be processed normally > > return false; > > } > > } > > if (typeof target == 'string') { > > //I think we MUST go here but it seems we don't... > > target = document.getElementById('target'); > > target = document.getElementById(target); > > // ^-- no quotes! > > > } > > if (!target) { > > //I guess we enter here but we shouldn't..... > > target = form; > > } > > .......................... > > The script seems to be OK but... > > So generally this script works ONLY if the DIV is with ID=target and > > function called like this : HTML_AJAX.formSubmit(this,'target') > > If i change the div with ID=alabala and call the script with : > > HTML_AJAX.formSubmit(this,'alabala') it does not work. > > Any ideas ?

« previous php.general (#233249) next »