Forums / General Questions / Damned Internet Explorer! Never works right..

Damned Internet Explorer! Never works right..

Locked

Views: 1,662

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
23 Dec 2008, 7:17 AM
#1
xblight avatar

xblight

New Zenner

Join Date:
Nov 2008
Posts:
11
Plugin Contributions:
0

Damned Internet Explorer! Never works right..

   <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
		<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
        <?php }?>
        <?
        if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '1') {
echo "<li><input type=\"image\" src=\"http://xblight.com/store/music/music.gif\" onClick=\"window.open('http://xblight.com/store/music/index.php','XBLight Music Player','width=450,height=320,left=400,top=25,screenX=400,screenY=25')\"></li>";
} 	else {
echo "<li><input type=\"image\" src=\"http://xblight.com/store/music/music.gif\" onClick=\"window.open('http://xblight.com/store/music/musicalerror.html','XBLight Music Player (No Access)','width=450,height=320,left=400,top=25,screenX=400,screenY=25')\"></li>";
}  
?>

Can someone explain to me why that code works in everything except for IE?
https://www.xblight.com (click music on the way top)
Works perfectly in firefox and chrome, but im thinkin maybe i missed something and thats why it wont work in iexplore.
alright thanks

XBLight.com - My Pride and Joy.

27 Dec 2008, 12:55 PM
#2
xblight avatar

xblight

New Zenner

Join Date:
Nov 2008
Posts:
11
Plugin Contributions:
0

Re: Damned Internet Explorer! Never works right..

bump, anyone?? im goin crazy over here :blink:

XBLight.com - My Pride and Joy.

27 Dec 2008, 3:02 PM
#3
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Damned Internet Explorer! Never works right..

looking at out put of your store. i get this info.

line 31 refers to your music onclick event , "" Element not empty or not closed "

line 28 , You have <ul class =back > after <div id="navMain"> which is not closed .. there is not </ul> tag before </div>
this might be the reason ??????????

all the javascript code for your music Onclick event is been commented out .. you might want to remove the comments for testing and debugging ..

im using IE 6 .

3 Jan 2009, 1:07 AM
#4
xblight avatar

xblight

New Zenner

Join Date:
Nov 2008
Posts:
11
Plugin Contributions:
0

Re: Damned Internet Explorer! Never works right..

Heres a larger chunk of the code if its relevant. I closed the ul tag but it didnt help. Also its commented out because I dont want a button that is unfunctional to be visible on my live site. Thanks very much for your help though. Here is a larger chunk of my code that I hope someone can diagnose...

<div id="headerWrapper"> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li> <?php } else { if (STORE_STATUS == '0') { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li> <?php } } ?> <?php if ($_SESSION['cart']->count_contents() != 0) { ?> <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li> <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li> <?php }?> <? if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '1') { echo "<li><input type=\"image\" src=\"http://xblight.com/store/images/music.gif\" onClick=\"window.open('http://xblight.com/store/mUsic/index.php','XBLight Music Player','width=450,height=320,left=400,top=25,screenX=400,screenY=25')\"></li>"; } else { echo "<li><input type=\"image\" src=\"http://xblight.com/store/images/music.gif\" onClick=\"window.open('http://xblight.com/store/musicalerror.html','XBLight Music Player (No Access)','width=450,height=320,left=400,top=25,screenX=400,screenY=25')\"></li>"; } ?> <!-- <? if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '1') { echo "<li><input type=\"image\" src=\"http://xblight.com/store/images/video.gif\" onClick=\"window.open('http://xblight.com/store/vIdeo/index.php','XBLight Video Player','width=472,height=465,left=400,top=25,screenX=400,screenY=25')\"></li>"; } else { echo "<li><input type=\"image\" src=\"http://xblight.com/store/images/video.gif\" onClick=\"window.open('http://xblight.com/store/videoerror.html','XBLight Video Player (No Access)','width=472,height=465,left=400,top=25,screenX=400,screenY=25')\"></li>"; } ?> -->
</ul>
</div>

XBLight.com - My Pride and Joy.

3 Jan 2009, 1:37 AM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Damned Internet Explorer! Never works right..

I would take issue with the Coder, not the Browser. :wink:

<div id="navMain"> <ul class="back">
    <li><a href="http://xblight.com/store/">Home</a></li>
            <li><a href="http://xblight.com/store/index.php?main_page=login">Log In</a></li>
                    <input type="image" src="http://xblight.com/store/images/music.gif" onClick="window.open('http://xblight.com/store/musicalerror.html','XBLight Music Player (No Access)','width=450,height=320,left=400,top=25,screenX=400,screenY=25')"><li><input type="image" src="http://xblight.com/store/images/video.gif" onClick="window.open('http://xblight.com/store/videoerror.html','XBLight Video Player (No Access)','width=472,height=465,left=400,top=25,screenX=400,screenY=25')"></li>
</div>

With errors noted in RED, they would be:

  • no closing UL tag
  • INPUT tag not in an LI tag
  • incorrect syntax for closing of INPUT tag
  • Parenthesis's within Parenthesis's which should be escaped

The learning is in the doing.

Potent Products

14 Jan 2009, 8:12 AM
#6
xblight avatar

xblight

New Zenner

Join Date:
Nov 2008
Posts:
11
Plugin Contributions:
0

Re: Damned Internet Explorer! Never works right..

Alright, I just figured it out and I have never felt stupider in my life.
All my code is fine, however....

After hours spent trying to figure it out, and it was as simple as removing the spaces in between the title. Yep, internet explorer apparently likes "ThisIsMyTitle" better than "This Is My Title" when it comes to javascript.

:censored: IE!!!

XBLight.com - My Pride and Joy.