Problem with window.print()
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ravi_Bandaru
Posted On:   Wednesday, June 19, 2002 09:37 AM

Hey ..look at this code.. < img src="../images/toolbar/btn_print-off.gif" alt="print" name="btn07" id="btn07" width="23" height="23" hspace="2" vspace="2" border="0" onclick="window.print()" onMouseOver="swapButton(this,6)" onMouseOut="swapButton(this,6)" style="cursor:hand" > This pops up an error "Object doesn't support this method or property" This code works fine with netscape 6.0.But it doesn't work with IE.. Any help will be greatly appreciated. Ravi.    More>>

Hey ..look at this code..


< img src="../images/toolbar/btn_print-off.gif" alt="print" name="btn07" id="btn07" width="23" height="23" hspace="2" vspace="2" border="0" onclick="window.print()" onMouseOver="swapButton(this,6)" onMouseOut="swapButton(this,6)" style="cursor:hand" >




This pops up an error "Object doesn't support this method or property"
This code works fine with netscape 6.0.But it doesn't work with IE..


Any help will be greatly appreciated.

Ravi.    <<Less

Re: Problem with window.print()

Posted By:   Moushmi_Banerjee  
Posted On:   Wednesday, June 19, 2002 11:20 AM

onClick and onMouseOver are methods of anchor tag. To use them with your image tag you need to nest the image tag within an empty anchor tag. Say anchor tag href=JavaScript:void(null) and on its onClick method say window.print with return true end the anchor tag. Now place your image tag with src and finally close your anchor tag.

this should work.
About | Sitemap | Contact