in javascript user

this.value !=''aaaaaaaa'

--- On Tue, 3/23/10, Grant <gspol...@gmail.com> wrote:

From: Grant <gspol...@gmail.com>
Subject: Re: [php_mysql] How to read value in edited text
To: php_mysql@yahoogroups.com
Date: Tuesday, March 23, 2010, 8:20 AM

Hello,

How do I read the value from an edited input text? I know how to make the
text input retrieve the value from a Mysql database.

<p>Street Number:<input type='text' name='txtStreetNumber'
value='$streetnumber' size='20' onfocus='changeColorOnFocus(this)'
onblur='changeColorOffFocus(this)'></p>

This would display a text field such as:
Street Number: [ Text box is here]

However, how can my form identify when the text input has been altered? I
believe this is considered a "dirty" event. My goal is to print a short
message next to the text box that says "Value changed" so that the user can
know which fields were changed BEFORE he hits submit to run the Update
query. This would allow any mistakes to be canceled. Ideally, I'd like some
some of event to also identify when a form was changed and not saved BEFORE
leaving the current page.

For example:
Street Number; [Text box is here] "Value changed!"

I simply want to use an If Statement to compare the current value to the new
value.

if (txtStreetNumber != ????????)
{ echo "Value changed";}

I found javascript online, but none of it seems to work. I also tried the
"onchange" event since it can recognize when a field is changed and loses
focus. But that also does not seem to work, and I've never used this event
before.

Thanks,
Grant

On Fri, Mar 19, 2010 at 6:21 AM, webmaster_bmw <greg.sm...@uksites4all.co.uk
> wrote:

>
>
> No posts since October 2009....
>
> Anyone out there?
>
> 
>


[Non-text portions of this message have been removed]



------------------------------------

The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning. Yahoo! Groups Links






      

[Non-text portions of this message have been removed]

Reply via email to