...

View Full Version : Script not working in IE



alfromsd
05-29-2012, 12:10 PM
Hello,

This script works great in Firefox, and Chrome, but does not work in IE as soon as I put <!DOCTYPE html>. It's suppose to pop open a login window.

This is the part that is in the html code:



<script>
var g_loginWindow = null;

function login()
{
new Ajax.Request( 'login.php', {
parameters: $('loginfrm').serialize(),
method: 'post',
onSuccess: function( transport ) {
g_loginWindow.close();
}
} );
}

function showWindow()
{
g_loginWindow = new Window( { className: 'spread', title: "Member Login",
destroyOnClose: true,
onClose:function() { $('myloginform').style.display = 'none'; } } );
g_loginWindow.setContent( 'myloginform', true, true );
g_loginWindow.showCenter();
}
</script>


There is also 3 other js scripts it calls on, but im hoping it's part of this.

Any help is appreciated.

Dormilich
05-29-2012, 01:37 PM
what error message do you get in IE?

alfromsd
05-29-2012, 05:39 PM
None, when i click the link which is suppose to open the pop up form, nothing happens at all. When i take out <!DOCTYPE html> on top of the html page, it works but then the web site looks like crap with things not aligned right.

Dormilich
05-29-2012, 05:55 PM
and what do yu get when you press F12?

alfromsd
05-29-2012, 06:05 PM
Nothing pertaining to this script that i can see.

Here is a link of what it is suppose to do:
http://www.textvending.com/login/form.php

Here is a link on a sample page where it does not work:
http://www.textvending.com/form.php

The link is the login on the bottom left, or the "members login" on the top right.

Also if i change compatibility view, it does work, but I would like it to just work normally. I'm running IE 9. For some reason it does work on older IE browsers.

Dormilich
05-29-2012, 06:09 PM
I can’t help very much as I’m on UNIX here (no IE available) … sorry

alfromsd
05-29-2012, 06:15 PM
I canít help very much as Iím on UNIX here (no IE available) Ö sorry

I have read some posts where it has something to do with changing the scripts document type, but the 3 other scripts are pretty complex, and I cant figure out where or what to change.

Any suggestions? Can you see the other scripts now since I put a link up?

Dormilich
05-29-2012, 06:20 PM
the problem is, that it is a problem with IE. so all browsers I could use to debug won’t help as the scripts work there. and I most probably wouldn’t find anything (in 3 complex scripts (!) ) without any kind of hint, which is primarily the JS error message.

I can confirm that IE can dramatically change its behaviour if in standard or quirks mode, but that’s pretty much all I can say blindfolded.

alfromsd
05-29-2012, 06:28 PM
the problem is, that it is a problem with IE. so all browsers I could use to debug won’t help as the scripts work there. and I most probably wouldn’t find anything (in 3 complex scripts (!) ) without any kind of hint, which is primarily the JS error message.

I can confirm that IE can dramatically change its behaviour if in standard or quirks mode, but that’s pretty much all I can say blindfolded.

Been working on this for the last 3 days, I just now figured out it has to do with the <!doc.type html>.. been really frustrating, but thanks for looking I really appreciate it.

alfromsd
05-29-2012, 10:47 PM
Finally figured it out...

I put in the header:

<meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" />

So stupid that IE9 has so many problems that i have to force it to version 8.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum