Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 11:57 am (All times are UTC )

 


Forum rules

Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 13 posts ] 
Author Message
Posted: Fri Mar 07, 2008 3:26 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
I'm trying to use conditional for comment IE. I would like for IE to get a static image in the top div and for all other browsers to load the javascript. Any ideas what i'm doing wrong here? It's working in safari but nothing else..

Code:
<body>
<!--Beginn Tabelle Wrapper -->
<table cellpadding="0" cellspacing="0" height="100%" border="0" align="center" id="wrapper">
  <tr>
    <td  align="left" valign="top" class="col_left">
   <div id="div_top">
   <!--[if! ie]><img src="templates/jp_12_2007_dirtystyle/images/header_2.jpg" align="center" width="560" height="140"><![endif]>
   <!--[if! ie]><!-->
   <script type="text/javascript">
   //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 560, 140, 0, 7000, 0)
   </script>
   <![endif]-->
</div>
      <div id="div_main"><?php mosMainBody(); ?></div>
     <div id="div_footer"><?php if (mosCountModules('banner')>0) mosLoadModules('banner',0); ?></div>
    

    </td>
    <td  align="left" valign="top" class="col_right">
    <div id="div_right"><?php if (mosCountModules('right')>0) mosLoadModules('right',0); ?></div>

   
   </td>
  </tr>
</table>
</body>


Last edited by mustardstache on Tue Mar 11, 2008 3:37 pm, edited 1 time in total.

Top
   
 
Posted: Fri Mar 07, 2008 3:31 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Feb 06, 2007 3:40 pm
Posts: 172
<!--[if! ie]><img src="templates/jp_12_2007_dirtystyle/images/header_2.jpg" align="center" width="560" height="140"><![endif]-->

The end statement is missing the two dash lines.


Top
  E-mail  
 
Posted: Fri Mar 07, 2008 4:38 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
Thanks, That helped a lot. The Javascript now works in every other browser and Explorer is ignoring the Javascript but the static image is not being displayed in explorer. Could there be anything else wrong?


Top
   
 
Posted: Fri Mar 07, 2008 5:19 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Feb 06, 2007 3:40 pm
Posts: 172
mustardstache wrote:
Thanks, That helped a lot. The Javascript now works in every other browser and Explorer is ignoring the Javascript but the static image is not being displayed in explorer. Could there be anything else wrong?


Post the code again because when I looked at your old code, I noticed you had those dashes located after the end statment. See the next [if IE] statement you may see what I am talking about.


Top
  E-mail  
 
Posted: Fri Mar 07, 2008 6:30 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
this is what I have now
Code:
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/layout.css" rel="stylesheet"  type="text/css" />
<link href="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css.css" rel="stylesheet"  type="text/css" />
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/<?php echo $mainframe->getTemplate(); ?>/images/slideshow.js"></script>

<head>
<?php mosShowHead(); ?>
<?php if ( $my->id ) { initEditor(); } ?>



</head>
<body>
<!--Beginn Tabelle Wrapper -->
<table cellpadding="0" cellspacing="0" height="100%" border="0" align="center" id="wrapper">
  <tr>
    <td  align="left" valign="top" class="col_left">
   <div id="div_top">
   <!--[if! ie]>
   <img src="images/header_2.jpg" align="center" width="560" height="140">
   <![endif]-->
   <!--[if! ie]><!-->
   <script type="text/javascript">
   //new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 560, 140, 0, 7000, 0)
   </script>
   <![endif]-->
   </div>
      <div id="div_main"><?php mosMainBody(); ?></div>
     <div id="div_footer"><?php if (mosCountModules('banner')>0) mosLoadModules('banner',0); ?></div>
    

    </td>
    <td  align="left" valign="top" class="col_right">
    <div id="div_right"><?php if (mosCountModules('right')>0) mosLoadModules('right',0); ?></div>

   
   </td>
  </tr>
</table>
</body>
</html>


Top
   
 
Posted: Fri Mar 07, 2008 6:54 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Feb 06, 2007 3:40 pm
Posts: 172
Look for this line:

<!--[if! ie]><!-->

and remove the <!--> from the end of it.


Top
  E-mail  
 
Posted: Fri Mar 07, 2008 7:08 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
I don't want IE to see that javascript. I read in a different article that the <!--> after will make ie not view that line. That part of the code is working. All other browsers are using the javascript and IE is not. The problem I am having is that the conditional comment to embed a static image is not working.
this is the problem code;
Code:
<!--[if! ie]><img src="templates/jp_12_2007_dirtystyle/images/header_2.jpg" align="center" width="560" height="140"><![endif]>


Top
   
 
Posted: Fri Mar 07, 2008 7:38 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Feb 06, 2007 3:40 pm
Posts: 172
Quote:
<!--[if! ie]>
<img src="images/header_2.jpg" align="center" width="560" height="140">
<![endif]-->
<!--[if! ie]><!-->
<script type="text/javascript">
//new fadeshow(IMAGES_ARRAY_NAME, slideshow_width, slideshow_height, borderwidth, delay, pause (0=no, 1=yes), optionalRandomOrder)
new fadeshow(fadeimages, 560, 140, 0, 7000, 0)
</script>
<![endif]-->


The above in bold don't belong.


Top
  E-mail  
 
Posted: Fri Mar 07, 2008 8:49 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
That did not help. The script is now not in any browser. Is there a different way to hide the script from IE besides the way I was doing it with the <!--> that you told me to remove?


Top
   
 
Posted: Fri Mar 07, 2008 10:00 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Feb 06, 2007 3:40 pm
Posts: 172
mustardstache wrote:
That did not help. The script is now not in any browser. Is there a different way to hide the script from IE besides the way I was doing it with the <!--> that you told me to remove?

My apologies. I see what you are trying to do but I can't think right off hand if this method works or not.

Do you have a url for us to look at that has this problem?

EDIT: Just a thought but have you tried switching the image code and script code to read the script first and then the image?


Top
  E-mail  
 
Posted: Fri Mar 07, 2008 11:51 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 04, 2008 1:20 am
Posts: 18
Success! switching them around made it work. Thanks so much for your help!! :D
see for yourself; http://www.phillyrollerderby.com


Top
   
 
Posted: Tue Jul 07, 2009 3:53 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jul 07, 2009 3:06 pm
Posts: 8
Just what I was looking for! Thank you!!

_________________
My dog has it's own website at: http://www.hundefeber.no


Top
  E-mail  
 
Posted: Tue Jul 07, 2009 4:01 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jul 07, 2009 3:56 pm
Posts: 6
Nice sharing! That helped a lot! I'm experiencing the same problem with the Pensjon section on this website - but the problems seems to have reduced by almost 90 % :-)

Strangely the error is not showing on the other sections and therefore I was a bit confused..

_________________
Norwegian senior magazine with more than 400.000 readers http://viover60.no is now using Joomla!


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

Quick reply

 



Who is online

Users browsing this forum: _prakash, coral27, yue and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group