Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to print a indvidual frame programatically?
Message
De
10/08/2002 14:08:09
 
 
À
10/08/2002 13:49:19
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00688324
Message ID:
00688343
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>Thanks for the suggestion. I think that I understand what you are trying to tell me, but, I'm not sure hot to make it work. Perhaps, I should provide more details of my situation. In the frame that has the "Print" button, it calls a javascript function called printit() and is as follows:

This is way too complicated for that single purpose. :)

Try something like this from the calling frame:
<A HREF=javascript:parent.YourFrameName.print()>Print the content of the YourFrameName frame</A>
Note that will only work in Netscape. If you wish to make that work in IE, you'll have to use another approach. Basically, the concept is to put the focus on the targeted frame. IE will only print where the focus is. So, even if you put the target in the command, it won't work. So, the focus has to be put in the proper frame first. Something like this will work:
<A HREF=javascript:PrintIt()>Print the content of the YourFrameName frame</A>

<SCRIPT>
function PrintIt()
{
   window.parent.YourFrameName.focus()
   window.parent.YourFrameName.print()
}
</SCRIPT>
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform