Re: Re: 2 forms, same page, 1st is file upload - works inIE, 'dies' in non-IE browsers
| From: | scubak1w1 | Date: | Thu, 19 Mar 2009 22:21:23 +0000 |
| Subject: | Re: Re: 2 forms, same page, 1st is file upload - works inIE, 'dies' in non-IE browsers | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-290319@lists.php.net to get a copy of this message | ||
"Ashley Sheridan" <ash@ashleysheridan.co.uk> wrote in message
news:1236930396.3525.4.camel@localhost.localdomain...
> On Fri, 2009-03-13 at 02:06 -0500, Micah Gersten wrote:
>> scubak1w1 wrote:
>> > Hello,
>> >
>> > Banging my head against this one...
>> >
>> > Briefly:
>> > - I have two forms on the same page
>> > - both forms are: action="<?php print $_SERVER['PHP_SELF'];
>> > ?>"
>> > method="post"
>> > - both forms gave unique ids
>> > - both forms have a hidden file of the type <input type="hidden"
>> > name="_add_new_module_details" value="1" /> which is checked
>> > directly
>> > below
>> > the form with an "if(array_key_exists('_add_new_module_details',
>> > $_POST))
>> > { ...}" method
>> > - first form is a file upload
>> > - 2nd form is a details submit
>> > - submit button on 2nd form is only 'turned on' (via AJAX) once the
>> > user
>> > has uploaded file file
>> > - 2nd form validated fields contents, via an onsubmit
>> > - after 2nd form successuly submitted, head off back to another page
>> >
>> > In Internet Destroyer, the page works just fine (i.e., both forms fire
>> > as
>> > expected)
>> >
>> > In the non-IE browsers I have tried (Firefox, Chrome, Opera), the first
>> > form
>> > uploads the file properly, the 2nd form's submit is 'turned on' by
>> > AJAX -
>> > BUT the submit button on the 2nd form doesn't seem to do anything -
>> > i.e.,
>> > the onsubmit is not being triggered, etc, etc
>> >
>> > help! <smile>
>> >
>> > Thanks in advance:
>> > GREG
>> >
>> >
>> >
>>
>> Have you checked the Javascript error console in Firefox?
>>
>> --
>> Micah
>>
> It sounds like a script error rather than a PHP error. Use Firebug which
> will show you the HTML as it is updated by Javascript, so you can see
> where the problem is. I'm willing to bet that the Javascript code you
> are using is IE only.
Thanks... The code is pretty simple, built from scratch... But I will do
just that... Cheers!