Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-06 Thread Michael A. Peters
Ashley Sheridan wrote: Bit of advice though, don't use Javascript to submit a form. Firstly, Javascript isn't available on all browsers, and on those it is available on, not everyone has it turned on. The W3C has the stats for Javascript being unavailable in a browser at about 5%. Yup. Just

[PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Mary Anderson
Hi, I am writing code in PHP which generates HTML script. My app is fairly complex. Twice in the development of the application I have run into a problem with submit buttons which pick up the wrong url. Instead of call the url for that submit button, it appears to call the url for the

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Joseph Thayne
This is actually a javascript issue rather than a PHP issue. What is happening is that the action of the form is what is being submitted. The action never changes. What you need to do is have the javascript change the action as well as submit the form (which means you will need to move it

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Ashley Sheridan
On Fri, 2010-02-05 at 14:33 -0600, Joseph Thayne wrote: This is actually a javascript issue rather than a PHP issue. What is happening is that the action of the form is what is being submitted. The action never changes. What you need to do is have the javascript change the action as

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Joseph Thayne
What you maybe ought to consider is using several submit buttons, and give each a name and a value. That way, your PHP script can check for a specifically named variable sent from the form. That way, you keep many people happy, and your site still works perfectly. The problem with doing it

Re: [PHP] PHP generated HTML has submit button which picks up the wrong url.

2010-02-05 Thread Robert Cummings
Joseph Thayne wrote: What you maybe ought to consider is using several submit buttons, and give each a name and a value. That way, your PHP script can check for a specifically named variable sent from the form. That way, you keep many people happy, and your site still works perfectly. The