when i open bootstrap modal it gets pop up from that position where it was closed - bootstrap-modal

I have around 16 fields in my bootstrap modal.When I save the form and re-open it the modal pop ups the same position where it was closed.I want to open a new modal from it's original position.Please help me

I got the answer for this.After some RND,this piece of code worked fine for me
$('#modalId > div.modal-dialog').scrollTop(0);

Related

How can I Close a popup window, after execute Update SQL. (Oracle APEX 21.1)

I created a pop-up page. That pop-up window has a radio button, a text box, and an execute button. I want to work that page working like... when pressing the button, run a update SQL with the values of the radio button and text box, and close itself.
I tried that answer in the following link. But the pop-up page just reloaded and the page stayed open. How to close popup window in Oracle-apex?
If possible, I would like to validate the value of the text box. If it was an incorrect value then break the process with a message. If path that validation, run a update SQL and close the pop-up window.
Thank you for your kindness for read this confusing question.
You should be using a "Close Dialog" process type after your Save Process.
Make sure that you also set the server side condition accordingly so that the dialog only closes after your save process.
I GOT RESOLVED IT!
Not use any close method, redirect util is fine work like this APEX_UTIL.REDIRECT_URL (APEX_PAGE.GET_URL(p_page => 7));
Thank you to all ppl for look this page :)

Zurb Foundation 6 - Reveal modal won't reopen after close

I am using a reveal modal and populating it using AJAX, following the recommended methods in the Zurb Documentation to do so. The modal appears and populates OK, but if I then close the modal (e.g. click on background) and try to reopen I get a javascript error. I am trying to fix this so I can reopen the modal after close.
I have tried adding the option "data-reset-on-close" to the modal definition to ensure that the modal is reset when it closes, but this does not help.
Here is how the modal itself is defined.
<div class="reveal" id="edit_modal" data-reveal data-reset-on-close="true">
Here is the javascript I am using to trigger the modal (and load the javascript. The modal fires when I click on a <div> with ID "load_modal".
$("#load_modal").click(function() {
var $modal = $('#edit_modal');
$.ajax("/_modal_content/edit_modal")
.done(function(resp){
$modal.html(resp).foundation('open');
});
});
The aim is to allow the user to close then reopen the modal as required. Right now it opens once without problem, but it will not open a second time.
On attempting to open the second time a javascript error is reported:
app.js:65 Uncaught TypeError: t.html(...).foundation is not a function
at Object.<anonymous> (app.js:65)
at l (<anonymous>:3:6477)
at Object.fireWith [as resolveWith] (<anonymous>:3:7245)
at r (<anonymous>:4:10371)
at XMLHttpRequest.<anonymous> (<anonymous>:4:16224)
Hopefully I'm doing something silly and there is an easy fix.
Would be most grateful for any guidance on what I should do to resolve.
There are some tutorials on this that may help:
https://zurb.com/university/lessons/dynamically-update-your-web-pages
and
https://zurb.com/university/lessons/ajaxing-dynamic-content-with-foundation

how to pop up a new form window withing the opened window on clicking a new add item button in sharepoint

Hello I am using SP 2013 online and on the my main page, I have a button "Add new item" Like this
When I click it, it open a new form and replace the current window which I don't want. So right now it behaves this way:
What I want is: that when I click on the button it pop up the new form window above the opened window. This pic shows the desired behavior.
How can I achieve this in SharePoint? I am a new user of SharePoint. Please help me to figure it out.
thanks in advance.
There is an option in custom lists to launch forms as a pop up or dialog box as you've displayed.
To get this to happen:
You can always try > List Settings > Advanced Settings > Launch forms in a dialog? Yes
Just be aware that if a user has pop up blockers set on their browser it may open up in the window (your first screen shot) or not at all.
See if that helps.

Going back to the main page after closing the pop up window

I am having a problem on handling the pop up windows in robot framework.
The process I want to automate is :
When the button is clicked, the popup window appears. When the link from that popup window is clicked, the popup window is closed automatically and go back to the main page.
While the popup window appears, the main page is disabled, and it can be enabled only when the link from the pop up window is clicked.
The problem I have here is that I cannot go back to the main page after clicking the link from the popup window. I got the following error.
20140604 16:04:24.160 : FAIL : NoSuchWindowException: Message: u'Unable to get browser'
I hope you guys can help me solve this problem.
Thank you!
I had the same issue and here is the method to resolve the issue
String window = driver.getWindowHandle();
Now click the button to invoke the popup and give some wait time
and then switch to ur new window with the below code
driver.switchTo().window("your new window name");
//perform your action in the new window and then
To get back control over your main page after the popup closes, use the below code
driver.switchTo().window(window);
This will help you activate the main window and continue your action there.
Let me know if this helpw
No idea in Python but in Java you can use below code after pop opened to solve your problem:
Object[] parentHandle = myDriver.getWindowHandles().toArray();
myDriver.switchTo().window((String) parentHandle[0]);
In the first line of code parentHandle is the number of current
windows in Array form. And in second line of code I am switching to
the first window, for second window you can use 1.
If still have problem or you need something else, please suggest.
I have seen this issue and found that there is a recovery period where Selenium does not work correctly for a short time after closing a window. Try using a fixed delay or poll with Wait Until Keyword Succeeds combined with a keyword from Selenium2Library.

asp repeater itemcommand not working on second click

I have a repeater which I bind the data using Bind method from the database. There is a Asp:Button with an onclientclick and onclick event. In OnClientClick I open a new window and onclick I am adding the data to the database. This works perfectly on the first Page load. After first click on any of the buttons in the repeater, the click events stops working on subsequent clicks.
I have spending hours on finding a solution for the same, can any one guide me where i am going wrong what needs to be done.
P.S: My application is AJAX Enabled , using WCF and JQUERY
Thanks & Regards,
Phani...
Never Mind I got it solved my self. For others who are trying to solve the same issue, here is the solution:
The code below opens up a new window with out popup blocker blocking the window
OnClientClick of the button write Javascript like below to open a new window and refresh the parent window (I have to do this as the ItemCommand event was not firing until the page is refreshed)
OnClientClick = "target='_blank'; setTimeout("location.reload(true);", timeout);
Phani...