Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    script error can't Identify any thoughts

    I use a web design program that is old and cheap but very easy to use. I then import into Adobe Golive to add features my cheap program can't do.
    I do this because I am still learning the adobe program.
    I recently developed a web page and I am getting javscript errors on the code that adobe created.
    When I compare the code between the two programs the only thing that looks different is this one particular line.
    Cheap Program Reads " return; if (img && imv)
    Adobe Program Reads " return; if (img&amp&imv)

    Since they are different in only that one spot I am thinking this is the cause.
    I tried searching (Amp, & ) on this forum with no luck. I tried search yahoo with no luck, so I am still in need of help.

    Any help would be great! And thank you for your time an help.
    Jason

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Yeah, change those amps to real amps. Those are html entities for the ampersand sign.
    It "helpfully" changed your text code to html and confuzzled itself. Gotta love IDEs...*ahem*

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I went on the web and found out how to change them to real amps. I think!
    " return; if (img&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp};&{amp };&{amp};&{amp};&{amp};&{amp};imv)
    However I still get two errors. after I changed those amp lines.
    Line 123 syntex error
    Line 32 Object expected

    Below is the oringinal java script that is in my HTML page.

    <SCRIPT LANGUAGE="JavaScript1.2"><!--//
    IDP.my=(window.parent.frames.length &amp;amp;amp;amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp;amp;amp;amp; parent.MyFrm)?parent.MyFrm:window;
    IDP[1]=(V5)?'document.getElementById(\'A16\').style.color'IE)?'A16.style.color':'document.E16.document.linkColor';
    IDP[2]=(V5)?'document.getElementById(\'A6\').style.color'IE)?'A6.style.color':'document.E6.document.linkColor';
    IDP[3]=(V5)?'document.getElementById(\'A2\').style.color'IE)?'A2.style.color':'document.E2.document.linkColor';

    function OnOver(snd,txc,txv,img,imv,ref,flag)
    { if(!isOvr) return;
    if(!V4) return;
    if(typeof(IDP.my.location.href)!='string') return;
    if(img &amp;amp;amp;amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp;amp;amp;amp; imv)
    { if(flag)
    { if(ref)
    { imv.pos=1;
    if(IDP.my.location.href.lastIndexOf(ref) >= 0) imv.pos=imv.max;
    --imv.pos;
    }
    if(++imv.pos > imv.max) imv.pos=(imv.max)?1:0;
    eval(img+'="'+imv[imv.pos].src+'"');
    }else
    { eval( img+'="'+imv[0].src+'"' );
    }
    }
    if(txc)
    { if(flag)
    { if(!txv) txv=document.linkColor;
    if(ref && (IDP.my.location.href.lastIndexOf(ref) >= 0)) txv=document.vlinkColor;
    }else
    if(!txv) txv=document.alinkColor;
    eval(txc+'="'+txv+'"');
    }
    }
    function OnLoad()
    {
    if(IE) E19.style.filter=' dropshadow(color=#faba25,offx=2,offy=2)';
    if(IE) E18.style.filter=' dropshadow(color=#faba25,offx=1,offy=1)';
    if(IE) E17.style.filter=' dropshadow(color=#faba25,offx=1,offy=1)';
    isOvr=1;
    if(IE) E16.style.filter=' dropshadow(color=#faba25,offx=1,offy=1)';
    if(IE) E6.style.filter=' shadow(color=#faba25,direction=134)';
    if(IE) E2.style.filter=' shadow(color=#faba25,direction=134)';
    }
    //--></SCRIPT>

    </HTML>


    So now I am not sure what I am doing wrong unless I still don't have the real amps correct.

    If any one can see what I am doing wrong, please if you could provide me some direect I can continue to stumble with this.

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    No, no.

    Javascript needs && to be the "and" operator.

    if (this && that)

    Replace any &amp; in code with &.

    IOW, change it back to what it was.
    if (img && imv)

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #5
    New to the CF scene
    Join Date
    Aug 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thank you!

    Thank you. I understand now. I corrected and no more errors. Now maybe Yahoo will be a little more kind to me.
    I noticed you do Freelance work. Are you registered with elance.com? I will be starting a new project that's way over my head and I will be looking for help when the project becomes live. Below are the areas I will need help with.

    1. Identity verification through authentication Via - email, IP addresses and DNS.
    2. Contruction of a website database from info furnished on Excel spreadsheet.
    3. Application programming Ex. create application that will take selected type place it into a created templete, then execute a PDF of file and mail file to a specific vendor.

    If this isn't something you would be interested in quoting down the road, Would you know anyone that you can refer that is talented in those areas?
    Again, Thank you for your help.
    Jason

  • #6
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    You're welcome!

    I do freelance, but not usually full projects. Plenty of people do that (see Elance LOL) and I don't have time to compete (already work full-time).
    I help other coders. For example, freelancers contact me to do one page of code they don't know how to do. Or someone needs one tag library or component to use in their library. Or a newbie needs me to make one page for them they can't figure out how to do and explain it all. Stuff like that.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

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