I have just spent the best part of the last 3 hours trying to figure out why I got a script error (but only in IE, not Firefox) that said there was a missing ";" or semi-colon in the code. I am not familiar with javascript myself so to find the cause of the problem I had employ a process of elimination to isolate that it was NETQUOTEVAR:PRODUCTNAME in the Actinic recommended "email a friend" code that was causing the problem. Deleting it certainly got rid of the problem, however I just could not figure out why. For much of the time I was focusing on the colon within the actinic variable but I came to the conclusion this must be a red herring. I scoured Google results for anything containing reference to colon, semi-colon and javascript error but nothing came through. Eventually when I realised I had been scratching around in a blind alley, the manhole cover sized penny dropped from the great blue sky. I realised that it was the apostrophe I had used in some product names that was causing the issue. Replacing these with single quotation marks (‘ and ’) as appropriate fixed it. The error about the missing semi-colon was generated because the apostrophe in the product name caused an early termination of the script, which in turn meant that the ; was not automatically created at the end of the script line as I have learnt is the case.
Anyway, maybe it was me, but I was amazed to find nothing on this issue in either the knowledge base or the community. I would not want anyone else who shares my limited knowledge of Javascript to fall into the same trap and waste countless hours trying to figure out, hence the post. Hopefully I've put enough keywords in the message to enable an easy find.
Anyway, maybe it was me, but I was amazed to find nothing on this issue in either the knowledge base or the community. I would not want anyone else who shares my limited knowledge of Javascript to fall into the same trap and waste countless hours trying to figure out, hence the post. Hopefully I've put enough keywords in the message to enable an easy find.
Comment