Gavin Newsom - Debt Consolidation - Debt Consolidation - Debt Consolidation - Debt Consolidation

PDA

View Full Version : value of text field


moiseszaragoza
Dec 17th 2008, 9:02 am
Hi,
I am having a problem in getting the value of a particualr field element.

i have a function that gets the field name but i want to get the value.






function playText(message)
{
var message;
// message = Field name


newMessage=productform.RestaurantNamePhonetic.value; // this gives a error
alert(newMessage); // display the value of the text field
}

farad
Dec 17th 2008, 10:36 am
<script type="text/javascript">
function getText {
alert(document.productform.RestaurantNamePhonetic.value); }
</script>