[thelist] java script and forms

.jeff jeff at members.evolt.org
Thu Jun 7 14:40:53 CDT 2001


: From: Oliver Lockwood
: yeah, I understood that but I don't know how
: to use the url object, I'm really new to
: programming, I've only been looking at
: java script for a few days.

you have to make sure that you have the 8 lines of code i mentioned
previously.  those eight lines of code automatically create the url object
and all the associated properties and their values.

: The way that I've tried is like this :
: document.write = ('<a class="type1">' + url.mfa + '</a>');
: its not working so I'm wondering what to do.

it's not working because of the way you're calling the write() method.  you
should be doing it like this:

document.write('<a class="type1">' + url.mfa + '</a>');

if the url variable "mfa" is found in the query string and has the value
"foo", then the line of script above would output the following html:

<a class="type1">foo</a>

however, if that variable was not found in the query string, then it would
output the following html:

<a class="type1">undefined</a>

holler if you've got more questions.

please remember to trim your posts to thelist.



jeff at members.evolt.org

More information about the thelist mailing list