It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

value of text field

value of text field

Postby moiseszaragoza on Wed Dec 17, 2008 4:59 pm

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.



[PHP]


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
}

[/PHP]
moiseszaragoza
 
Posts: 5
Joined: Wed Mar 14, 2007 4:58 pm

Re: value of text field

Postby rangana on Thu Dec 18, 2008 3:51 am

This part is missing:
Code: Select all
productform.RestaurantNamePhonetic.value


...you might meant:
Code: Select all
document.productform.RestaurantNamePhonetic.value


I'm assumiong the the name of your form is productform and the name of the textbox to which you are wanting to get the value is RestaurantNamePhonetic.

If problem still occurs, please provide a link to your page, or a markup for us to play with.

Hope that helps.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 4 guests