The Artima Developer Community
Sponsored Link

Java Answers Forum
popup inconsistency

1 reply on 1 page. Most recent reply: Jun 10, 2002 3:18 PM by Thomas SMETS

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
LESM

Posts: 1
Nickname: lesm
Registered: Jun, 2002

popup inconsistency Posted: Jun 10, 2002 6:22 AM
Reply to this message Reply
Advertisement
I'm not expert, just a learning by doing novice.

I use this script to popup an image. It works as expected except that every now and then, the picture fails to show up showing a big blank window. I see no pattern as to why and when this script fails and also I see no other way to do the job.

The idea is to popup perfectly framed images using several links.

Any help will be appreciated.

<script type="text/javascript" language=javascript>
var win=null;
function showimage(url_image,picname){
var img = new Image();
var scrwidth = screen.availWidth;
var scrheight = screen.availHeight;
img.src = url_image;
win=window.open('','','width='+img.width+',height='+img.height+',scrollbars=no, dependent=yes,resizable=1,left=' + ((scrwidth) * .55) + ',top=' + ((scrheight) * .15) + ',toolbar=0');
win.document.write ('<html>\n');
win.document.write (' <head>\n');
win.document.write (' <title>'+picname+'</title>\n');
win.document.write (' </head>\n');
win.document.write (' <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
win.document.write (' <img src="' + url_image + '" height='+img.height+' width='+img.width+'>\n');
win.document.write (' </body>\n');
win.document.write ('</html>\n');
}
</script>


<a href="javascript:showimage('http://myanothersite.com/images/picture.jpg','pass' );"><img src="/graphics/pic.gif" alt="Show image" width="21" height="21" border="0"></a>


Thomas SMETS

Posts: 307
Nickname: tsmets
Registered: Apr, 2002

Re: popup inconsistency Posted: Jun 10, 2002 3:18 PM
Reply to this message Reply
Java is not Javascript !
I believe you will not find an answer here ... !
Not a personnal remark just a location issue :-))
Thomas,

Flat View: This topic has 1 reply on 1 page
Topic: Server Previous Topic   Next Topic Topic: Abstract class and polymorphism

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use