Results 1 to 8 of 8

Thread: javascript functions on a mac

  1. #1
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question javascript functions on a mac

    Hi

    I have recently used some javascript functions for a clock and another link which sets the page to a homepage. They work fine in internet explorer and mozilla on a pc, however on a mac in internet explorer 5.1 they don't work. The link is not working and the clock needs a magnifying glass to be seen.

    Can anyone help?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.
    PLEASE: Include the URL to your problematic webpage that you want help with.
    Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Javascript functions on a mac

    Script: add home
    http://www.dynamicdrive.com/dynamicindex9/addhome.htm

    I was wondering if anyone knew if this script should work on internet explorer 5.1 on a Macintosh computer. I have tried, but it doesn't work.

    Should I be adding something else or using a different code?

    I would appreciate any help, Thanks.

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The script uses a feature called 'behaviors' to manipulate the home page. This was never implemented for the Mac platform so no, the script won't work.

    Mike

  5. #5
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there any script which would work on both platforms?

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There may or may not be an alternate method to bookmark the site in IE5 Mac but, that shouldn't stop us from trying to get the clock to display properly or at least bigger on that browser. Also, the code for the bookmark, at the very least, could be disabled for IE Mac preventing the link for it from appearing in that browser and from causing any error/interfering with the other script. To undertake this we still need a link to your page and a link to the clock script demo.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.image-plus.co.uk/buttsparkarena/

    Above is the link to a preview I have set up for a client.

    http://www.image-plus.co.uk/buttsparkarena/liveclock.js

    This is the link to the liveclock script.

    Really appreciate your help!

    Regards,
    Emily.

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I took a look at your page in IE5.01 sp2 for the PC hoping that some of the IE Mac problems would show up. No such luck. Here is a way to block javascript code from IE Mac though:
    Code:
    var agt=navigator.userAgent.toLowerCase();
    if (agt.indexOf('mac')==-1||agt.indexOf("msie")==-1){
    Your code that IE Mac doesn't like goes here
    }
    else {
    Alternative for IE Mac goes here
    }
    Depending upon the situation, you can just leave the red part off if there is nothing you want IE Mac to do. If it is inside of a function and you want IE Mac to stop executing at that point put:

    return;

    I'm not sure how to fix the clock but, using style perhaps. If you can get it looking good in IE Mac using style then you can use the comment hack to show all other browsers a style that works for them:
    Code:
    <style type="text/css">
    
    .clock {
    style for clock in IE Mac goes here
    }
    
    /* begin hiding from IE Mac\*/
    
    .clock {
    style for clock in all other browsers here
    }
    
    /* end hiding */
    </style>
    Hopefully you know enough about css style to see what this will afford you. '.clock' is a class name we can apply to the element containing the clock to get its dimensions, font size, margins, etc. different for IE Mac than other browsers:
    HTML Code:
    <div class="clock">here is where the clock appears</div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •