View Full Version : script error can't Identify any thoughts

08-15-2005, 08:23 PM
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.

08-15-2005, 08:33 PM
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*

08-16-2005, 02:37 AM
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.l inkColor';
IDP[2]=(V5)?'document.getElementById(\'A6\').style.color':(IE)?'A6.style.color':'document.E6.document.link Color';
IDP[3]=(V5)?'document.getElementById(\'A2\').style.color':(IE)?'A2.style.color':'document.E2.document.link Color';

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;
if(++imv.pos > imv.max) imv.pos=(imv.max)?1:0;
{ eval( img+'="'+imv[0].src+'"' );
{ if(flag)
{ if(!txv) txv=document.linkColor;
if(ref && (IDP.my.location.href.lastIndexOf(ref) >= 0)) txv=document.vlinkColor;
if(!txv) txv=document.alinkColor;
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)';
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)';


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.

08-16-2005, 03:41 PM
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)

08-16-2005, 09:40 PM
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.

08-16-2005, 11:39 PM
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.