Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print a indvidual frame programatically?
Message
From
10/08/2002 14:08:09
 
 
To
10/08/2002 13:49:19
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00688324
Message ID:
00688343
Views:
16
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform