473,413 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Window.open does not work in firefox

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.

Expand|Select|Wrap|Line Numbers
  1. $("#button_MN_invite").on("click", function() {
  2.         var tester = true
  3.         if ($('#input_MN_invitees_email_ids').val() != "") {
  4.             //$("#button_MN_invite").unbind("click");
  5.             $("#button_MN_invite").attr('disabled', 'disabled');
  6.             emails = $('#input_MN_invitees_email_ids').val().replace(/\s+/g, "");
  7.             $.each(emails.split(",").slice(0), function(index, item) {
  8.                 if (!MN_emailValidation(item)) {
  9.                     tester = false;
  10.                     //$("#button_MN_invite").bind("click");
  11.                     $("#button_MN_invite").removeAttr('disabled', 'disabled');
  12.                     alert('Check valid Email Address for \'' + item+'\'');
  13.                     return false;
  14.                 };
  15.             });
  16.             if (!tester) {
  17.                 //$("#button_MN_invite").bind("click");
  18.                 $("#button_MN_invite").removeAttr('disabled', 'disabled');
  19.                 return false;
  20.             }
  21.             //console.log('um not out of function');
  22.             key = $("#MN_room_key").attr("value");
  23.             $.ajax({
  24.                 type : "post",
  25.                 url : "http://"+hoster+"/meetnow/inviteToRoom",
  26.                 crossDomain : true,
  27.                 data : {
  28.                     emails : emails,
  29.                     adminemail : $.session.get('roomCrtrMid'),
  30.                     key : key,
  31.                     hangout_id : $("#MN_room_id").attr("value"),
  32.                     roomname : $("#MN_room_name").attr("value"),
  33.                     pleaseuseme : "invite.php",
  34.                     userhost : hoster
  35.                 },
  36.                 beforeSend : function(){
  37.                     $("#loading").show();
  38.                 },
  39.                 complete : function(){
  40.                     $("#loading").hide();
  41.                 },
  42.                 success : function(result) {
  43.                     if (result == "yes") {
  44.                         $("#loading").hide();
  45.                         //alert("Invitation sent successfully.");
  46.                         //window.location = "/meetnow/login.html#" + $("#MN_room_key").attr("value");
  47.                         var newurl = "http://64.34.67.46/meetnow/login.html#"+$("#MN_room_key").attr("value");
  48.                         var win = window.open(newurl, '_blank'); // not working here 
  49.                     } else if (result == 'no') {
  50.                         $("#loading").hide();
  51.                         //$("#button_MN_invite").bind("click");
  52.                         $("#button_MN_invite").removeAttr('disabled', 'disabled');
  53.                         alert("Programming error, while passing arguments.");
  54.                     } else {
  55.                         $("#loading").hide();
  56.                         //$("#button_MN_invite").bind("click");
  57.                         $("#button_MN_invite").removeAttr('disabled', 'disabled');
  58.                         alert("There was a problem in sending invitation.");
  59.                     }
  60.                 }
  61.             });
  62.         window.open("http://64.34.67.46/meetnow/login.html#"+$("#MN_room_key").attr("value"), '_blank'); // it works well here.
  63.  
  64.         } else {
  65.             //$("#button_MN_invite").bind("click");
  66.             $("#button_MN_invite").removeAttr('disabled', 'disabled');
  67.             alert("Please enter Email address and then proceed.");
  68.         }
  69.  
  70.     });
I want window.open() working in the success of Ajax. how to fix it? Thanks.
Jun 16 '14 #1
2 1477
mHealth
13
Try something like
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');
  4.  
Jun 17 '14 #2
Thanks. mHealth.
I tried your code.
window.open('http://www.google.com', '_blank', 'toolbar=0,location=0,menubar=0');
It does not work either.
Jun 17 '14 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
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() { ...
3
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...
18
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...
5
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...
8
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...
5
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...
13
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...
6
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...
0
BarryA
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...
0
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.