pop up modal appears again when clicked on back button - javascript

I have created a confirmation pop up modal using javascript in Django's Html page,
my Html template is generating delete links using for loop,
so my logic is I have used target the clicked Html element using the window event and then I fetch the value of href, store it in a variable, and then apply that value to the yes button of pop modal, and also set the href value of delete link to '#', so it should not work.
now my problem is the modal is working properly, but after finishing the task, when clicked on the browser back button, again the modal is appearing.enter image description here

Related

vb.net - in a link button click event in code behind, close tab

In my click event in my code behind i am doing some inserts into databases, emails, but when i click the button i also want to close the tab after it does all this.
I have tried response.writing a script to close the window but that doesnt work. have tried the below but also doesnt work
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Close", "window.close()", True)
Have also tried the add attribute on button click to close the window but i dont want to add the attribute on the button click i want to execute the attribute on button click.
If i also try the add attribute on the page load, it will close the window but will not carry out the code behind function

Oracle APEX 5 - modal region not opening after page submit

OK, here's my situation. I have modal region with a chart. There are checkboxes corresponding to each line on the chart. I want the end user to be able to click a checkbox and have the corresponding line on the chart appear/disappear. Here's where I am:
User opens page two
There is a button "open chart" at the top of the page
When that is pressed, chart opens
User hits a checkbox, the page is submitted with a dynamic action
The modal region disappears
When I open the modal region back up, the line has indeed disappeared like it was supposed to.
My problem is number 5 above. I need that modal region to stay open after the dynamic action on the checkbox submits the page.
So far, I have tried another action (under the submit page on checkbox change action) that opens the modal region. But, that isn't working. Any help is greatly appreciated.
If you used the wizard to build the page then it's likely that when you submit the page the close dialog process is being triggered. In that case, to stop that from happening either delete the process or put a condition on it (request contained in value) and select the buttons you want to close it.
Found my answer. The solution was to forget about the modal region and make a modal page. Now, when I check/uncheck a box, I can call a dynamic action to resubmit the modal page without it disappearing. Thank you for your help!

AngularJS Clicking on Add button should display a new popup page by hiding the parent page

I am working on a project which uses AngularJS/Breeze framework using HotTowel Template.
I have a requirement where, in a parent.html page I have a button/link as "Add" and on click of this button, I need to display a popup page by hiding the parent page(i.e.parent.html).
Add page will have input controls and Save button where user will enter the details in the respective control and on click of Save button data from input controls will be saved to the database table.
I am new to this AngularJS style coding, please advise me or provide me a link on how I should implement the display a child popup page by hiding the parent page(i.e.parent.html) as explained above.
From what I understood from your question is that you need to use modals.
You can try using angular ui modals
This creates a pop up by fading the primary page. You can create input controls and save buttons in the modal

I don't want to show popup for the button

I have a button with the code below. When I click on this button it will show one popup which has a continue button that takes you to the next page. I want to go to the page directly without the popup showing when I click on the button.
How to make button not to show the popup when we click on it?
<span>Next</span>
If you don't want the popup to show, then get rid of the onclick handler. I'm assuming the popup you're referring to is ConfirmModalPopUp.
This part
onclick="javascript:return ConfirmModalPopUp('phone');"
remove it.

Wysiwyg Tiny MCE, problem adding custom links

I am trying to see witch one i like best, Tiny MCE or CKEditor. The problem that i am getting is that i need to add a custom toolbar button (or extend the anchor button). Trying now to modify the advlink plugin to insert internal links from the CMS. So i modified the page link.htm and added one button next to the href field. This button opens up a small popup where the user can select an internal link in the CMS and then press insert. The small popup then uses javascript to send the result back to the link.htm page. The link is then inserted into the href field. My problem is that when i press insert on the link.htm page, it just reloads the page and nothing is inserted.
This is the javascript that i added to the link.htm page:
function ShowInternalLinks() {
window.open('InternalLink.aspx', 'InternalLink', 'toolbar=0,status=0,menubar=0,location=0,directories=0,resizable=0,scrollbar=0,width=400,height=200');
}
function InsertInternalLink(link) {
document.getElementById('href').value = '/1/?' + link;
}
Nothing fancy, just opens up my custom aspx page when the ShowInternalLink is clicked. Then when the user clicks on insert on that page, the page calls the javascript InsertInternalLink and then closes the small popup. Everything works when i run the page, the href gets the correct value from the popup page, but when i then press insert, the page just reloads and the href field resets itself.
Any ideas? (If i write in the URL in the href field, it works perfectly. Just doesn't work when i use my popup window)
Side question: Can this even be done easily in CKEditor?
The href field has an onchange listener that performs the following: selectByValue(this.form,'linklisthref',this.value);
Can you debug and see if this is being called. I'm thinking that it isn't, and this might be your problem.

Categories