1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

moving form data to another page

Discussion in 'Web Design & Development' started by ph_wilson, Sep 10, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. ph_wilson

    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
     
  2. Seb7

    Seb7

    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.
     
  3. cnelson04

    cnelson04

    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? :)
     
  4. ph_wilson

    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? :
     
  5. Sequal7

    Sequal7

    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>
     
  6. ph_wilson

    ph_wilson Thread Starter

    Joined:
    Sep 10, 2004
    Messages:
    3
    Great thanks I'll try these out :)
     
  7. Sponsor

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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/272353

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice