Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-29-2012, 12:10 PM   PM User | #1
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
Script not working in IE

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:

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.

Last edited by alfromsd; 05-29-2012 at 05:40 PM..
alfromsd is offline   Reply With Quote
Old 05-29-2012, 01:37 PM   PM User | #2
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,882
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
what error message do you get in IE?
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 05-29-2012, 05:39 PM   PM User | #3
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
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.
alfromsd is offline   Reply With Quote
Old 05-29-2012, 05:55 PM   PM User | #4
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,882
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
and what do yu get when you press F12?
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 05-29-2012, 06:05 PM   PM User | #5
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
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.
alfromsd is offline   Reply With Quote
Old 05-29-2012, 06:09 PM   PM User | #6
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,882
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
I can’t help very much as I’m on UNIX here (no IE available) … sorry
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 05-29-2012, 06:15 PM   PM User | #7
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
Quote:
Originally Posted by Dormilich View Post
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?
alfromsd is offline   Reply With Quote
Old 05-29-2012, 06:20 PM   PM User | #8
Dormilich
Senior Coder

 
Dormilich's Avatar
 
Join Date: Jan 2010
Location: Behind the Wall
Posts: 2,882
Thanks: 9
Thanked 291 Times in 287 Posts
Dormilich is on a distinguished road
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.
__________________
please post your code wrapped in [CODE] [/CODE] tags
Dormilich is offline   Reply With Quote
Old 05-29-2012, 06:28 PM   PM User | #9
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
Quote:
Originally Posted by Dormilich View Post
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 is offline   Reply With Quote
Old 05-29-2012, 10:47 PM   PM User | #10
alfromsd
New to the CF scene

 
Join Date: May 2012
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
alfromsd is an unknown quantity at this point
Finally figured it out...

I put in the header:
Code:
<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.
alfromsd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:14 AM.


Advertisement
Log in to turn off these ads.