tag:blogger.com,1999:blog-6363924398907149830.post1849045605017507929..comments2023-10-20T07:30:15.119-05:00Comments on Doug Gault's Blog...: Warning a user that the form has changed - Tabular Form Style.Doug Gaulthttp://www.blogger.com/profile/16786329323466667017noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-6363924398907149830.post-60341698433695582472016-04-06T08:37:53.601-05:002016-04-06T08:37:53.601-05:00Nivetha,
You are correct that the pagination ite...Nivetha, <br /><br />You are correct that the pagination items (rendered automatically by APEX) don't have an ID, but they do have CSS Classes you can use to identify them. You should be able to use JavaScript to attach an "onclick" event listener to the NEXT and PREVIOUS anchor tags. <br /><br />Hope this helps.<br />Doug Gaulthttps://www.blogger.com/profile/16786329323466667017noreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-48554417089316992492016-04-05T23:42:08.106-05:002016-04-05T23:42:08.106-05:00Hi Doug,
Thanks for the suggestion.
As you sugges...Hi Doug,<br /><br />Thanks for the suggestion.<br />As you suggested, I have created my own JQUERY modal dialog alert with my own message and buttons and its working perfect.<br />The problem is, this alert has to pop up on click of Next and Previous buttons in the tabular form pagination.There is no ID for these buttons.<br /><br />Is there anyway to call these buttons for On Click action?<br />Iam using APEX 5<br /><br />Thanks.<br />Regards,<br /><br />Nivetha.Nivethanoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-79864032407961262082016-04-04T09:51:13.489-05:002016-04-04T09:51:13.489-05:00Nivetha,
Let me address your questions 1 by 1.
...Nivetha, <br /><br />Let me address your questions 1 by 1.<br /><br /><i>1. Confirm Navigation must be changed to "Unsaved Data"</i><br /><br />This is actually an artifact of the browser you are using. Because of the message you're getting, I can tell you're using CHROME, but if you were to run this in FireFox, there would be no heading message. <br /><br /><i>2. Message Content needs to be changed.</i><br /><br />The message content is set in the onChangeinit function. You can see and change it there.<br /><br /><i>3."Prevent this page from creating additional dialog" check box must not come</i><br /><i>4."Leave this page", "Stay on this page" button names should be modified.</i><br /><br />Both 3 and 4 are also artifacts of the browser and cannot be changed.<br /><br /><br />If you want to take things into your own hands, you could try to create your own JQUERY modal dialog instead of using the browser defaults. This would make things a bit more complicated but you then would have full control over the look/feel and the verbiage used in the window and the buttons.<br /><br />Hope this helped.<br /><br /><br />Doug Gaulthttps://www.blogger.com/profile/16786329323466667017noreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-2663594144316020192016-04-04T06:14:31.789-05:002016-04-04T06:14:31.789-05:00Hi Doug,
The post is very much helpful. Thank you....Hi Doug,<br />The post is very much helpful. Thank you.<br />Its working perfectly now,but I need to change the message and header name in the pop-up box, also the color of the box.<br />i.e. I have the following requirements:<br /><br />1.Confirm Navigation must be changed to "Unsaved Data"<br />2.Message Content needs to be changed.<br />3."Prevent this page from creating additional dialog" check box must not come<br />4."Leave this page", "Stay on this page" button names should be modified.<br /><br />Is there any possible way to achieve this?<br /><br />Thanks in Advance.<br />Regards,<br />Nivetha<br />Nivethanoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-4825015629363859542015-08-31T03:37:40.035-05:002015-08-31T03:37:40.035-05:00thnx Doug!
still a helpfull post in 2015 and apex5...thnx Doug!<br />still a helpfull post in 2015 and apex5 )<br />kind regards,<br /><br />Ron.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-20316456138732472972015-06-24T05:29:59.325-05:002015-06-24T05:29:59.325-05:00Very useful article and I have implemented in one ...Very useful article and I have implemented in one of the applications developed.<br />But I have a small issue. When the above code is implemented,the select list with pagination does not work in the tabular form.<br />ie,If I have 60 records in the tabular form and I have defined to display 20 records at a time.<br />The first time I select rows 21-40,the tabular region does not get me the next set of records.If I click 'Next' Button and then it moves to the next set of records.Once I am in the rows 21-40,then the select list works.<br /><br />If I remove the below code $x(fields[i]).onchange = function () {<br /> window.unsaved=1;<br />then it works.<br /><br />Kindly advise on how I can get the Select List with Pagination work.<br /><br />Thank You in Advance.<br /><br />SankulSankulnoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-7487783528165944752014-12-16T08:46:42.580-06:002014-12-16T08:46:42.580-06:00To answer Bill's question.
The way the exampl...To answer Bill's question.<br /><br />The way the example is executed (Using the window.onbeforeunload event), it <b>should</b> catch any navigation away from the page that doesn't call the <b>preSubmit()</b> function.<br /><br />I don't know why this might not be happening in your case. If you can reproduce this on apex.oracle.com, I'd be happy to look at it.<br />Doug Gaulthttps://www.blogger.com/profile/16786329323466667017noreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-14789918834741048992014-12-16T08:37:18.479-06:002014-12-16T08:37:18.479-06:00Anonymous,
If I understand you correctly, you wa...Anonymous, <br /><br />If I understand you correctly, you want to warn the user before the pop-up is shown. To do that you'll have to inject some JavaScript that checks the value of the <b>window.unsaved</b> variable to see if it's '1' before you pop open the window. <br /><br />Hope this helps.Doug Gaulthttps://www.blogger.com/profile/16786329323466667017noreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-37698747246798265442014-12-16T03:32:56.203-06:002014-12-16T03:32:56.203-06:00Hi,
This is a wonderful post and exactly what I wa...Hi,<br />This is a wonderful post and exactly what I want except for one issue.<br />I have a button which doesnot submit the page but instead it opens up a popup window(another page).But when I update a record and click on the button without saving ,message is not displayed.<br />What can be done for the same?<br /><br />Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-5822009755958257182014-12-15T10:33:14.889-06:002014-12-15T10:33:14.889-06:00I just googled across this 2-year old post, and it...I just googled across this 2-year old post, and it was exactly what I needed. Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-92111971335456323042013-01-23T15:59:23.149-06:002013-01-23T15:59:23.149-06:00Great article Doug. I found your method easy to un...Great article Doug. I found your method easy to understand and implement. One small thing that I noticed is that if you add a new tabular form row, it does not detect changes in that row. The issue was easy to overcome though by simply calling a function to set window.unsaved to 1 before the addRow() function.Steve Maxwellnoreply@blogger.comtag:blogger.com,1999:blog-6363924398907149830.post-34342478302894749812012-11-08T15:00:36.917-06:002012-11-08T15:00:36.917-06:00After trying many other methods of removing the ja...After trying many other methods of removing the javascript popup window, this one finally did it, EXCEPT it seems to have removed he warning completely. Making a change to the form and clicking on any different link will discard the changed data and switch to the page without a warning. The submit, delete, and add buttons do work as intended though. Do you know of any way to get the warning back for everything that isn't one of the buttons?Billnoreply@blogger.com