Thank you! I'll be sure to try this as soon as I can.

Grant

On Tue, Mar 23, 2010 at 1:01 PM, Shahu <shaha...@gmail.com> wrote:

>
>
> hi,
> check this one. very basic javascript.
>
>
> <p>Street Number:<input type='text' name='txtStreetNumber'
> value='$streetnumber' size='20'
> onchange="if(this.value!='<?=$streetnumber?>')
> document.getElementById('chnge').style.display=''; else
> document.getElementById('chnge').style.display='none';"> <span id="chnge"
> style="display:none;">VALUE CHANGED</span>
> regards,
> shahu.
>
> On Tue, Mar 23, 2010 at 8:50 PM, Grant 
> <gspol...@gmail.com<gspollet%40gmail.com>>
> wrote:
>
> > 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 <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
> >
> >
> >
> >
>
> --
> http://phpinterviewanswers.blogspot.com/
>
> [Non-text portions of this message have been removed]
>
>  
>



-


[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:
    php_mysql-dig...@yahoogroups.com 
    php_mysql-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    php_mysql-unsubscr...@yahoogroups.com

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

Reply via email to