1. #1
    Sencha Premium Member
    Join Date
    Jan 2008
    Posts
    109
    Vote Rating
    8
    KajaSheen is on a distinguished road

      0  

    Default Check if form is dirty, when navigating to another page

    Check if form is dirty, when navigating to another page


    I have a page which has a grid and the possibility to edit records of this grid via forms. Now if the user tries to close the form I already check if it is dirty and ask if the user wants to save the changes. But now there is the possibility to navigate to a new href and I was wondering if there is an event (onbeforeunload?) I could bind the form to, which checks if the form is dirty before allowing to navigate to the new href?

    Or any other advise how to check if the form still has to be saved?

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,264
    Vote Rating
    80
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Going to another page via href in a <a> element is the same as if the user entered the url in the address input of the browser.

    One solution could be JS code in the <a>'s onclick which checks if there is dirty data in the page allowing or rejecting the navigation.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi