Forum Moderators: open

Message Too Old, No Replies

new.window loading index page

         

psychdesign

2:18 pm on Mar 12, 2005 (gmt 0)

10+ Year Member


Hello everybody, I am new here so I ask you all bare with me for a few...
this is an issue that is old but still new to me. on my site I have images I want to load into a new window that is formated to size and position. the script works on every browser on every platform except IE % and better. here is the script

<!--
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->

<a href="http://www.mysite.org/gallery/images/The-Monorail.jpg" onclick="NewWindow(this.href,'name','800','600','yes');return false"><img src="3d_gallery/support_images/gallery_thumbs/mono_rail.jpg" border="0"></a>

am I missing something here? as far as I know this is about as generic a new window script as you can get, so what is the issue?

what is happening is when you press the link the new window launches in the size specified, but instead of the image loading into the page, my index page loads instead....
Any help you can give would be really helpful, thanx in advance
PD..

Bernard Marx

4:43 pm on Mar 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code seems OK. I pasted the URL into address bars of IE & FF. The same thing happens.
I think this is a server configuration issue.

psychdesign

6:17 pm on Mar 12, 2005 (gmt 0)

10+ Year Member



hmmm you have to explain that to me, can a server single out a spacific browser like that...?
I have been surfing like crazy trying to find a topic on this issue, I come close to an answer but nothing seems to fit my spacific issue.
pd

Bernard Marx

6:25 pm on Mar 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's not singling out a browser.
That URL gives a page - not an image - for both IE and FF.