> var contains to data; but why?
> Posted by: "wadesmart" no_reply%40yahoogroups.com">no_reply
yahoogroups.com wadesmart
> Date: Mon Mar 10, 2008 12:19 am ((PDT))
>
> Im purchased Simply Javascript from Sitepoint and Im working on some
> of these tutorials and none of them are working. I cant what is wrong
> though Im coping right out of the book.
>
> The html page:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
> <head>
> <title>Get Tag By ID</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8" />
> <link rel="stylesheet" type="text/css" href="pg84.css" />
> <script type="text/javascript" src="pg84.js" />
> </head>
>
> <body>
> <a id="koko" href="http://www.koko.com/">Lets all get KOKO!</a>
> </body>
> </html>
>
>
> And here is the script:
> var koko = document.getElementById("koko");
> smart.setAttribute("href", "/GetKoko/");
> smart.setAttribute("title", "Koko sets the title");
I don't see where you've defined any object named smart. Perhaps you
intended koko.setAttribute(...) ...?
>
>
> And the error is:
> koko has no properties
> [Break on this error] smart.setAttribute("href", "/GetKoko/");
>
> Wade
--
This message has not been scanned for viruses.
Since I do not use a Microsoft operating
system or software, and use only plaintext
for email, there is little need for me to do so.
.