----- Mail Original ----- De: "Chad" innocentkiller@gmail.com À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 14h59:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 8:53 AM, sancelot@free.fr wrote:
----- Mail d'origine ----- De: Bryan Tong Minh bryan.tongminh@gmail.com À: Wikimedia developers wikitech-l@lists.wikimedia.org Envoyé: Thu, 2 Jul 2009 13:32:54 +0200 (CEST) Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 1:22 PM, sancelot@free.fr wrote:
----- Mail Original ----- De: "Andrew Garrett" agarrett@wikimedia.org À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 13h19:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On 02/07/2009, at 10:02 AM, sancelot@free.fr wrote:
Hi, I have got an extension with a form and a submit button (mw 1.14) the problem is when I submit the form button, the search action is performed instead of my function !!
You've given shockingly little detail here, but I bet you're sending a field called 'search'. Try renaming the field.
No, I haven't have a look at the extension code I downloaded here : http://www.organicdesign.co.nz/Extension:EasyGallery
Don't use wfElement, use Xml::openElement. wfElement autocloses.
I reworked the code to use Xml::openElement Xml::submitButton , ... but the effect is the same submitting launches search
Bryan
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Are you including a hidden field element set to the title of the special page?
Yes, but it works the same, either if I use it or not, using a default value .
enclosed is the reworked code.
-Chad
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Bryan Tong Minh is right, use Xml::openElement instead of wfElement and you don't have to do the same for the submit button. Only make sure you close the form with Xml::closeElement, the thing I think you didn't.
Something like that
$wgOut->addHTML(Xml::closeElement('form'));
before
if ($posted) {
I tested it and it worked.
Ahmad Sherif
On Thu, Jul 2, 2009 at 4:53 PM, sancelot@free.fr wrote:
----- Mail Original ----- De: "Chad" innocentkiller@gmail.com À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 14h59:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 8:53 AM, sancelot@free.fr wrote:
----- Mail d'origine ----- De: Bryan Tong Minh bryan.tongminh@gmail.com À: Wikimedia developers wikitech-l@lists.wikimedia.org Envoyé: Thu, 2 Jul 2009 13:32:54 +0200 (CEST) Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 1:22 PM, sancelot@free.fr wrote:
----- Mail Original ----- De: "Andrew Garrett" agarrett@wikimedia.org À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 13h19:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On 02/07/2009, at 10:02 AM, sancelot@free.fr wrote:
Hi, I have got an extension with a form and a submit button (mw 1.14) the problem is when I submit the form button, the search action is performed instead of my function !!
You've given shockingly little detail here, but I bet you're sending a field called 'search'. Try renaming the field.
No, I haven't have a look at the extension code I downloaded here : http://www.organicdesign.co.nz/Extension:EasyGallery
Don't use wfElement, use Xml::openElement. wfElement autocloses.
I reworked the code to use Xml::openElement Xml::submitButton , ... but the effect is the same submitting launches search
Bryan
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Are you including a hidden field element set to the title of the special page?
Yes, but it works the same, either if I use it or not, using a default value .
enclosed is the reworked code.
-Chad
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
----- Mail d'origine ----- De: Ahmad Sherif ahmad.m.sherif@gmail.com À: Wikimedia developers wikitech-l@lists.wikimedia.org Envoyé: Thu, 2 Jul 2009 16:17:28 +0200 (CEST) Objet: Re: [Wikitech-l] button action in form problem
Bryan Tong Minh is right, use Xml::openElement instead of wfElement and you don't have to do the same for the submit button. Only make sure you close the form with Xml::closeElement, the thing I think you didn't.
Something like that
$wgOut->addHTML(Xml::closeElement('form'));
before
if ($posted) {
I tested it and it worked.
You are right ! Thanks a lot
Ahmad Sherif
On Thu, Jul 2, 2009 at 4:53 PM, sancelot@free.fr wrote:
----- Mail Original ----- De: "Chad" innocentkiller@gmail.com À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 14h59:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 8:53 AM, sancelot@free.fr wrote:
----- Mail d'origine ----- De: Bryan Tong Minh bryan.tongminh@gmail.com À: Wikimedia developers wikitech-l@lists.wikimedia.org Envoyé: Thu, 2 Jul 2009 13:32:54 +0200 (CEST) Objet: Re: [Wikitech-l] button action in form problem
On Thu, Jul 2, 2009 at 1:22 PM, sancelot@free.fr wrote:
----- Mail Original ----- De: "Andrew Garrett" agarrett@wikimedia.org À: "Wikimedia developers" wikitech-l@lists.wikimedia.org Envoyé: Jeudi 2 Juillet 2009 13h19:13 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [Wikitech-l] button action in form problem
On 02/07/2009, at 10:02 AM, sancelot@free.fr wrote:
Hi, I have got an extension with a form and a submit button (mw 1.14) the problem is when I submit the form button, the search action is performed instead of my function !!
You've given shockingly little detail here, but I bet you're sending a field called 'search'. Try renaming the field.
No, I haven't have a look at the extension code I downloaded here : http://www.organicdesign.co.nz/Extension:EasyGallery
Don't use wfElement, use Xml::openElement. wfElement autocloses.
I reworked the code to use Xml::openElement Xml::submitButton , ... but the effect is the same submitting launches search
Bryan
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Are you including a hidden field element set to the title of the special page?
Yes, but it works the same, either if I use it or not, using a default value .
enclosed is the reworked code.
-Chad
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org