Hi elAdi,
I hope this helps:

if($('slidedown_share').style.display == 'none'){
...
instead of

if(slidedown_share.style.display == 'none'){

Something else, document.getElementById('element_id') === $('element_id')

regards
Jason

On 12/18/08, elAdi <adrian.wag...@cbs.curtin.edu.au> wrote:
>
> Hi,
>
> This should be fairly simple - but I seem to miss something basic
> here. I have the following code that works fine in IE, but Firefox
> does not do anything at all.
>
> The FireBug says, that the element 'slidedown_share' is not defined -
> but as far as I'm concerned, that is not the case (plus IE doesn't
> seem to have an issue finding that element).
>
> <!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";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <script src="js/prototype.js" type="text/javascript"></script>
> <script src="js/scriptaculous.js" type="text/javascript"></script>
> <script language="javascript" type="text/javascript">
> function swap() {
>     if (slidedown_share.style.display == "none") {
>         document.getElementById( "share_expand" ).src="images/
> share_collapse.gif";
>               Effect.SlideDown('slidedown_share')
>     } else {
>         document.getElementById( "share_expand" ).src="images/
> share_expand.gif";
>               Effect.SlideUp('slidedown_share')
>     }
> }
> </script>
> <title>Untitled Document</title>
> </head>
>
> <body>
> <div>
>       <a href="#" onclick="swap();">Test</a><img id="share_expand"
> src="images/share_expand.gif" onclick="swap();" />
> </div>
> <div id="slidedown_share" style="display:none; width:113px; height:
> 147px; background:#f4f2e6; border-left: solid #000 1px; border-right:
> solid #000 1px; border-bottom: solid #000 1px; text-align:left;
> padding:0;">
>   <div style="padding: 6px 10px 9px 10px; font:Verdana, Arial,
> Helvetica, sans-serif; font-size:9px; line-height:12px">
>     a<br />
>     b<br />
>     c<br />
>     d<br />
>     e<br />
>     f<br />
>     g<br />
>   </div>
> </div>
>
> </body>
> </html>
>
> Would be great if somebody could point out the (most likely) stupid
> oversight that I'm making.
>
> Thank you in advance.
>
> Adrian
>
> >
>

-- 
Sent from Gmail for mobile | mobile.google.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to