• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

My littel print function works in IE but not Mozilla any ideas ?

 
Ranch Hand
Posts: 359
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this function that print a image, works fine in IE 8.0, its shows the image in a new window and i can print the image.

But when i use Mozilla FireFox 3.6 i can see the image in my in a new window, but its only prints "About:blank"




Frank
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code is 100% untested. I think this will work better. Fist you preload the image, than you create an iframe, you print the iframe, and than you remove it.



Eric
 
Frank Jacobsen
Ranch Hand
Posts: 359
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, i tried to copy paste this in to my page, and the script runs fine, but nothing happens in IE and Mozilla, then i used the old fasion way
puts a lot off alerts into the kode, if i could find a bug somewhere, but all the javascript executes ....
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well with your code, you need to wait until the image is fully loaded. You can do that by just using a timeout and waiting a a second before calling print.

Eric
 
Frank Jacobsen
Ranch Hand
Posts: 359
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to add the solution i used, maybe someone else can use this, i works in IE and FireFox




Nice always to get quick respond in this forum

// Frank
 
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic