Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to delect the changes made in the WebPage...??

    Hi

    how can i know wheather there are any changes done to the page...from the time the page is opened...

    onclick of a Cancel Button....am showing a confirmation alert saying

    " Any changes done to the Screen will not be saved, do you wish to proceed..? "

    i need this alert only when user had made changes....if not i need a different alert msg....


    how can i acheive this..,is ther any simple way....plz..help me.......
    Last edited by murali1983; 02-05-2007 at 06:14 AM.

  • #2
    New Coder
    Join Date
    Jan 2007
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What?
    A user can not change a webpage.

    A user can change the text in a input box or a textarea if ReadOnly is not applied.

    if so use: onChange="function()"

  • #3
    New Coder
    Join Date
    Oct 2006
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i mean my application is web based...and i wanted to detect the changes made in the page..based on which appropiate alert is shown....

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    As tonyp12 said: A user can not change a page, unless you invite and let him to do that in a server-side way mode. He can change locally the appearance of the page (but only for him or only on it's browser) but only if you, as the web designer, let him to do that. So that it looks a nonsense to me to alert " Any changes done to the Screen will not be saved, do you wish to proceed..? ". Either you let the user to do that (by using cookies or submit it's own data, after a registering, to a DB) or you build a simple page which user can not modify it.

    So: what do you really mean by "changing the page"?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #5
    New Coder
    Join Date
    Jan 2007
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Murali, I take it you are none English speaking?

    I don't get what you are asking for?

    I made a javascript application that shows yes/no buttons
    after another button is pressed just to confirm. (hidden>visable)

    If you click on 'any' other button or change any <select> the yes/no buttons goes away

    Is this what you want?
    I simple included 'hideask()' in the first line of every functions
    that is called when any other button is pressed.
    Last edited by tonyp12; 02-05-2007 at 07:25 PM.

  • #6
    Regular Coder
    Join Date
    Sep 2004
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts
    i think what hes trying to convey is:

    -he has a web application
    -currently if ANY changes are made, there is only one default alert
    -he wants the alerts to be "intuitive" to react to certain changes on certain parts of of the application

    am i correct Murali?

  • #7
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by scrupul0us View Post
    i think what hes trying to convey is:

    -he has a web application
    -currently if ANY changes are made, there is only one default alert
    -he wants the alerts to be "intuitive" to react to certain changes on certain parts of of the application

    am i correct Murali?
    What do you (or he) mean by web application, either?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #8
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,855
    Thanks
    22
    Thanked 157 Times in 148 Posts
    Why would you want an alert to pop up every time something changes client side? How annoying is that?

    Generally, I think you should only use alert to "alert" the user that something is wrong or as a warning, not to notify him/her that something has changed...
    Regards, R.J.

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

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :-)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  • #9
    Regular Coder
    Join Date
    Sep 2004
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts
    maybe its validation and he/she wants different alerting based on what is erroneous

    e.g.:

    that is an invalid email address
    that is an invalid telephone number

    instead of just "you have an error"

  • #10
    New Coder
    Join Date
    Oct 2006
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry for my confusing question.....


    i have a web application, currently on click of cancel button there is only one default alert
    please dont get confused with webpage where the user cant change anythin...i am talking about web application.

    in my appln ther's an page in which user enters invoice details like
    amount 1 :
    amount 2 :
    amount 3 :
    and many other information and clicks on the SAVE button...
    now the information he entered is saved in the database, now if the user clicks on the
    CANCEL button i need a alert saying "do you want to cancel the page"

    and after SAVING if he makes some changes and then
    clicks on the
    CANCEL button i need a alert saying "changes have been made, do you want to cancel the page "

    how can i know wheather ther's any change in the page after save...

    i hope u guys understood my question...

  • #11
    New Coder
    Join Date
    Jan 2007
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If I get you correctly.

    A webpage loads with blank boxes to input data.

    User inputs data and clicks save. (alert= data saved)
    Or user can click cancel. (alert= do you want to cancel the page)

    After the Save, the data is still in the boxes
    and the user 'can' change it.

    • If the user clickes save (alert= data saved)
    • user click cancel (alert= do you want to cancel the page)
    • user click cancel after something was changed (alert= changes have been made, do you want to cancel the page)

    Seems to be that you need keep a buffer of the data after it was saved
    and compare it when user clicks cancel.

    or

    you could have each box with a onchange="didchange()"

    function didchange(){
    document.getElementById('cancelbutton').value = 1; // just an easy way to get global variable
    }


    After a save:
    document.getElementById('cancelbutton').value = 0

    And the cancel alert will simple check the value.

    confirm (document.getElementById('cancelbutton').value==1 ? "changes have been made, do you still want to exit the page" : "do you want to exit the page")
    But it will still alert that something changed even if the user change and then later changed back.

    What do you use?, <form> , a link to your web app?, copy the form here for us to see?
    Do you use confirm as the alert?
    To choose OK/Cancel to the question:"do you want to cancel" could be confusing.
    Last edited by tonyp12; 02-06-2007 at 06:52 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •