@fredmvJan 09.2004 — #We would have to see the HTML form as well as the rest of your JavaScript to accurately help you out. However, it's most likely one of two things:[list=1]
[*]You're trying to print the literal string "id" into the form element but you didn't quote it so JavaScript is trying to find a variable by that name, which doesn't exist, and thus you're getting that error.
If you use: document.idform.id.value = id;[/QUOTE]you'll need a form in your document with the name "idform" and a formfield with the name "id". You will also need to declare the variable called id and assign avalue to it...
Cheers - Pit
edit: something quite normal - fredmv is very fast (and accurate) ?
@clairec666Jan 09.2004 — #Shouldn't everyone use brackets after if/else statements to avoid confusion? And indent the text when they open/close a brakets so you can see what part of the code is contained in a function/if statement etc.? I think dreamweaver does this for you, so you can find a way around your code easier (one reason for using dreamweaver and other coding tools)
Still not working, it says= "id;" object not found. When I don't put it in a function (I inserted it into a function to load in the body handler) there is no problem.
The whole script has to be inserted in the head of my masterscript but document.idform.id.value = id; only in one snippet. Thatswhy I wanted to call document.idform.id.value = id; only in this snippet using the body handler.