From: Phillip on
Hi,
I have page that is trivia quiz. When the person finishes the quiz I have a
text box (on the same page) for them to enter their name. I also have a
command button that I want to print the current page (quiz) and then go to a
NEW page.
Can someone help me the the code for the command button?
Thanks,
From: Stefan B Rusynko on
Create the button as an image (or text) and add a hyperlink to it to the new page
- in the hyperlink add an onclick event to print the page
<a href="newpagefilename.htm" onClick="window.print()">New page</a>, or
<a href="newpagefilename.htm" onClick="window.print()"><img src="buttonimage.jpg"></a>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:3432F096-4282-43BE-BD01-16F6C6CD7A43(a)microsoft.com...
Hi,
I have page that is trivia quiz. When the person finishes the quiz I have a
text box (on the same page) for them to enter their name. I also have a
command button that I want to print the current page (quiz) and then go to a
NEW page.
Can someone help me the the code for the command button?
Thanks,


From: Phillip on
Thanks Stefan,
I added the onClick event, but nothing prints. Here is the code as I have it:

<a href="Quiz_main.htm" onClick="window.print()">Print_score</a>

It goes to the new page but no print. What am I missing?
Thanks,
Phil


"Stefan B Rusynko" wrote:

> Create the button as an image (or text) and add a hyperlink to it to the new page
> - in the hyperlink add an onclick event to print the page
> <a href="newpagefilename.htm" onClick="window.print()">New page</a>, or
> <a href="newpagefilename.htm" onClick="window.print()"><img src="buttonimage.jpg"></a>
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:3432F096-4282-43BE-BD01-16F6C6CD7A43(a)microsoft.com...
> Hi,
> I have page that is trivia quiz. When the person finishes the quiz I have a
> text box (on the same page) for them to enter their name. I also have a
> command button that I want to print the current page (quiz) and then go to a
> NEW page.
> Can someone help me the the code for the command button?
> Thanks,
>
>
> .
>
From: Stefan B Rusynko on
Try changing it to onMouseDown instead of OnClick
<a href="Quiz_main.htm" onMouseDown="window.print()">Print_score</a>
- the default click event to open the link is firing before the event handlers
- the Onmousedown event should fire before the click event


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


"Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:9AA19307-1EBD-4D79-B7B0-A016A367800B(a)microsoft.com...
Thanks Stefan,
I added the onClick event, but nothing prints. Here is the code as I have it:

<a href="Quiz_main.htm" onClick="window.print()">Print_score</a>

It goes to the new page but no print. What am I missing?
Thanks,
Phil


"Stefan B Rusynko" wrote:

> Create the button as an image (or text) and add a hyperlink to it to the new page
> - in the hyperlink add an onclick event to print the page
> <a href="newpagefilename.htm" onClick="window.print()">New page</a>, or
> <a href="newpagefilename.htm" onClick="window.print()"><img src="buttonimage.jpg"></a>
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:3432F096-4282-43BE-BD01-16F6C6CD7A43(a)microsoft.com...
> Hi,
> I have page that is trivia quiz. When the person finishes the quiz I have a
> text box (on the same page) for them to enter their name. I also have a
> command button that I want to print the current page (quiz) and then go to a
> NEW page.
> Can someone help me the the code for the command button?
> Thanks,
>
>
> .
>


From: Phillip on
Hi and thanks again,
It turns our that the onClick did work to print, but only if I published the
page and go to my website to test it. I was checking it before using
"Preview in Browser" icon in front page. It now prints but will not go to
the new page using either onClick or onMouseDown. I'm still missing
something.
Your help again would be appreciated.
Thanks,

"Stefan B Rusynko" wrote:

> Try changing it to onMouseDown instead of OnClick
> <a href="Quiz_main.htm" onMouseDown="window.print()">Print_score</a>
> - the default click event to open the link is firing before the event handlers
> - the Onmousedown event should fire before the click event
>
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> _____________________________________________
>
>
> "Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:9AA19307-1EBD-4D79-B7B0-A016A367800B(a)microsoft.com...
> Thanks Stefan,
> I added the onClick event, but nothing prints. Here is the code as I have it:
>
> <a href="Quiz_main.htm" onClick="window.print()">Print_score</a>
>
> It goes to the new page but no print. What am I missing?
> Thanks,
> Phil
>
>
> "Stefan B Rusynko" wrote:
>
> > Create the button as an image (or text) and add a hyperlink to it to the new page
> > - in the hyperlink add an onclick event to print the page
> > <a href="newpagefilename.htm" onClick="window.print()">New page</a>, or
> > <a href="newpagefilename.htm" onClick="window.print()"><img src="buttonimage.jpg"></a>
> >
> > --
> >
> > _____________________________________________
> > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> > "Warning - Using the F1 Key will not break anything!" (-;
> > To find the best Newsgroup for FrontPage support see:
> > http://www.net-sites.com/sitebuilder/newsgroups.asp
> > _____________________________________________
> >
> >
> > "Phillip" <Phillip(a)discussions.microsoft.com> wrote in message news:3432F096-4282-43BE-BD01-16F6C6CD7A43(a)microsoft.com...
> > Hi,
> > I have page that is trivia quiz. When the person finishes the quiz I have a
> > text box (on the same page) for them to enter their name. I also have a
> > command button that I want to print the current page (quiz) and then go to a
> > NEW page.
> > Can someone help me the the code for the command button?
> > Thanks,
> >
> >
> > .
> >
>
>
> .
>