HTML - Print The Form's Elements
I created a form with html. At the end of the form there are two buttons, the button "entry", and the button "reset". When clicking on "entry" button i want to print the form's elements. How can i do it?
Similar TutorialsHi Guys, I am building a website for a client, and I have included a contact form on the website. It turns out that they would prefer it if the form could be printed out instead of emailed. All I have is 3 fields, and I want them to output to a page where they can print directly. The design of the output page will be minimal as in the end the forms will be faxed to a number. Is there some way I can do this with HTML? Or is advanced language needed? Cheers LTC Hi, I have a form that has a bunch of cascading drop downs - something like Country->State->City->. Each subsequent drop down is populated based on what is selected on the preceding one. What I am having trouble with is the positioning of the labels for these dropdowns. For ex., I want the word 'Country' written exactly above the Country dropdown, the word 'State' above the State dropdown and so on. Unfortunately, anything I try doesn't seem to work. I have used every CSS property I thought would help - margin, position, padding etc., but nothing works. The problem is when I resize the window the labels and the dropdowns are thrown out of whack and it becomes difficult to figure out just by looking which label belongs to which dropdown box. How do I fix this and align the form with their respective labels and make it independent of the size of the window? Thanks! Hi Guys. My website contains a lot of text, and its continually printed by clients as it includes pricing etc. At the moment my pricing page is 4 pages of paper, however I wish to be a touch kinder to mother nature and be a bit more eco-friendly so I have created a document with all the pricing on one page which I have saved as a PDF file. I would like to add a link on my website to "Printer Friendly Version" which would link to the PDF and would bring up a print dialog box. What coding would I need to do this? I think it may very well be Java but I'm not the brightest when it comes to this Any help appreciated! I hope this all made sense! Hi: I would like the freedom to position <input> elements of a form to specific places on my page. What is the proper way to do that please ?? Thanks, -Mel Smith Hi, I have a page that uses AJAX to set a variable, the variable is either true or false. On the page there is a form with a text input, i would like the variable to dictate whether the element is read only or not. So instead of: <input name="cd" value="title" readonly="readonly" /> I would rather something like: <input name="cd" value="title" readonly="$lock" /> Note: I am aware that $lock is PHP but I am not familiar with the syntax in this instance. Thanks in advance, Tom I have created a nice Newsletter Registration form, but I would really like to modify the form so that instead of displaying the browsers default images for text fields, checkboxes, etc, I want it to display my images that I have created. Is this possible without stepping into flash? Thanks Guys! -NH I have a form where a select list can be updated by clicking 'update' next to it. When this is clicked I would ideally like just that to be updated, but I do not think this is possible. I was thinking of having two form actions, one that submits the form as usuall, but one that submits the form somewhere else, depending on which submit button is clicked. If I could have two submit buttons, I could use one to submit the form back to the same script, with the script re-filling the form elements that where filled out, and the select box would then update. So, my main question is...... Is there a javascript submit function that can change the destination of the form? Perhaps this should be in the javascript section! I am trying to set up a contact form for a website I am building. We will be posting a couple of the messages we recieve on different pages on the site. To avoid having too many contact forms, we've lumped them all together into one, using a Drop Down Form Element. I am trying to set it up so that when certian elements are selected from the "Who would you like to contact?" dropdown menu, a check box will come up saying wheather or not they mind us posting their message on the site. I'm attempting to do this using Java Script and this is the code i've been using... PHP Code: <script language="javascript"> function enableaccept() { var who = document.theForm.elements['who'] var accept = document.theForm.elements['accept'] if (who.value=="N") { accept.disabled = true } else { accept.disabled = false } } </script> and in the dropdown menu, this is how i have set it up to work... PHP Code: Who would you like to contact?<br> <select size="1" name="Who"> <option></option> <option value='n' onClick="enableaccept()">__________</option> <option value='y' onClick="enableaccept()">Testimonials</option> <option value='y' onClick="enableaccept()">Praise Reports</option> <option value='y' onClick="enableaccept()">Request Prayer</option> <option value='n' onClick="enableaccept()">Booking Information</option> <option value='n' onClick="enableaccept()">Technical Support</option> </select> (The _________ is where a name should go that I chose not to put out on the forums, no offense to anyone...) For some reason, the check box is still enabled no matter what, and I'm so utterly confused...I'm still rather new to Javascript, so there may be something wrong with my coding, but it all seems that it would make sense...if you could help me out, that would be greatly appreciated In Christ Alone, Fire Fall D0wn I have a form but a text field and a hidden field don't come in form elements.I am alerting all form elements in a javascript function which is invoked on press of a button and these two form elements don't come. Any idea why that will happen. JS function which alerts the form elements is as follows :- function populateSubmitProfile() { var i =0; alert("Number of forms "+document.forms.length) ; for( i = 0 ; i < document.forms[0].elements.length ; i++) { alert("Name of the elements :"+document.forms[0].elements[i].name) ; } } How do I make element's change their height automatically depending on whether they have anything contained within them? My page background is a div's bg image but the div hasn't expanded to the size of the contained elements. The div's name is nicola-bg Here is the site I have the same problem too with #image-section. That div is styled to have large borders but the borders don't extend to the height of the div's containing elements. Hi all I have a print issue in IE v6.x. The website is divided in different frames and I have a menu which contains a print button. This button takes out the content in the main frame and insert it into its own window so it can be printed without the other frames. This works fine in Firefox, if the page is to wide compared to the paper then Firefox automatically resizes the entire page so it fits. This on the other hand does NOT happen in IE, probably because it just does not have than functionality. So the page gets cut and does not look so good when printed. Is there anyway to solve this? This also happens if I have restricted the main div which contains everything to less then a paper size. If the DIV contains other divs besides each other, then the info at the right DIV gets cut when the page is at its end (in width). But like I said this works fine in Firefox since it automatically makes the page smaller. Is there anyway to do something like this in IE as well? Thx in advance for all help! Hi, I can't get the variable E to print at the end by the form answer. It is calculating cubic inches, then the Answer is to gallons. I want to see both answers. Thanks in advance!! Code follows: <HTML> <HEAD> <TITLE>Calculation</TITLE> <SCRIPT LANGUAGE="JavaScript"> function CalculateSum(Atext, Btext, Ctext, Dtext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); var C = parseFloat(Ctext); var D = parseFloat(Dtext); var E = (A*C*D) + ((A/2) * (B-C)*D); form.Answer.value = E/200 ; } /* ClearForm: this function has 1 argument: form. It clears the input and answer fields on the form. It needs to know the names of the INPUT elements in order to do this. */ function ClearForm(form) { form.input_A.value = ""; form.input_B.value = ""; form.input_C.value = ""; form.input_D.value = ""; form.input_E.value = ""; form.Answer.value = ""; } // end of JavaScript functions --> </SCRIPT> </HEAD> <BODY> <P><FONT SIZE="+2">Calculation</FONT></P> <FORM NAME="Calculator" METHOD="post"> <P>Enter A: <INPUT TYPE=TEXT NAME="input_A" SIZE=10></P> <P>Enter B: <INPUT TYPE=TEXT NAME="input_B" SIZE=10></P> <P>Enter C: <INPUT TYPE=TEXT NAME="input_C" SIZE=10></P> <P>Enter D: <INPUT TYPE=TEXT NAME="input_D" SIZE=10></P> <P><INPUT TYPE="button" VALUE="CALCULATE" name="AddButton" onClick="CalculateSum(this.form.input_A.value, this.form.input_B.value, this.form.input_C.value, this.form.input_D.value, this.form )"></P> <P><INPUT TYPE="button" VALUE="Clear Fields" name="ClearButton" onClick="ClearForm(this.form)"></P> <P>Cubic Inches = <script type="text/javascript"> document.write(E); </script> <br> Gallons =<INPUT TYPE=TEXT NAME="Answer" SIZE=12> </P> </FORM> </BODY> </HTML> Hi, how can I print the page ? <a>Print the page</a> should I use javascript ? which is the correct command (cross-platform) ? thanks In IE6 and FF, my page prints just fine. In IE7, depending on the environment, it either prints next to nothing or a paragraph of text. Either way, it's missing about 2-3 pages of content. I've scoured online and can't find any fixes. Any assistance would be much appreciated. Hello to all experts in HTML, I want to know, because when I try to print the contents of a DIV I print all text except the images. I created a DIV centered on my page, and inside there is some text and a background image. I haven't used the <IMG> tag for the background image but the style: background-image:#; <div> <a class="print" href="#" onclick="window.print()"><img src="icon.png" /><br />Print</a> <div id="content"> <p> eccc...... </div> </div> Can you please explain me, why I did not print from what I see from my browser? Thank you! ps. Sorry for my bad English. I am working on an application within a website. Most of the HTML for the entire site, I did not create myself, just some HTML and CSS for a specific application. Even in that application, I imported some of the text (which contains HTML tags) from a previous application. So, I only did a small portion of the HTML/CSS. My problem is that when users print out this page in IE6, some of the rows of the main table are missing from the printout. For example, this page: http://www.northcarolina.edu/pe_test/sample_pe.php Does any one have any knowledge of a bug that would cause IE6 not to print some rows? Does any one see any reasons why some rows in the tables (the ones with class='workplan') would skip rows when printing? Thank You. Hello friends, I work for a company that sends out a monthly newsletter by email. We are trying to motivate people to print out the file to have it instead of just looking at it once in their inbox and forgetting it. So what we were thinking is we could make a file with "Print Newsletter for Pricing" in the price slots, then have another file with all the pricing that when they clicked a (presumably HTML) link like "Print File Here" it would then call up the PDF File with all the prices and print it. Is this possible? Amen, Christapher I am setting up a website to print free birthday cards. However I am not at all experienced in html. Basically I want the customers to print the cards without downloading the image. I thought I could do this perhaps by loading what I want printed in an iframe (???) The actual page will have the image with a watermark on it, and a printing link that prints the card without the watermark I have a timesheet template that I have converted from word to html. I'd like to make it so users can type onto the sheet though and print it off showing their name/hours/dates etc. The template is similar looking to this !! Company Logo !! Contact details, fax number, telephone numbers etc Contracted company ------- Contractors Name ------- ================== Day Date Hours Mon --- --- Tue --- --- Wed --- --- Thu --- --- Fri --- --- Sat --- --- Sun --- --- ================== Total hours worked ----- I have a feeling this can be done using javascript but havent a clue how. Or, can I just make text boxes that allow a user to type into but wont be shown on the print out? I'd like it so only the timesheet is printed off with all the entered data rather than any other parts of the website. Is there any way to avoid to print buttons or images in printer |