PDA

View Full Version : website errors


billys24
02-03-2003, 04:05 AM
Ok. this is the error message I get on my IE when I visit my page.

Line:what ever link I have visited from my page
CHAR 1
ERROR: '_blank' is undefined
Code 0
URL http://members.shaw.ca/deniselewis/nvcclinks.html

This is the code I use to create the links

<td class="linkcell" align="center" bgColor="#AABAC2"
onmouseover="this.bgColor='AABAC2'; this.style.pixelTop=3; this.style.pixelLeft=-2"
onmouseout="this.bgColor='AABAC2'; this.style.pixelTop=0; this.style.pixelLeft=0"
onClick="_blank.location.href ='http://www.aboriginalcanada.gc.ca/'">
<a href="http://www.aboriginalcanada.gc.ca/" target="_blank">Aboriginal
Canada Portal</a></td>


My question is what exactly is it I need to change. Another odd thing is the error messages appear in bottom left hand corner AFTER I have visited a link from that page. Also the line number corresponds with that specific link I visited. Am I making any sense? TY much in advance for any help I can get!


The address for the problem area
http://members.shaw.ca/deniselewis/nvcclinks.html

Address for my site
http://www.northvancanoeclub.com

<htmlite>
02-03-2003, 09:00 AM
I think this is the one that it is having a problem with. I'm no javascript expert though, so I don't have a fix right now...

onClick="_blank.location.href

scoutt
02-03-2003, 12:09 PM
yup, change that to document and it should work.

billys24
02-03-2003, 03:40 PM
Change to document? Can you give me the example please? Im slow lol. Do you mean change_blank to document.location.href etc.
I love the AV by the way Scoutt
Also I noticed the post said "MOVED" and I cant see how many views and replies there are to this thread.

giz
02-03-2003, 03:49 PM
Two lonely </font> tags in the code: See this [link (http://validator.w3.org/check?uri=http%3A%2F%2Fmembers.shaw.ca%2Fdeniselewis%2Fnvcclinks.html&doctype=HTML+4.01+Transitional&charset=iso-8859-1+%28Western+Europe%29&ss=1&outline=1&sp=1)] for details.

billys24
02-03-2003, 03:56 PM
I have changed the lonely fonts tee hee. Just need help with the _blank.... needs to be changed Im not sure to what though.

scoutt
02-03-2003, 04:09 PM
yes I moved this to the client side forum, an dyou can view the posts and views there.

and yes change _blank to document

onClick="document.location.href

or

onClick="window.location.href

billys24
02-03-2003, 04:18 PM
AHHH TY very much!. Sorry for posting in the wrong section. Appreciate the help!!

billys24
02-19-2003, 04:19 PM
Hi there. I found when I used this following code to get my links to open in a new window it opened up in the same window:

onClick="window.location.href

So instead at the bottom of my links page I changed a few of the codes for canucks..com to



onClick="resource window.location.href ='http://www.canucks.com'"><a href="http://www.canucks.com" target="_blank">Canucks
</a></td>

this worked and I no longer got the error messages.

the following page has my corrections. Its the last 2 links that have the corrections the rest I have no got around to correcting.

http://members.shaw.ca/deniselewis/nvcclinks.html

scoutt
02-19-2003, 04:47 PM
I get errors messages. on line 379. also you still have _blank.window.location in that page and this

onClick="resource window.location

is invalid I believe. resources is not doing anything for that.

billys24
02-19-2003, 05:04 PM
Ok this irks me then. WHat code can I put on the onClick part to ensure the links still open up in a new window? WHen I put window.location it would open up in that same frame. I still want all the links to open up in a new window. I havent changed any of the _blank.location yet. I am experimenting with the last two links on the page till I get the right code lol. Thnx in advance for any help!

scoutt
02-19-2003, 05:08 PM
if all you want is a blank window to open up when they click on the image then just use the target in the link

<a href="link.html" target="_blank">

that is all you need, no need fo rthe onclick stuff

agent002
02-20-2003, 06:53 AM
scoutt: you seem to be the first one who offers a way that works, and opens the site in a new window, but that's not the solution anyway since this it's needed in an onClick action and should look like this:

onClick="window.open('page.html','_blank');"

scoutt
02-20-2003, 09:12 AM
but why have an onClick when you have a link?

billys24
02-20-2003, 01:05 PM
I removed the onClick command and it doesnt work now a link wont open. Ill leave an example on the canucks link.

http://members.shaw.ca/deniselewis/nvcclinks.html

scoutt
02-20-2003, 01:37 PM
that is becasue you forgot to close the table.

<td class="linkcell" align="center" bgColor="#AABAC2"
onmouseover="this.bgColor='AABAC2'; this.style.pixelTop=3; this.style.pixelLeft=-2"
onmouseout="this.bgColor='AABAC2'; this.style.pixelTop=0; this.style.pixelLeft=0"
<a href="http://www.canucks.com" target="_blank">Canucks</a></td>

should be

<td class="linkcell" align="center" bgColor="#AABAC2"
onmouseover="this.bgColor='AABAC2'; this.style.pixelTop=3; this.style.pixelLeft=-2"
onmouseout="this.bgColor='AABAC2'; this.style.pixelTop=0; this.style.pixelLeft=0">
<a href="http://www.canucks.com" target="_blank">Canucks</a></td>

billys24
02-20-2003, 01:42 PM
It worked TY!!!