Results 1 to 3 of 3

Thread: function not executed in Chrome

  1. #1
    Join Date
    Nov 2005
    Bundanoon: first village to ban bottled water

    function not executed in Chrome

    I'm re-posting a page coded in 2006, pre-Chrome: it's appropriate to leave the code in its primitive state, as it's an obit.

    However, I cannot get a series of fades to fire in Chrome. I've tried them inline, called by a <p> tag or by an <a> tag; and as a function, also called by a <p> tag or by an <a> tag. None works. Any of them works in Firefox and iE and Safari.

    Whichever tag is used fires both an mp3 and the fades:

    <p id="cortege" title=" Sonata in F minor, K 466 : Domenico Scarlatti (1675-1757) " onclick="embrace();">
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="130" height="20">
    <param name="src" value="cortege1.mp3" />
    <param name="controller" value="true" />
    <param name="autoplay" value="false" />
    <!--[if !IE]>-->
    <object type="audio/mpeg" data="cortege1.mp3" width="130" height="20">
    <param name="autoplay" value="false" />
    <param name="controller" value="true" />

    Maybe the problem is with the code underlying the fades,which is pre-Chrome:

    function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";

    which is used in
    function embrace() {
    setTimeout('opacity(\'mado1\', 99, 0, 9000)', 16000);
    setTimeout('opacity(\'mado2\', 99, 0, 18000)', 32000);
    setTimeout('opacity(\'mado3\', 99, 0, 9000)', 64000);
    setTimeout('opacity(\'mado4\', 99, 0, 3000)', 108000);
    return false;

    Any suggestions? I'd prefer not to recode the page with jQuery.
    Last edited by ctoz; 03-29-2013 at 07:13 AM.

  2. #2
    Join Date
    Mar 2007
    Any console errors? Where is your opacity function?
    Where used, return should be executed unconditionally and always as the last statement in the function.

    That's my signature, it's not part of the damn post!

  3. #3
    Join Date
    Nov 2005
    Bundanoon: first village to ban bottled water
    Where is your opacity function?
    all functions are in the head section,but I've also tried them directly on the link.

    No error message.

    I'm jQuerying it, at least partly. Not to worry.
    Last edited by ctoz; 03-30-2013 at 05:03 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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