Click to See Complete Forum and Search --> : Browser error message - why?


Norman Graham
04-28-2003, 07:20 AM
I have a PHP file with my sitemap and I want to use JavaScript URLs to open the 'details' pages, which should just be small pop-ups. Everything works well - the pop-up appears and it contains the correct content, but the browser produces a download dialogue and an error dialogue saying that it is trying to download the link, but can't, despite the fact that it already has. Clicking on OK makes it go away.

I'm running IE5, PHP4 and Apache 2.0.42 (to parse the PHP files). Here's the code in the sitemap file which produces the pop-up window. Can anyone tell me how to stop the ugly error dialogue from appearing? All suggestions gratefully received.

<ol class="sitemaplink">
<li>Geography: <a href="java script:window.open('sitemap_details.php?page=geo', '_blank', 'toolbar=no,resizable=yes,scrollbars=yes,status=no,height=400, width=500')">details</a></li>

Thanks
Norman

khalidali63
04-28-2003, 07:34 AM
your errorcould be your code,get rid of "_blank" attribute,instead use some other word for name..and see if it takes care of it...

Norman Graham
04-28-2003, 09:18 AM
I'll give that a try and see what happens.

Thanks

Norman

Norman Graham
05-02-2003, 02:51 AM
Got this one fixed now. The solution was to leave the title blank - the target page already contains a title - and to prevent JS from attempting to overwrite the existing window. Code is now:<ol class="sitemaplink">
<li>Geography: <a href="java script:window.open('sitemap_details.php?page=geo', '', 'toolbar=no,resizable=yes,scrollbars=yes,status=no,height=400, width=500'); void 0">details</a></li>Thanks for your help, Khalida. Btw, the 'void' thing is recommended in O'Reilly Javascript - the Definitive Guide, 4th Ed. (Flanagan)

Cheers

Norman