Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asign a value to a hidden field

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
US
Given the following:

<SCRIPT LANGUAGE="JavaScript">
function GetTIPID(){
var newID;
newID = prompt("Enter ID", "ID here");
alert(newID);
document.myform.hiddentip_id.value == newID;
alert(document.myform.hiddentip_id.value);
}
</script>

the last line reveals that the line before it did not work. Is there something wrong with this syntax or method?

Thanks.

 
Assignment (=) vs. Equality (==)


____________ signature below ______________
I am Tedward Keyboardhands!!!
You are a amateur developer until you realize all your code sucks.
Jeff Atwood

 
Thanks. I had started with a simple = but got it changed as I was trying to fix other things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top