Correction..my code is this...

echo "<p>Street Number:<input type='text' name='txtStreetNumber'
value='$streetnumber' size='20' onchange='if(this.value !=
'txtStreetNumber') document.getElementById('chnge').style.display=''; else
document.getElementById('chnge').style.display='none';'>
<span id='chnge' style='display:none;'>VALUE CHANGED</span>";

I keep getting an error message in my javascript. If anyone has a better
suggestion for a dirty event, please let me know.

Grant

On Tue, Mar 23, 2010 at 10:32 PM, Grant <[email protected]> wrote:

> Thank you, but I'm sorry. I don't understand your correction.
>
> Here is my code.
>
> echo "<p>Street Number:<input type='text' name='txtStreetNumber'
> value='$streetnumber' size='20' onchange='if(this.value != '$MLSNumber')
> document.getElementById('chnge').style.display=''; else
> document.getElementById('chnge').style.display='none';'>
> <span id='chnge' style='display:none;'>VALUE CHANGED</span>";
> Thanks,
> Grant
>   On Tue, Mar 23, 2010 at 10:12 PM, birgunj birgunj <
> [email protected]> wrote:
>
>>
>>
>> in javascript user
>>
>> this.value !=''aaaaaaaa'
>>
>> --- On Tue, 3/23/10, Grant <[email protected] <gspollet%40gmail.com>>
>> wrote:
>>
>> From: Grant <[email protected] <gspollet%40gmail.com>>
>> Subject: Re: [php_mysql] How to read value in edited text
>> To: [email protected] <php_mysql%40yahoogroups.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 <
>> [email protected] <greg.smith%40uksites4all.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]
>>
>>  
>>
>
>
>
>  --
> Grant S. Pollet, REALTOR
> Austin TX
>



-- 
Grant S. Pollet, REALTOR
Austin TX


[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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/php_mysql/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to