Second Update: If you remove the name attribute from the button using jQuery then it works. Just changing the name does not.
All fixed. On Apr 14, 11:01 am, MeanStudios <cody.lundqu...@gmail.com> wrote: > Update: > > I am using ExpressionEngine and am trying to edit to the publish area > (for those of you wondering) and I have no control over the name > attribute for the submit button and it's value is "submit" so I've > used jQuery to change the name of the submit button to something else > with this line of code: > $("input[name='submit']").attr('name', 'change_submit'); > > This works for FF, Safari and IE8 but it seems IE7 doesn't pick up > that change and still things the button is named "submit". I've used > the developer tool in the IE8 browser to check the DOM when it's > rendering in IE7 and it shows as 'change_submit' there so I'm not sure > what's up. > > I've hacked the cp.publish.php file to manually change the submit > buttons name to something else and everything is working now. So, the > problem is IE7 doesn't accept the button name change using jQuery. > Maybe if I remove that button and rebuild it? > > On Apr 14, 8:23 am, MeanStudios <cody.lundqu...@gmail.com> wrote: > > > Greetings, > > > I'm using jQuery 1.3.2 and jQuery Form Plugin 2.25. > > My code: > > $('#msre_file').change(function(){ > > el = $(this); > > target = el.next(); > > $('#entryform').ajaxSubmit({ > > url: '<?php echo $cp_url; ?>&ms_rel_file=upload', > > type: 'post', > > iframe: true, > > success: function(response) { > > el.attr('value', ''); > > target.append('<div class="msre_tmp_upload" > > style="display:none;">'+response+'</div>'); > > > > target.children('.msre_tmp_upload').fadeIn(); > > } > > }); > > return false; > > }); > > > The form tag looks like: > > <form action="index.php?C=edit&M=new_entry" name="entryform" > > id="entryform" method="post"> > > > It works in FF2/3, Safari, IE8 but not in IE7. I get an error on line > > 257 which is: > > form.submit(); > > > I've changed that line to document.entryform.submit(); just for kicks > > and it still throws the error message. > > I've also done window.document.getElementById('entryform').submit(); > > and it still doesn't work. > > I've done alert(document.entryform.msre_file.value); and it gives me > > the value of the file input correctly so I know it's referencing the > > form correctly. > > Yes I've changed the name attribute of the submit button to something > > other than "submit". > > > I've also scrapped the jQuery Form Plugin and wrote my own form submit > > function using the iframe method and it too worked in FF, Safari and > > IE8 but still threw the same error in IE7. > > > I'm getting rather frustrated with this :(. > > > Any help would be hugely appreciated.