I am working with Firefox. Why window.open() does not work with Ajax? How to fix it? But,it works without Ajax. Please see the code underlined.
Please see the code below. - $("#button_MN_invite").on("click", function() {
-
var tester = true
-
if ($('#input_MN_invitees_email_ids').val() != "") {
-
//$("#button_MN_invite").unbind("click");
-
$("#button_MN_invite").attr('disabled', 'disabled');
-
emails = $('#input_MN_invitees_email_ids').val().replace(/\s+/g, "");
-
$.each(emails.split(",").slice(0), function(index, item) {
-
if (!MN_emailValidation(item)) {
-
tester = false;
-
//$("#button_MN_invite").bind("click");
-
$("#button_MN_invite").removeAttr('disabled', 'disabled');
-
alert('Check valid Email Address for \'' + item+'\'');
-
return false;
-
};
-
});
-
if (!tester) {
-
//$("#button_MN_invite").bind("click");
-
$("#button_MN_invite").removeAttr('disabled', 'disabled');
-
return false;
-
}
-
//console.log('um not out of function');
-
key = $("#MN_room_key").attr("value");
-
$.ajax({
-
type : "post",
-
url : "http://"+hoster+"/meetnow/inviteToRoom",
-
crossDomain : true,
-
data : {
-
emails : emails,
-
adminemail : $.session.get('roomCrtrMid'),
-
key : key,
-
hangout_id : $("#MN_room_id").attr("value"),
-
roomname : $("#MN_room_name").attr("value"),
-
pleaseuseme : "invite.php",
-
userhost : hoster
-
},
-
beforeSend : function(){
-
$("#loading").show();
-
},
-
complete : function(){
-
$("#loading").hide();
-
},
-
success : function(result) {
-
if (result == "yes") {
-
$("#loading").hide();
-
//alert("Invitation sent successfully.");
-
//window.location = "/meetnow/login.html#" + $("#MN_room_key").attr("value");
-
var newurl = "http://64.34.67.46/meetnow/login.html#"+$("#MN_room_key").attr("value");
-
var win = window.open(newurl, '_blank'); // not working here
-
} else if (result == 'no') {
-
$("#loading").hide();
-
//$("#button_MN_invite").bind("click");
-
$("#button_MN_invite").removeAttr('disabled', 'disabled');
-
alert("Programming error, while passing arguments.");
-
} else {
-
$("#loading").hide();
-
//$("#button_MN_invite").bind("click");
-
$("#button_MN_invite").removeAttr('disabled', 'disabled');
-
alert("There was a problem in sending invitation.");
-
}
-
}
-
});
-
window.open("http://64.34.67.46/meetnow/login.html#"+$("#MN_room_key").attr("value"), '_blank'); // it works well here.
-
-
} else {
-
//$("#button_MN_invite").bind("click");
-
$("#button_MN_invite").removeAttr('disabled', 'disabled');
-
alert("Please enter Email address and then proceed.");
-
}
-
-
});
I want window.open() working in the success of Ajax. how to fix it? Thanks.
2 1477
Try something like -
-
-
window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');
-
Thanks. mHealth.
I tried your code.
window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');
It does not work either.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Edwin Boersma |
last post by:
Hi,
I've just installed Netscape 7.1 for Linux and the following script
refuses to open a window when I call this function:
function OpenLinkWindow() {
...
|
by: kaith |
last post by:
The following code used to popup a window when I used netscape 4.79.
Now I switched to mozilla 1.4 and the window doesn't popup.
function newWindow(newContent)
{
winContent...
|
by: Wladimir Borsov |
last post by:
Inside a html page (more precicesly inside a JSP page) I defined a button.
When the user clicks this button a second browser window should pop up und load the passed
URL. I coded
<img...
|
by: Jorn TK |
last post by:
Hi,
i use window.open to display the result of polls
window.open('../poll.php?schid=".$schid."&permit=1&pollid=".$dbpoll."&answ='+opt,'','menubar=no,width=250,height=230');
it work fine in...
|
by: Dominic Tocci |
last post by:
I'm searching for a way to use window.open on my web page to open a window
in firefox that allows the sidebars to work (bookmarks, history, etc).
When I use the following:
var...
|
by: Rick Brandt |
last post by:
I am using window.open in an AJAX page and it works in both IE and FF but in the
latter the hourglass stays up and both the progress bar and the small animated
circle-of-dots graphic keep on...
|
by: Bob Jones |
last post by:
Here is my situation:
I have an aspx file stored in a resource file. All of the C# code is
written inline via <script runat="server"tags. Let's call this page
B. I also have page A that contains...
|
by: DannyMc |
last post by:
Hi, i have tried this code in FireFox and it works great. However , it seems to fail in IE6/7. I have no idea and looking for help here. Please advice. Thank you.
<a...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |