[PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
Micah Gersten news.php@micahscomputing.com wrote in message news:3e.68.30999.cd50a...@pb1.pair.com... 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? No, I will try that - and use Firebug that I just downloaded... Cheers... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
Ross McKay ro...@zeta.org.au wrote in message news:lv4kr4psfniltjns3p914aj4s7s6nna...@4ax.com... On Thu, 12 Mar 2009 18:39:38 -0600, scubak1w1 wrote: [...] 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 How do you turn on your submit button? (for that matter, how do you turn it off?) Have you checked Firefox's log to see if you have JavaScript errors? -- Ross McKay, Toronto, NSW Australia Let the laddie play wi the knife - he'll learn - The Wee Book of Calvin I have it set in a div tag and use AJAX... When it is 'off' (i..e, when the page first opens) it is simply a grayed out image with a 'tool tip' to indicate it is not functional... Once the array key exists for the first form, I have (sic) AJAX change the connets of the div to make it a 'true' submit button... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
haliphax halip...@gmail.com wrote in message news:952625160903130640l7c1a2f0bh8af2b6ffc447b...@mail.gmail.com... On Fri, Mar 13, 2009 at 3:18 AM, 9el le...@phpxperts.net wrote: 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. Yeah, php is never browser specific. It is rendered to HTML before browser can see it. So all browsers will react the same with PHP. But will differ on the client sides like JavaScript. Also--INCLUDE YOUR CODE. Listing everything you do in pseudocode will do you absolutely no good for a problem like this, as it is no doubt a syntax error or a browser-javascript-compatibility issue. If we can't see the code, we can't point out the problem. Anyway, yeah--if it works in IE and not in FF, then it has nothing to do with PHP (directly). Change your JS. Thanks, I will do that next time... I have always been reticent to do that as: (i) I felt people like yourself good enough to answer are not my code checkers, and (ii) did not want to 'swamp' the newsgroup... Will not worry about that now... Thanks again... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
On Thu, 19 Mar 2009 16:27:38 -0600, scubak1w1 wrote: I have it set in a div tag and use AJAX... When it is 'off' (i..e, when the page first opens) it is simply a grayed out image with a 'tool tip' to indicate it is not functional... Once the array key exists for the first form, I have (sic) AJAX change the connets of the div to make it a 'true' submit button... Sounds like you have some browser-specific DOM code there when adding the submit button. Can we see the code please? A simpler approach could be to have the submit button there all along, but disable it (attribute: disabled=disabled) until you have your array key (script: submitElement.disabled = false). No chance of bollocksing up the DOM code then :) -- Ross McKay, Toronto, NSW Australia Let the laddie play wi the knife - he'll learn - The Wee Book of Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
On Thu, 12 Mar 2009 18:39:38 -0600, scubak1w1 wrote: [...] 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 How do you turn on your submit button? (for that matter, how do you turn it off?) Have you checked Firefox's log to see if you have JavaScript errors? -- Ross McKay, Toronto, NSW Australia Let the laddie play wi the knife - he'll learn - The Wee Book of Calvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
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. Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
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. Yeah, php is never browser specific. It is rendered to HTML before browser can see it. So all browsers will react the same with PHP. But will differ on the client sides like JavaScript.
Re: [PHP] Re: 2 forms, same page, 1st is file upload - works in IE, 'dies' in non-IE browsers
On Fri, Mar 13, 2009 at 3:18 AM, 9el le...@phpxperts.net wrote: 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. Yeah, php is never browser specific. It is rendered to HTML before browser can see it. So all browsers will react the same with PHP. But will differ on the client sides like JavaScript. Also--INCLUDE YOUR CODE. Listing everything you do in pseudocode will do you absolutely no good for a problem like this, as it is no doubt a syntax error or a browser-javascript-compatibility issue. If we can't see the code, we can't point out the problem. Anyway, yeah--if it works in IE and not in FF, then it has nothing to do with PHP (directly). Change your JS. -- // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php