http://www.palmer-realty.net/content/listdetail.html/89633726

-If you click on the green "Virtual Tour" button in the middle of the page...it gives a error

-This is working fine in Firefox

there's s function if you view source :

function win_up(winurl, winname,w,h) {
if (winname == null) winname = "calcs_win";
if (w == null) w = 500;
if (h == null) h = 500;
window.open(winurl, winname,"status,scrollbars,resizable,width=" + w + ",height=" + h);
}

Im a java programmer so im not sure whats really the cause of this...any help would be much appreciated

Recommended Answers

All 7 Replies

mimsc,

Try closing the <img> tag immediately before the <script> in which win_up is defined. It has no closing > .

Airshow

Because width & height should be a strings. You set type "integer" into the string. But I think it's not this function call errors handler in the Explorer. But I'm to think the function haven't been the cause.

Try change the href="javascript: bla bla bla" on the href="#" onclick="win_up(bla bla bla);"

function win_up(winurl, winname,w,h) {
        var winname = winname ||  'calcs_win' ,
               h = h || '500',
               w = w || '500';
        window.open(winurl, winname, "status, scrollbars, resizable, width=" + w + ", height=" + h + ");
}
<a href="#" onclick="win_up('http://slideshow.mris.com/slideshow.cfm?ListingKey=90110525731', 'ipix_win');">
<img border="0" alt="Experience virtual tour." src="/images/content/listings/butn_virtual_tour.gif"/>
</a>

Iit's bad method, I'm correct

win_up = function(winurl, winname, w, h) {
        var winname = winname ||  'calcs_win' ,
               h = h || '500',
               w = w || '500';
        window.open(winurl, winname, "status, scrollbars, resizable, width=' + w + ', height=' + h + '");
};

I haven't been problems in the IE8, Mozila, Opera.

Try change your function and check.

500 versus '500' In the win_up function, it doesn't matter which type you use because Javascript performs automatic type conversion when it concatenates numbers with strings.

As far as I know, this aspect of the Javascript specification is reliably implemented in all browsers.

Airshow

Yeap , I'm agree! But it's readable & understood. Actually, I think that the problem is not in it.

It's better variant to use for such an event handler (example: addListener())

Thanx for the replys

I closed the "<img space" tag and it worked in IE!!

thanx again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.