open window problems with firefox

M

Merlin Morgenstern

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,menubar,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='+toolbar+',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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top