moving form data to another page

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ph_wilson

Thread Starter
Joined
Sep 10, 2004
Messages
3
I need to ideally print form data but whenever i do a window print it prints all of the page including graphic buttons etc.
I thought I could do this by moving data from one page to another but how do i do that?
I have the form data in the form of arrays, basically two pieces of information,a quantity and a cost.
any help would be great as i have tried searching on the net and not got very far..thanks
 
Joined
Aug 2, 2004
Messages
32
Missing some information here. What applciation you using? Is this within Internet Explorer? your question didnt seem very clear at all.
 
Joined
Dec 28, 2003
Messages
896
I belive what he is asking is how do you just print the text on a web page, without the grahics, buttons etc..Is this right? :)
 

ph_wilson

Thread Starter
Joined
Sep 10, 2004
Messages
3
sorry should have made it clear I am designing a web page !

Although I am fairly comfortable with HTML I am just learning javascript and finding it a bit difficult.

Question should have been clearer, I am writing a form the contents of which I want to print when somebody clicks a button, trouble is using window print it prints the whole page, I just want to print a section of the page..is that possible? :
 
Joined
Apr 14, 2001
Messages
2,382
What you really need is asp or php code for that to work easily. If you dont have access to a server that hosts scripts, or know how to write code, then the easiest way is to create a link for print this story at the bottom of the paragraph, and create a text only page for that that link.

eg:(place this onthe bottom of your webpage)

<object id=WBControl width=0 height=0 classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2></object>
<script language=VBScript><!-- //
Sub VBPrint() On Error Resume Next
WBControl.ExecWB 6,1
End Sub
//--></script>

<script language=JavaScript><!-- //
if (window.print) self.print();
else if (navigator.appName.indexOf('Microsoft') !=-1) VBPrint()
setTimeout('self.close()',3000);
//--></script>

Then create a paragraph page, and a form at the bottom of each paragraph(changin paragraph1.htm to paragraph2.htm etc at each link):
<form>
<input type="button" value="Print this item" onClick="window.open('paragraph1.htm','newwin');">
</form>


Or you can place the text you want to be able to print in a text box and call them for printing:
<script language="JavaScript"><!--
if (window.print) {
text = document.mxForm.myTextarea.value;
winId = window.open('','newwin');
with (winId.document) {
write('<body onLoad="window.focus();window.print()"><pre>'+text+'</pre><\/body>');
close();
}
}
//--></script>
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top