OCCRA
Go to Post I love robotics, it has a spot for every kinda future career a student chooses. - Bharat Nain [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-13-2004, 06:36 PM
KathieK's Avatar Unsung FIRST Hero
KathieK KathieK is offline
Sometimes FIRST makes my head hurt!
AKA: FIRST Senior Mentor
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Rockville, CT
Posts: 3,601
KathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond repute
Send a message via AIM to KathieK
Print a different page than current page?

I have an html page describing an event we will be holding, "description.html". I have a Word document (which I can convert to PDF or html format) which is the registration form for the event.

I would like to create a link at the bottom of "description.html" that says, "Click here to print the registration form." I want the viewer to be able to click on the link and have the registration form automatically go to the printer, without having to open it first.

I found a javascript that will print a different page than the current page, but only if you go to FILE, PRINT in the browser. I would really like to do it with a link or a button.

I was told you can accomplish this with the use of framesets, but I couldn't get it to work right.

Can anyone help?
__________________
www.usfirst.org | www.nefirst.org | www.ctfirst.org | www.firstnemo.org
Note: I am employed as a Senior Mentor by FIRST. The opinions expressed in my posts are wholly mine and not representative of the FIRST organization.
  #2   Spotlight this post!  
Unread 08-14-2004, 01:33 AM
mtaman02's Avatar
mtaman02 mtaman02 is offline
FIRST's Spare, Queuer & Tech guy =)
AKA: Mike M. / Mouse =)
no team (FRC Volunteer)
Team Role: Alumni
 
Join Date: Jun 2002
Rookie Year: 2001
Location: Staten Island, NYC
Posts: 1,508
mtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant futuremtaman02 has a brilliant future
Send a message via AIM to mtaman02 Send a message via Yahoo to mtaman02
Re: Print a different page than current page?

u want it to go strait to the printer?

I know that if u put a link on description.html to the form ure placing there as well it will ask u to save or open it. from either or both u can then open and print the page

as for making it go straight to the printer i'm not sure maybe IM brandon and maybe he can assist
__________________
Past FIRST Robotics Events that I proudly volunteered at:
FLL: NY State Competition '03
FRC: NYC Remote Kickoff '04 & NYC Regionals '04-'07 ,'10-'13 & NJ Regionals '06-'10, Finger Lakes Regional '09 & SBPLI Regional '08-'13 and the World Championship in '05 (Galileo Field) '07 (Newton Field) '09 (Practice Fields Attendant / FTA(A)), CeBIT Convention in '04 & NextFEST in '06 both held @ the Javitts Center, Monty Madness '07-'10, Panda-monium '08, B.Eruption '08 & '09, Ramp Riot '08, PARC '09 & '10, BR^2 '09 & Wol. Inv. '09 -'12
2013 FIRST Robotics Off Season Events that I hope to volunteer at:
Where is Wolcott Invitational
2013 FIRST Robotics Events that I will be volunteering at:
SBPLI Reg.
Volunteer Resume:
Alt & Lead Team Queuer, Field Repair/Reset, Field Setup/Breakdown, Spare Parts Attendant, Field Power Controller/Score Keeper, Co-Emcee & Official Scorer, Control System Advisor, FIRST Tech Advisor Assistant & recently Practice Field Attendant.
  #3   Spotlight this post!  
Unread 08-14-2004, 01:35 AM
evulish's Avatar
evulish evulish is offline
1010100
AKA: Grant Harding
#0084 (WATTNESS (bot: Chuck))
Team Role: Alumni
 
Join Date: Jul 2002
Location: Towanda/Wysox, PA
Posts: 1,434
evulish is just really niceevulish is just really niceevulish is just really niceevulish is just really nice
Send a message via AIM to evulish
Re: Print a different page than current page?

You want this button to automatically send the page to the printer without loading on the screen? As far as I know, that's not possible. And I wouldn't really recommend it if it is. It's nice to see what you're printing before-hand to see what it is, how long it is, etc. I'd either go with a PDF or an HTML file for an online doc. I'm a bit opposed to using the MS Word format on a website since not everyone has Word and the formating of the page is more like to be off than with HTML or a PDF.
__________________
I'm a professional web developer. I'm good with PHP, Perl, Java/JSP, some RoR, XML, Javascript (AJAX as well), (x)HTML, CSS, etc.. Validated code is good; fully cross-browser code is better (you comply to your users and the software they use, not the other way around. Sorry!)
  #4   Spotlight this post!  
Unread 08-14-2004, 05:30 AM
JohnBoucher's Avatar
JohnBoucher JohnBoucher is offline
Registered User
FRC #0237
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Watertown, CT
Posts: 2,680
JohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond repute
Re: Print a different page than current page?

I found this at HtmlGoodies.
It doesn't do exactly what you want, but it does show an onload command that might work for you.
Quote:
And, if you really want to be annoying, off of just about any Event Handler like this, adding onLoad will force a print request when the page loads:


onLoad="window.print()"
  #5   Spotlight this post!  
Unread 08-14-2004, 05:20 PM
KathieK's Avatar Unsung FIRST Hero
KathieK KathieK is offline
Sometimes FIRST makes my head hurt!
AKA: FIRST Senior Mentor
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Rockville, CT
Posts: 3,601
KathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond repute
Send a message via AIM to KathieK
Re: Print a different page than current page?

Thanks for your suggestions. I agree about the Word document; we normally do not post docs in that format.
__________________
www.usfirst.org | www.nefirst.org | www.ctfirst.org | www.firstnemo.org
Note: I am employed as a Senior Mentor by FIRST. The opinions expressed in my posts are wholly mine and not representative of the FIRST organization.
  #6   Spotlight this post!  
Unread 08-19-2004, 07:40 AM
Aignam's Avatar
Aignam Aignam is offline
This Space For Sale
AKA: Anthony Mangia
#1257 (Parallel Universe)
Team Role: Scout
 
Join Date: Oct 2002
Rookie Year: 2003
Location: North Brunswick, New Jersey
Posts: 877
Aignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant futureAignam has a brilliant future
Send a message via AIM to Aignam Send a message via Yahoo to Aignam
Re: Print a different page than current page?

Will this help you at all?
http://www.dynamicdrive.com/dynamici...printstyle.htm
__________________
Some Thoughts to Ponder
How does a sign turn into a lady friend? Don't optional stop signs ruin the purpose? What are pneumatics? Am I really banned from 229 for life? Can walls get bigger?

Aignam. Pronounced A-Num. Mangia backwards.

NJFIRST.org | Best Thread. Ever.

AIM: Aignam | ICQ: 265237569 | E-mail: AnthonyMangia@aol.com | HTTP: www.aignam.com
  #7   Spotlight this post!  
Unread 08-24-2004, 07:25 PM
KathieK's Avatar Unsung FIRST Hero
KathieK KathieK is offline
Sometimes FIRST makes my head hurt!
AKA: FIRST Senior Mentor
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Rockville, CT
Posts: 3,601
KathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond repute
Send a message via AIM to KathieK
Re: Print a different page than current page?

I figured out how to do it.

In the current document, in the HEAD tag, type the following code (where href= refers to the different page you want to print without loading to the screen first):

<link rel="alternate" media="print" href="different_page.html" />

<script>
function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) window.print()
}
</script>


and then in the BODY of the current document type:

<a href="javascriptrintWindow()">Print The Different Page</a>

(I wanted a link to print and not a print button).

I know this won't work for every browser, but it will work for my purposes. Thanks to everyone who replied with suggestions!
__________________
www.usfirst.org | www.nefirst.org | www.ctfirst.org | www.firstnemo.org
Note: I am employed as a Senior Mentor by FIRST. The opinions expressed in my posts are wholly mine and not representative of the FIRST organization.
  #8   Spotlight this post!  
Unread 08-24-2004, 07:26 PM
KathieK's Avatar Unsung FIRST Hero
KathieK KathieK is offline
Sometimes FIRST makes my head hurt!
AKA: FIRST Senior Mentor
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Rockville, CT
Posts: 3,601
KathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond reputeKathieK has a reputation beyond repute
Send a message via AIM to KathieK
Re: Print a different page than current page?

LOL, OK, I have no idea how to get that smiley face outta the code! But you can figure out what I meant!
__________________
www.usfirst.org | www.nefirst.org | www.ctfirst.org | www.firstnemo.org
Note: I am employed as a Senior Mentor by FIRST. The opinions expressed in my posts are wholly mine and not representative of the FIRST organization.
  #9   Spotlight this post!  
Unread 08-24-2004, 08:10 PM
rowe rowe is offline
Eric Rowe
FRC #1097 (Site 3 Engineering)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Sacramento, CA
Posts: 133
rowe has a spectacular aura aboutrowe has a spectacular aura about
Send a message via AIM to rowe Send a message via MSN to rowe Send a message via Yahoo to rowe
Re: Print a different page than current page?

Quote:
Originally Posted by KathieK
LOL, OK, I have no idea how to get that smiley face outta the code! But you can figure out what I meant!
use the [ code][/ code] (spaces added so it wouldn't actaully do it)

if you want to add another line in your code you can have it so theres a link to the page you want printed if the browser doesnt support it.

it being this:
Code:
<link rel="alternate" media="print" href="different_page.html" />

<script type="text/javascript">
function printWindow(){
bV = parseInt(navigator.appVersion)
if (bV >= 4) {
  window.print()
}
else {
  window.location="different_page.html";
}
</script>

<a href="javascript:printWindow()">Print The Different Page</a>
think that should work, you might have to debug but thats the general idea
__________________
Eric Rowe | Alumn
Team 1097 | Site 3 Engineering
2005 Silicon Valley Regional Finalists
2005 Silicon Valley Regional Sportsmanship Award
2005 Sacramento Regional Finalists
2005 Sacramento Regional Sportsmanship Award
2004 Silicon Valley Regional Sportsmanship Award
2004 Sacramento Regional Visualization Award
2004 Sacramento Regional Engineering Inspiration Award
  #10   Spotlight this post!  
Unread 08-24-2004, 08:11 PM
Joshua May's Avatar
Joshua May Joshua May is offline
Go Bears!
FRC #1110 (Binary Bulldogs)
Team Role: College Student
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Berkeley, CA
Posts: 1,306
Joshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond repute
Send a message via AIM to Joshua May
Re: Print a different page than current page?

I think that this should work, but I haven't tested it:

Code:
<a onClick="window.print(http://www.domain.com/pagetoprint.html)">
__________________
The FIRST Wiki - openFIRST - Ultimate Robot Challenge - URC Wiki
I currently have 50 GMail invites, PM or email me for one.
UC Berkeley Class of 2009

2005 Las Vegas Regional Autodesk Visualization Award
2005 Las Vegas Regional #8 Seeded Alliance with 988 and 1505
2006 Southern California Regional #15 seed
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A question about current.... Adam Y. Electrical 41 11-26-2004 08:46 PM
Current Sensor Joshua May Programming 6 02-12-2004 09:48 AM
using a current sensor to "brake" a motor Max Lobovsky Control System 4 02-10-2004 09:51 PM
Current Monitoring system questions PyroPhin Technical Discussion 44 02-17-2003 02:34 PM
What happens / why do motors stall? DanL Technical Discussion 19 11-21-2002 06:19 AM


All times are GMT -5. The time now is 02:02 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi