Print page and go to differen page

P

Phillip

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,
 
S

Stefan B Rusynko

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>




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,
 
P

Phillip

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
 
S

Stefan B Rusynko

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!" (-;
_____________________________________________


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
 
P

Phillip

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 said:
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!" (-;
_____________________________________________


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 said:
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>




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,


.


.
 
S

Stefan B Rusynko

Don't understand why the link wouldn't work
- unless you added a return false to the OnClick or OnMouseDown event handler
Test the link first w/o any event handler, then w/ the OnMouseDown




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 said:
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!" (-;
_____________________________________________


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 said:
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>




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,


.


.
 
P

Phillip

Hi again,
Without the onMouseDown the link works. With the onMouseDown the page
prints but the link does not work.
Is there something wrong with the syntax? Here's my code:

<a href="Quiz_main.htm" onMouseDown="window.print()">Print score</a>

I'm using Access 2000, could that make a difference?
Thanks again,

Stefan B Rusynko said:
Don't understand why the link wouldn't work
- unless you added a return false to the OnClick or OnMouseDown event handler
Test the link first w/o any event handler, then w/ the OnMouseDown




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 said:
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!" (-;
_____________________________________________


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 said:
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>




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,


.


.


.
 
S

Stefan B Rusynko

No
- the html is correct and use of an Access DB should have no impact on just a link




Hi again,
Without the onMouseDown the link works. With the onMouseDown the page
prints but the link does not work.
Is there something wrong with the syntax? Here's my code:

<a href="Quiz_main.htm" onMouseDown="window.print()">Print score</a>

I'm using Access 2000, could that make a difference?
Thanks again,

Stefan B Rusynko said:
Don't understand why the link wouldn't work
- unless you added a return false to the OnClick or OnMouseDown event handler
Test the link first w/o any event handler, then w/ the OnMouseDown




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 said:
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!" (-;
_____________________________________________


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 said:
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>




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,


.


.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top