Window.showModalDialog() Using Javascript?
Aug 24, 2010
I am opening a child window using window.showModalDialog() method. In the child page i have few server side controls whenever a postback happens the child page opens in a new window.
I have also set in my head tag,but it is not working.
<base target ="_self/>
For example
In Page 1: i have an anchor on whose click i open a child page(page2).
In my child page Page2: I have an asp.net button to search based on the criteria. when i enter the criteria and click search, the search results are show in new window rather then the same window.
similar to the post[URL]
View 2 Replies
Similar Messages:
Sep 24, 2010
I am using the javascript to open a child window using window.showModaldialog(), i have retuen a value from the child page is working fine in IE and firefox but is not working in chrome browser, is there any work around or alternative for it to work in chrome as well.
View 2 Replies
Feb 2, 2011
I have two pages A.aspx and B.aspx Page A.aspx opens B.aspx as modal popup by javascript function window.showModalDialog("B.aspx"); Page B.aspx has two text boxes (Login, Password), <asp:Button> control and button click event in server code. Problem is when I click on the submit button it opens me B.aspx page in new third window How is it possible to not open new window on submit button.
View 3 Replies
Aug 27, 2010
I have two webpages, parent page .aspx and child page .html.
On parent page I have JavaScript function for invoking child page as modal window via window.showModalDialog.
function viewCourseModal(url) {
var sPars = SomeParameters();
var returnedValue = window.showModalDialog(url, "", sPars);[CODE]...
So when I launch parent window and invoke child modal window, parameter with "someValue" gets returned to the parent window (to modalReadyForTest control) upon clicking the button Button1.It works fine when I have both parent and child pages on the same domain. When I have them on different domains, value of the parameters does not get passed and instead it is always "undefined".Is there any way to have modal window from different domain returning parameter value to parent page? Can those cross domain issues be solved at all or should I try completely different approach?
View 1 Replies
Feb 13, 2011
I have created 2 webpages call Default.aspx and Detail.Aspx. On Default.aspx, i had written a javascript to popup Detail.aspx through windows.ShowModalDialog.
Now how do i get reference to Default.aspx page within detail.aspx ? (like in Server.transfer function, i can just call this.Page.PreviousPage).
Reason for getting Page Reference rather than value reference, is, i can call all property and class within default.aspx.
View 5 Replies
Feb 9, 2010
Whar are equivalent cross-browser solutions for window.showModalDialog? showModalDialog introduced in IE and FF 3.
View 4 Replies
Dec 3, 2010
I have the following HTML
<tr>
<td class="label" valign="top">
Affiliate Party
</td>
<td class="field">
<input type="hidden" name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyId" id="AffiliatePartyId" />
<input name="ctl00$MainContent$ExternalAccountAttributes$AffiliatePartyName" type="text" id="AffiliatePartyName" class="PartyLookup" />
</td>
</tr>
and the following Javascript/jQuery
$(".PartyLookup").after("<img src='Images/book_open.png' class='PartyLookupToggle' style='padding-left:4px;' />");
$(".PartyLookupToggle").click(function () {
window.open("PartySearch.aspx", "PartySearch", "width=400,height=50");
return false;
});
I need to be able to flag ANY PartyId input field with class="PartyLookup" so that it will modify the DOM and include the image next to the input field. The popup window returns data to populate both the hidden and text fields, but since the click() is generic I need to pass it the ID of the input field.
View 2 Replies
Apr 4, 2011
lstItems.Attributes.Add("onclick", "javascript:window.location.href='" + Project2.Constants.MySiteURL + "myPage.aspx/" + ID + "';");
edit:-
i found this solution on SO but dont know how to use it in my case :
window.open("http://asdf.com", "window_name","location=1,status=1,scrollbars=1,resizable=no,width=650,height=650");
edit 2 :-
Any Javascript expert in here ?
edit3 :-
@Headshota:: Its still opening in new tab in firefox and as apop up window in IE :(
edit 4 :-
@ Craig :: What does this mean? "possibly got a misplace target="_blank" somewhere" How do i check for it?
View 2 Replies
Sep 2, 2010
I've got a Jquery function that I wrote which blacks out the screen after a certain amount of inactivity, creates a pop-up that allows the user to click a button to stay logged in, and logs them out (closing the application window) if they do not respond in time.
The environment is ASP.NET (VB). We don't technically use master pages, but we do have a parent page in which our header, footer and nav reside, and my Jquery code is called from that window, loaded via an IFrame.My problem is that if one is working in a child window, the parent window doesn't recognize that the system is in use, and will automatically engage at the allocated time.I've tried everything under the sun I can think of and nothing works properly. My event handler is working, and it does call the parent window function, but the timer is not being reset.
I have this function in the parent window:
<script language="javascript" type="text/javascript">
function window.reportChildActivity() {
SESSION_ALIVE = true; [code]....
View 1 Replies
Sep 23, 2010
we are running a click-to-call service, my idea is basically like this: website have a link on their page, when the link is clicked, a web page(say it is popup.aspx) hosted on our server is popup, user can input their phone number, and click "call me" button to let the website call him. In the button click event, I want to get Request.UrlReferrer, then query the db to get website's phone. But in IE, Request.UrlReferrer is null(firefox is ok, not test chrome yet),my question is how to get opening window' url in IE? we put popup.aspx on our server because
our client website is not force to use asp.net. we have the control what we put on the popup window, and can modify the page just from our side, if we put the pop window on our partner's side, if we have 100 partner, and we change the page's design, we will notify everyone of them to change this, change that. we can implement a statics system to know how popup a day, which site is most popular,etc
View 1 Replies
Nov 28, 2011
i have two webforms (webform1, webform2). webform 1 has one asp button and webform2 has one aspbutton control. My requirement is i need to show webform as modal dialog when i click on webform1's button.
The problem i am facing here is when i click the form1 button it opens the form2 as dialog well and good. the problem is if i click the button inside the form 2 it opens the form2 dialog again. i have not written any code for form2 button.
below is my code :
function OnClickCopyMaterial() {
window.showModalDialog("./CommonScreens/Materialtest.aspx",'','');
}
<asp:ImageButton ID="imgbtnCopyMaterial" runat="server" ImageUrl="~/assets/images/button_CloneMaterialsSet.png"
OnClientClick="return OnClickCopyMaterial();"
View 1 Replies
Oct 18, 2010
i have an aspx page in which a link in the grid view opens a popup page . the data in the grid view would be dynamic and i need to send the id of the row of grid while calling the child window. i get the id using sender.id, but how would i send this using window .open()?
View 2 Replies
Feb 14, 2011
I have a javascript that opens a new window for "PreChecking" a site. The problem is when i click the button, it works fine... but wichever i button i press next makes the method fire again, despite i doesn't call it. Its just the button with id "lnkPrecheck" that should call the method. Have searched far and wide for a slolution that just opens a new window for the lnkPrecheck button, not the others on the site.THere must be a way for only 1 of 3 buttons makes the function call, not all of them!
The code:
<asp:Button OnClick="lnkPrecheck_Click" OnClientClick="NewWindow();" ID="lnkPrecheck" runat="server" text="Precheck (Opens in a new window)" />
function NewWindow() {
document.forms[0].target = "_blank";
}
View 3 Replies
Dec 3, 2010
I have opend a popup window using javascript. now in that popup window i have got a button and on click on that button i wants to changes size of that (current/same page) popup window.
View 2 Replies
Feb 13, 2011
I have a pop-up CustomControl which I use in a large-scale web application. The pop-up works well everywhere other than when used inside an asp:UpdatePanel, the problem arises when controlling the visibility of the pop-up (the pop-up is nested in a table) with other controls:
When I click the button to open the window I get Error: Object expected and when I try to debug the error with IE 8 JSEditor I get ``Source Code is not available for this location.
I believe that the code of the pop-up is not being initialized completely, but it is just my guess and I don't know how to resolve this issue.
View 2 Replies
Oct 14, 2010
I want open window.open as modal popup.
var features = 'resizable= yes; status= no; scroll= no; help= no; center= yes;
width=460;height=140;menubar=no;directories=no;location=no;modal=yes';
window.open(href, 'name', features, false);
I can use Window.ShowModelDialog(), but in my child window I am calling parent javascript method. That is not happening with ShowModelDialog().
function CallParentScript(weburl) {
alert(weburl);
if (weburl != null) {
var url = weburl;
window.opener.SelectUserImageCallback(url);
window.close();
return false;
}
}
If I use window.open(). I can call Parent javascript. But window is not modal. How to solve this? Can I write something in child popup to always top?
View 3 Replies
Jul 29, 2010
I'm using the Telerik RadWindow control in one of my applications. When a user wants to authorize Twitter for the application the window displays the OAuth dialog for Twitter.
However, each time I display the pop-up for Twitter OAuth, or even just the plain Twitter page, the entire browser is redirected.
The control works just fine when the URL is pointed at a site other than Twitter. I'd like to see if I can block that redirect, or if perhaps there's an easier way to accomplish the OAuth confirmation.
View 2 Replies
Feb 25, 2010
I have a modal pop up window (Ajaxcontroltoolkit one) and inside that I am trying to open a normal Java Script new window.
ScriptManager.RegisterClientScriptBlock(this.UpdatePanel1, this.UpdatePanel1.GetType(), "AnyScriptNameYouLike", "window.open('http://www.yourwebsite.com');", true);
But for some reason it does not open.
But it opens fine if I pu the same line of code in a button click event.
View 5 Replies
Nov 2, 2010
I am trying to pass parameters to a popup window via query string(a hidden field id & a textbox id). However, since I am using master pages the id's are very long (ct100_someid). Is there a way to elegantly pass my ids ? Can I shorten my id's or not show them to the user at all?
View 2 Replies
Oct 25, 2010
I am using a CustomValidator in ASP.NET as follows:
<asp:CustomValidator ID="cvComment" ControlToValidate="txtComment" Display="None"
EnableClientScript="true" ClientValidationFunction="validateComment"
runat="server" ></asp:CustomValidator>
And this is the function that gets called:
function validateComment(source, args) {
var reComment = new RegExp("^[a-zA-Z0-9',!;?@#%*.s]{1,1000}$");
var validComment = reComment.test(window.event.srcElement.value);
if (!validComment)
alert("The comment has illegal characters");
args.IsValid = validComment;
}
Upon clicking the button that triggers the validator, the application breaks and I can see that the window.event property is null, so obviously there's a null reference trying to match the regEx. My question is why could the window.event be showing up as null? I could've sworn this was working before.
EDIT:
I have modified the function as such:
var check = document.getElementById(source.id);
var checky = check.attributes["controltovalidate"].value;
var checkyo = document.getElementById(checky);
var validHour = reOutHour.test(checkyo.value);
if (!validHour)
alert("The time is incorrectly formatted");
args.IsValid = validHour;
Now this is working on Internet Explorer, but not on Firefox...
View 1 Replies
Mar 2, 2010
I have noticed that window.onunload event fires off AFTER page_load event which makes no sense.
This behaviour is creating an issue for me - in my unonload I clear the session, so if the Page_Load first BEFORE onunload, there are errors on the page displayed.
I would expect the javascript onunload to fire BEFORE Page_Load....is that the correct assumption?
TO CLARIFY: Let's assume I am on page test.aspx, then I click on the link that goes to the same page (say I click on a menu), what I observe is that Page_Load fires first, then onunload fires off.
Makes no sense at all.
View 6 Replies
Jul 30, 2010
I have situation where in c# code I am adding an onclick client event handler.
It should do:
Button1.Attributes.Add("onclick", "javascript:window.open('https://"+Request.ServerVariables["HTTP_POST"]+"/reports/?type=1&id=2");
in the end the URL looks like:
https://servername/reports/?type=1&id=2
in the reports folder of my site I have a default aspx page that handles those parameters.
When I click the button with this event, a new window opens but it says there is no page at that address. When I use the link like this
https://servername/reports/default.aspx?type=1&id=2
The page opens but it's blank.
When I run this code as non secure with HTTP, everything works just like it should. The report opens.
Is there any difference using those two different URLs with default.aspx and without it, because in development it behaves the same way, but under HTTPS one page doesn't exist and another is blank?! Is HTTPS the reason for that?
View 3 Replies
Jan 19, 2010
i have aspx pages with vb.net in the back. I need to use javascript to open a new window on page load. I am also sending a querystring (www.mysite.com/default.aspx?dest=register.aspx) from the previous page. I need the javascript to parse the querystring and open the new window only if the URL has a querystring.
View 4 Replies
Feb 5, 2010
I have the following 2 lines of code:
Dim sHyperlink As
String =
"<a href=""LabPopup.aspx?RefNo=" & iLabRefNo &
[code]...
View 3 Replies
May 10, 2010
to bring a browser window to the front based on some action? I'm writing an intranet application that monitors for new messages to be received over our satellite link from our fleet, but our dispatchers already have busy screens. Is there a way to bring a browser window to the front via javascript or code behind?
View 3 Replies