Javascript Popup window in IE6 and above - asp.net

I'm opening a modal dialog for IE6 and above using the following javascript.
window.showModalDialog(
'SelectUser.aspx',
null,
'status:no;dialogWidth:500px;dialogHeight:220px;dialogHide:true;help:no;
scroll:yes;toolbar:no;title:no;resizable:yes;location:no;menubar:no;'
);
In the popup dialog box a grid is shown from which user can select... Grid has paging applied to it however when the pager link for next, previous, first, last or any page number is clicked page index changed is fired and page is posted back and the page result is shown in a new IE window. How to fix this.

Show your page (SelectUser.aspx) in iframe in the popup window.

The modal dialog box if contains a form and when post back will open up in a new window. However there is a workaround to this and that is to Add <base target="_self"/> inside of the <head> tags in the .aspx file of the ModalDialog window.

Related

how to disable parent window in asp.net using javascript

i hv an asp.net form in which i have used master page, in this by clicking on one link button a popup window will be opened, my problem is i want to close a popup child window when parent form is closed.. or i should make parent form disable when child popup is active...
i got some code but its working only for IE,, please help me to work this in Google chrome
this is my code which is working For IE
in parent window i wrote like this
function topWindow() {
var popup = window.open('BranchSearch.aspx', 'mywindow', 'location=1,width=450,height=100,toolbar=0,menubar=no,resizable=no,scrollbars=no,status=no,left=340,top=340');
popup.focus();
}
and in body tag of child pop window i wrote like dis
please help me as soon as possible
thank u
You can use window.showModalDialog This will disable parent window until you close the child window.

Open a Popup window without any close button

I have a webhierarchicaldatagrid and its first column is a template column which is a hyperlink. So onmouseover on the data of that column I want a small popup window to be open right next to that data so that user can drag the mouse on that popup window. The window contains few links which on click will navigate to another page. I want to know how to get the popup window to be open right next to the data and also how to keep it open only when the mouse is on it. as soon as the mouse is not on the popup I want the popup to close.
qTip is a pretty popular jQuery plugin that can do what you are wanting. Here is the demo page for the type of functionality you are describing:
Demo Fixed tooltips on hover
Here is another link, with 30 popular tooltip plugins:
30 Stylish jQuery Tooltip Plugins For Catchy Designs

jQuery UI Dialog cause page jump on open & close on ASP.NET

I have an ASP.NET C# page, with image thumbnails in it.
I created a script that opens a jQuery UI Dialog on each hover on a thumbnail that shows me the thumbnail in larger size in a dialog view, and when I hover out - dialog closes.
My little annoying problem is, that in every mouseover (trigger dialog to open) - the page makes itself 'longer' - a scrollbar appears on the side of the browser, and it seems like the page gets longer when a dialog is openning, but it shouldn't do so.
When I hover off (mouseout) - the dialog disappears and the page returns to its normal state.
Because of this- when I hover through the thumbnails, my page 'jumps'.
I looked for a solution for this, and I've added return false; for each dialog open, and close - and it still doesn't make any different.
Sorry for the unperfect english, and thanks for all helpers!
I finally got my solution - for all interested:
open: function(event, ui){
/*
* Scrollbar fix
*/
$('body').css('overflow','hidden');
}
I added this to dialog's opening event and it fixed the issue!

Open create content form modal and refresh view display in Drupal

I have a website developed using Drupal. What I want is to create a link which launches a modal window with a custom content create form, then when the form submits and the child window closes, a view or a display of a view in the parent must be refreshed.
I have tried using an excellent module like automodal and ajax_views_refresh but I can't get to set it right.
Any clues?
Figured out how to do this not so long ago, and while looking for a method to Preview content from the Modal Frame, came across your post. Hope this isn't to late to help.
Open parent.js under modules/modalframe/js
and insert location.reload(); around line 250 within this if statement:
if ($.isFunction(self.options.onSubmit)) {
self.options.onSubmit(args, statusMessages);
}
Now, when you click "Save" the child window closes and triggers a parent page refresh.

Referencing parent window from an iframe on a modal popup

I am using the AJAX modalpopupextender and I have an iframe embedded in the modal popup. I need to be able to reference the parent window (the window from which the modal popup was launched) to reload/change the URL when certain events on the modal popup are fired. I have tried window. top, window.parent, opener, root, etc., and have had no success. Any help would be appreciated.
Something along the lines of:
self.parent.opener
I've created a modal popup a bit like that in the past, and that selector enabled me to start mucking around with the DOM on the page that opened the window.
See more here or here

Resources