Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > open window problems with firefox

Reply
Thread Tools

open window problems with firefox

 
 
Merlin Morgenstern
Guest
Posts: n/a
 
      09-28-2007
Hi there,

I do have a JS-function that does open windows in a specific format to
display small pices of information, like member comments.

Since a while I have found that this will not work on some systems. For
example a user told me that since he is on vista the page does not open
anymore, but the page where he clicked on the link opens the homepage.
I found for myself, that the pixel specifications do not work on all
systems. It opens the window way to small now since I upgraded to new
firefox versions.

Here is the HTML code:
<a href="#" onclick="open_center('/dir/popup.php?rid=2521', 600, 400,
'yes');return false;">test</a>

This is the JS-function:
// opens a new window in the middle of the screen without buttons and bars
//-------------------------------------------------------------------------------------------------------
function open_center(url,width_,height_,scrollbar,toolbar,m enubar,jump) {

var H_Browserrand = 12;
var V_Browserrand = 30;
var H_Aufloesung = screen.availWidth;
var V_Aufloesung = screen.availHeight;
var H_Fenstergr = H_Aufloesung-H_Browserrand;
var V_Fenstergr = V_Aufloesung-V_Browserrand;

Fensterbreite = width_;
Fensterhoehe = height_;

H_offset= (H_Fenstergr-Fensterbreite)/2;
V_offset= (V_Fenstergr-Fensterhoehe)/2;

if (V_Fenstergr < Fensterhoehe){ // maybe the client has a smaller
resulution than the image?
V_offset = 0;
Fensterhoehe = V_Fenstergr;
vlimit= V_Fenstergr;
}
else{
vlimit = 0;
}

// if (popup) popup.close();
var popup =
window.open(url+'&vlimit='+vlimit+'#'+jump,'Detail ','width='+Fensterbreite+',height='+Fensterhoehe+' ,left='+H_offset+',top='+V_offset+',
resizable=no,scrollbars='+scrollbar+',toolbar='+to olbar+',status=no,directories=no,menubar='+menubar +',location=no')
popup.focus();
return popup;
};
//-------------------------------------------------------------------------------------------------------


Thank you for any help on that. I am pretty stuck with the problem right
now.

Best regards,

Merlin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Window.Open get new tab instead of new window in FireFox Fredzidd@gmail.com Javascript 1 02-29-2008 03:06 AM
Clicking Email Links in Firefox and Opening Another Firefox Window Elizabeth Firefox 0 08-15-2006 11:44 AM
Problem with window.opener AND window.name IN firefox atlas Javascript 1 09-07-2005 05:30 PM
window to window communication (window.opener) Andrew Bewley via DotNetMonster.com ASP .Net 0 02-03-2005 12:59 PM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57