954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

document.write to new window and into a 3 column table! Help Please!

I need help with newWin.document.write. I can document.write to a new window, but I need it to seperate the information into three columns so that the user can print the new window containg the information that they entered into the form fields. This can not be used in conjunction with cgi, asp php or other. I need a java script to handle this (java script, .js, .class and such). I hope this makes since. Below you will find the code I have already written. Just copy and paste the code into HTML editor and save to view (IE only). Then create another page (blank) and save as PlayerRoster.htm. By doing this you will understand what it is I am trying to do. All this must be able to reside on the users's computer not on the internet. You can email me at [email="LowelGoss@msn.com"]LowelGoss@msn.com[/email]

You may have to copy to notepad first and then select all and copy and then paste into the html editor for it to work right.

Here is the code:

Team Roster




Fill in the

form fields below. When you are finished click on the submit button to get

a printable page. To print the new Player Roster page click on "File" on

the menu bar at the top of the new page and then select "Print".



 

     

Players Name

Uniform #

Position





1.





2.





3.





4.





5.





6.





7.





8.





9.





10.





11.





12.





13.





14.





15.





 

Back to Top









End Of Code:

LowelG
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

I haven't looked at this in detail, but you can layout it columns by using divs, can't you?

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 
I haven't looked at this in detail, but you can layout it columns by using divs, can't you?


I am a newbie at java (self teahing out of books).

I have tried several ways to pass the information from the form to the new document, but can't get it to seperate into appropriate columns. Wants to group everyting into one column (bunched together)

Example1:

Players name Uniform # Position
-------------------------------------------------

1. Lowel28leftfield

I have also tried dashes and dots, But because names can vary in length I get something like the example below.


Example 2:

Players name Uniform # Position
-------------------------------------------------

1. Lowel Goss.....28........leftfield

LowelG
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

JavaScript... very different from Java.

I should have some time tomorrow to work up some sample code.

tgreer
Made Her Cry
Team Colleague
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
 
LowelG
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

Now I know writing cookie scripts is a daunting task one I don't personally like to do, but what if basic cookie-place and cookie-retrieve scripts could do this? I'm not sure if passing variables in this manner is possible to achieve what i need. Any thoughts on this? Anyone?

LowelG
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

You may want to try looking at http://javascript.internet.com/cookies/ for genral cookie scripts which if you understand some of other JavaScript stuff you can find out for setting and getting the cookies, sorry but I can't find the example that I learned it from and I'm away from my home computer, that has my cookies exmples on it, when I return home I'll try to find the example and post it around Monday.

eagleeye
Junior Poster in Training
87 posts since Dec 2004
Reputation Points: 11
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You