Forum Moderators: open
could you go with this fashezee?
when I saw cfm it was trouble because I have done some but not really very much.
It sounds like you are trying to process the value of the var without actually checking if it has a value first. Would it help if you tested the checkbox fields before you started trying to play with the data.
if they checked this field
process the information
else
continue
or something like that?
I don't know that setting the value to null would do anything, since it isn't passing along the variable that null would be assigned to.
Of course, I could be wrong. ;)
Doesn't Coldfusion have any if statements? Like if(variable_exists) do something?
<edit>Oh, I see that it does. ;)</edit>
<script type="text/javascript">
// set monkey as a string object
var monkey = "ook ook!";
// set a string by way of example
var monkeyshine ="oop";
// set a generic object by way of example
var objMonkey = new Object(69); alert("Right now, monkey is a "+typeof(monkey));
alert("And monkeyshine is a "+typeof(monkeyshine));
alert("While objMonkey is an "+typeof(objMonkey));
// now we set monkey to null
monkey = null;
alert("Having changed monkey to null, it is now an "+typeof(monkey)); try {
alert("Now we look at constructors. The constructor of monkeyshine is:"+monkeyshine.constructor);
alert("The constructor of objMonkey is:"+objMonkey.constructor);
// the following won't execute, because monkey is a null object with no properties
alert("The constructor of monkey is:"+monkey.constructor);
}
catch(e) {
alert("However, because it is set to null, monkey threw an exception error, namely: "+e.message);
}
finally {
alert("Whew! That's done");
}
</script>
if you are talking about IE then either temp.value or temp.myproperty or temp.I_like_blue all have are == to "100". but if you want the script to work with other browsers, stick to the normal properties of the tag IE
<input name="temp" type="hidden" value="100"> which are fully scriptable.