[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => withhisstripes [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> > >[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Murray *TMM* [ip] => forums@HAHAgrea [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> > [/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => rob::db [ip] => rob@digitalburn [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Print Selected Area Button - Macromedia Dynamic HTML

Print Selected Area Button - Macromedia Dynamic HTML

Heya, I am trying to create a button that users can click on to print a specific text area of the page that I preselect. Does anyone know how to do that? Here is the code I used to simply print the whole page, it's close to what I want: <script language="Javascript1.2"> <!-- // please keep these lines on when you copy the source // made by: Nicolas - [url]http://www.javascript-page.com[/url] var message = "Print this Page"; function printpage() { window.print(); } doent.write("<form><input type=button " +"value=\""+message+"\" onClick=\"printpage()\"></form>"); //--> </script>...

  1. #1

    Default Print Selected Area Button

    Heya,
    I am trying to create a button that users can click on to print a
    specific text area of the page that I preselect. Does anyone know how to do
    that? Here is the code I used to simply print the whole page, it's close to
    what I want: <script language="Javascript1.2">
    <!--
    // please keep these lines on when you copy the source
    // made by: Nicolas - [url]http://www.javascript-page.com[/url]

    var message = "Print this Page";

    function printpage() {
    window.print();
    }

    doent.write("<form><input type=button "
    +"value=\""+message+"\" onClick=\"printpage()\"></form>");

    //-->
    </script>

    withhisstripes Guest

  2. #2

    Default Re: Print Selected Area Button

    Can't work....

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "withhisstripes" <webforumsusermacromedia.com> wrote in message
    news:ded6bi$q0m$1forums.macromedia.com...
    > Heya,
    > I am trying to create a button that users can click on to print a
    > specific text area of the page that I preselect. Does anyone know how to
    > do
    > that? Here is the code I used to simply print the whole page, it's close
    > to
    > what I want: <script language="Javascript1.2">
    > <!--
    > // please keep these lines on when you copy the source
    > // made by: Nicolas - [url]http://www.javascript-page.com[/url]
    >
    > var message = "Print this Page";
    >
    > function printpage() {
    > window.print();
    > }
    >
    > doent.write("<form><input type=button "
    > +"value=\""+message+"\" onClick=\"printpage()\"></form>");
    >
    > //-->
    > </script>
    >

    Murray *TMM* Guest

  3. #3

    Default Re: Print Selected Area Button

    You could use a print media stylesheet that hides everything apart from the
    content you want printing.

    withhisstripes wrote:
    > Heya,
    > I am trying to create a button that users can click on to
    > print a specific text area of the page that I preselect. Does anyone
    > know how to do that? Here is the code I used to simply print the
    > whole page, it's close to what I want: <script
    > language="Javascript1.2"> <!--
    > // please keep these lines on when you copy the source
    > // made by: Nicolas - [url]http://www.javascript-page.com[/url]
    >
    > var message = "Print this Page";
    >
    > function printpage() {
    > window.print();
    > }
    >
    > doent.write("<form><input type=button "
    > +"value=\""+message+"\" onClick=\"printpage()\"></form>");
    >
    > //-->
    > </script>

    rob::db Guest

  4. #4

    Default Re: Print Selected Area Button

    Yeah, that's exactly what I'd like to do, can you point me to a resource that could show me how to do that?
    withhisstripes Guest

  5. #5

    Default Re: Print Selected Area Button

    Just create a new stylesheet attached to your doent, with media='print'
    as a property of the link. The new stylesheet should hide every element on
    the page apart from the one your displaying, and I guess possibly move that
    element into a sensible location for printing.


    withhisstripes wrote:
    > Yeah, that's exactly what I'd like to do, can you point me to a
    > resource that could show me how to do that?

    rob::db Guest

  6. #6

    Default Re: Print Selected Area Button

    If all you want to do is grab a certain part of the page, you could also do it
    this way:

    Wrap all the content you want printed in a <div> tag and give it an 'id'
    attribute
    Then, put an onClick handler on your 'print-page' link/button and point it to
    a javascript function.

    Here's the code:

    JAVASCRIPT
    // this javascript code opens a new window and fills it with everything inside
    the selected <div> tag

    function printPage(ID) {
    var winprint = window.open("","printer","");
    var content = doent.getElementById(ID).innerHTML;
    winprint.doent.open();
    winprint.doent.write('<html><head><title>YOUR TITLE </title><body>');
    winprint.doent.write(content);
    winprint.doent.write('</body></html>');
    winprint.doent.close();
    winprint.focus();
    }

    AND HERE'S THE <html> CODE:
    <body>
    <div id="print_content">
    All the content you want to show up in the new window goes here
    </div>
    </body>

    <a href="#" onClick="printPage('ID');">link/button</a>
    where ID matches the id attribute of the <div> .. in this case 'print_content'

    As a sidenote, the code for the link button does not have to be placed outside
    of the <div> tag; it can be anywhere between <body> and </body>

    rilkesf Guest

  7. #7

    Default Re: Print Selected Area Button

    Fails on Mac/IE5x however.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "rilkesf" <webforumsusermacromedia.com> wrote in message
    news:dedman$iue$1forums.macromedia.com...
    > If all you want to do is grab a certain part of the page, you could also
    > do it
    > this way:
    >
    > Wrap all the content you want printed in a <div> tag and give it an 'id'
    > attribute
    > Then, put an onClick handler on your 'print-page' link/button and point it
    > to
    > a javascript function.
    >
    > Here's the code:
    >
    > JAVASCRIPT
    > // this javascript code opens a new window and fills it with everything
    > inside
    > the selected <div> tag
    >
    > function printPage(ID) {
    > var winprint = window.open("","printer","");
    > var content = doent.getElementById(ID).innerHTML;
    > winprint.doent.open();
    > winprint.doent.write('<html><head><title>YOUR TITLE
    > </title><body>');
    > winprint.doent.write(content);
    > winprint.doent.write('</body></html>');
    > winprint.doent.close();
    > winprint.focus();
    > }
    >
    > AND HERE'S THE <html> CODE:
    > <body>
    > <div id="print_content">
    > All the content you want to show up in the new window goes here
    > </div>
    > </body>
    >
    > <a href="#" onClick="printPage('ID');">link/button</a>
    > where ID matches the id attribute of the <div> .. in this case
    > 'print_content'
    >
    > As a sidenote, the code for the link button does not have to be placed
    > outside
    > of the <div> tag; it can be anywhere between <body> and </body>
    >

    Murray *TMM* Guest

  8. #8

    Default Re: Print Selected Area Button

    Works for me on Mac/IE 5.2.

    Is there a difference between 5.2 and other 5.x versions? I'm still figuring
    out all the quirks between various browsers.


    Originally posted by: Newsgroup User
    Fails on Mac/IE5x however.





    rilkesf Guest

  9. #9

    Default Re: Print Selected Area Button

    Post a link to the page, please. Mac IE5x is incapable of responding to a
    programmatic print request on an HTML page, as far as I know. I'd love to
    see it work, however....

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "rilkesf" <webforumsusermacromedia.com> wrote in message
    news:defjob$bd4$1forums.macromedia.com...
    > Works for me on Mac/IE 5.2.
    >
    > Is there a difference between 5.2 and other 5.x versions? I'm still
    > figuring
    > out all the quirks between various browsers.
    >
    >
    > Originally posted by: Newsgroup User
    > Fails on Mac/IE5x however.
    >
    >
    >
    >
    >

    Murray *TMM* Guest

  10. #10

    Default Re: Print Selected Area Button

    I've just been testing it locally, but I threw up a barebones example at:

    [url]http://oct.sfsu.edu/test.htm[/url]

    As I said, works fine for me in MacIE 5.2. I've checked some other sites that
    use the same method though and, as you said, they don't work. Strange indeed!
    I must be missing something.


    Post a link to the page, please. Mac IE5x is incapable of responding to a
    programmatic print request on an HTML page, as far as I know. I'd love to
    see it work, however....




    rilkesf Guest

  11. #11

    Default Re: Print Selected Area Button

    Okay, thanks for the input, I think that helps. So the ID tag points to
    the file correct? My CSS file with the JS in it is located in the main
    directory and is called 'print.css', but I still don't get it to print. Could
    you possibly look at my code and see if you can see where I am going wrong?
    [url]www.reveration.org/devotional.htm[/url]
    Oh, and I figure if anyone is smart enough to use a Mac in the first
    place, they'll know better than to use IE. :p

    withhisstripes Guest

  12. #12

    Default Re: Print Selected Area Button

    Actually, I tinkered around a bit and found a few simple typo's, so I got it.
    Thanks so much for the help. Now... neither of you know how to get the
    submission form on the website to send its message directly to my e-mail
    without having to use a third party program would you? :/

    withhisstripes Guest

  13. #13

    Default Re: Print Selected Area Button

    > without having to use a third party program would you? :/

    Can't be done, except by using the unreliable mailto: method.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "withhisstripes" <webforumsusermacromedia.com> wrote in message
    news:degags$ecq$1forums.macromedia.com...
    > Actually, I tinkered around a bit and found a few simple typo's, so I got
    > it.
    > Thanks so much for the help. Now... neither of you know how to get the
    > submission form on the website to send its message directly to my e-mail
    > without having to use a third party program would you? :/
    >

    Murray *TMM* Guest

  14. #14

    Default Re: Print Selected Area Button

    Fails for me in IE5.2.3 (5815.1) OS 10.3.9.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "rilkesf" <webforumsusermacromedia.com> wrote in message
    news:defu2f$qf5$1forums.macromedia.com...
    > I've just been testing it locally, but I threw up a barebones example at:
    >
    > [url]http://oct.sfsu.edu/test.htm[/url]
    >
    > As I said, works fine for me in MacIE 5.2. I've checked some other sites
    > that
    > use the same method though and, as you said, they don't work. Strange
    > indeed!
    > I must be missing something.
    >
    >
    > Post a link to the page, please. Mac IE5x is incapable of responding to a
    > programmatic print request on an HTML page, as far as I know. I'd love to
    > see it work, however....
    >
    >
    >
    >

    Murray *TMM* Guest

  15. #15

    Default Re: Print Selected Area Button

    There's no link to the print stylesheet in that page.

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "withhisstripes" <webforumsusermacromedia.com> wrote in message
    news:deg9u1$dks$1forums.macromedia.com...
    > Okay, thanks for the input, I think that helps. So the ID tag points
    > to
    > the file correct? My CSS file with the JS in it is located in the main
    > directory and is called 'print.css', but I still don't get it to print.
    > Could
    > you possibly look at my code and see if you can see where I am going
    > wrong?
    > [url]www.reveration.org/devotional.htm[/url]
    > Oh, and I figure if anyone is smart enough to use a Mac in the first
    > place, they'll know better than to use IE. :p
    >

    Murray *TMM* Guest

Similar Threads

  1. Does anyone know of a pluggin to read square inches of a selected area?
    By Dee Holmes in forum Adobe Illustrator Macintosh
    Replies: 46
    Last Post: October 19th, 02:25 PM
  2. show area on print only.
    By Jamesy in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 3rd, 01:05 PM
  3. Print area has no relation to paper or printer selected?
    By RJ_Cook@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 3
    Last Post: April 1st, 09:55 PM
  4. Print Selected Area
    By Terence_Harvey@adobeforums.com in forum Adobe Photoshop Mac CS, CS2 & CS3
    Replies: 12
    Last Post: March 7th, 11:57 PM
  5. the selected area is empty
    By yous mies in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 3
    Last Post: July 18th, 12:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •