PDA

View Full Version : Strange error message


greentra
05-24-2006, 10:58 AM
Hi all,
I have a strange error messaged that appears on every one of my pages. It doesn't stop the page from loading or running, but I'd like to remove the error if at all possible as I'm sure it will cause problems on someone's pc somewhere.
The error is: Cannot assign to '[object]'
It points to a line that is perfect in every sense.
I recently added a javascript function to my template - and I'm guessing thats where the problem stems from but the error message doesn't point to any javascript.
Anyone had a similar experience? Or any suggestion?
Thanks, Travis

Creative Insanity
05-24-2006, 07:40 PM
code, my crystal ball is busted.

greentra
05-25-2006, 02:39 PM
well there is a fair amount of it . . . not sure anyone cares enough to go through 1000 lines+ of code. Anyway, I finally resolved the problem. Dreamweaver inserted some Javascript into my, essentially, VBScript page, when I selected the 'onclick - goto href' function. I used this function because I wanted to make normal text a clickable ref (ie without the underline) and this function did just that. I also found after looking into it, a site that explained how to do this using CSS. You just select no decorations in the CSS and it removed the underline from the hyperlink.
So I removed the Javascript from the code and the erros have gone. Don't know specifically what the problem was with the code, but for anyone else with a similar problem hope this points you in the right direction.

domedia
05-25-2006, 03:02 PM
hiya gerentra,
Good you found a solution. Normally you want to build your page by 3 protocols, and make sure each do what they are intended to do, even though one of the others can do it (like your example of using js to remove underlines).
1. HTML for structure
2. CSS for Style
3. JS for manipulating the document

Come back with any other problems you get, it takes some time to get used to what technology to use for what problem :)

greentra
05-26-2006, 01:33 PM
Thanks for the advice. Good to know I am doing something right - although I use VB instead of java. Actually, thats a good idea for my next thread - JS vs VBScript. I have a feeling JS is preferable but would like to know why - in practical terms

domedia
05-26-2006, 04:36 PM
easy.. javascript is a common web standard, vbscript is not ;)