JavaScript - Where Can I Get This Feedback Form Script
Have a look at the java script feedback form on this page
http://christmas.cre8tivebug.com/ the button is on the right hand side of the browser window.. when you click on it the feed back form shows up in the center of the screen and dims out the background.. does anybody know where i can get this script Thanks Similar TutorialsHi This is a pretty easy beginner question I'm trying to doa feedback form for my website but having problems with the send button here is my code could someone tell me where i'm going wrong <html> <title>Feedback form</title> <body> <h2> Feedback Form </h2> <form> <FORM METHOD = Post ACTION = mailto:julie_bloggs@hotmail.co.uk> <p>E-mail: <INPUT TYPE = text NAME = Email SIZE = 30 <p>Please enter your name:<INPUT TYPE = text NAME =readeR <br> Could you fill in this survey please <br> Do you live in New Brighton? <br><INPUT TYPE = checkbox NAME = Yes>Yes <br><INPUT TYPE = checkbox NAME = No>No <br><INPUT TYPE = checkbox NAME = Moving>Moving soon <p>Your Comments <br> <TEXTAREA NAME = Address ROWS=4 COLS=40> </TEXTAREA> <P> <INPUT TYPE =Submit VALUE = "Send"> <INPUT TYPE =reset VALUE = "clear the form"> </FORM> </HTML> I completed a simple JavaScript program which calculates the area of the 4 walls of house (so post to represent the total are to be painted). I am simply looking for feedback on how to make the code better and/or simpler. Code: <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Calculate Total Area To Be Painted</title> <script type = "text/javascript"> <!-- function calculate() {wall1_width = window.document.form1.wall1w.value; wall1_height = window.document.form1.wall1h.value; wall2_width = window.document.form1.wall2w.value; wall2_height = window.document.form1.wall2h.value; wall3_width = window.document.form1.wall3w.value; wall3_height = window.document.form1.wall3h.value; wall4_width = window.document.form1.wall4w.value; wall4_height = window.document.form1.wall4h.value; total1_area = (wall1_width * wall1_height) + (wall2_width * wall2_height) + (wall3_width * wall3_height) + (wall4_width * wall4_height); window.document.form1.total1.value = total1_area; } // --> </script> </head> <body> <form name='form1'> <table cellspacing='0'> <td> <center> <b>Walls</B><br><br> Wall 1 Width: <input type='text' name='wall1w' style="width:40px;"> ft.<br> Wall 1 Height: <input type='text' name='wall1h' style="width:40px;"> ft.<br> Wall 2 Width: <input type='text' name='wall2w' style="width:40px;"> ft.<br> Wall 2 Height: <input type='text' name='wall2h' style="width:40px;"> ft.<br> Wall 3 Width: <input type='text' name='wall3w' style="width:40px;"> ft.<br> Wall 3 Height: <input type='text' name='wall3h' style="width:40px;"> ft.<br> Wall 4 Width: <input type='text' name='wall4w' style="width:40px;"> ft.<br> Wall 4 Height: <input type='text' name='wall4h' style="width:40px;"> ft.<br><hr width='200'><br> <input type='button' value='Calculate' onClick='calculate();'><br><hr width='200'> </center> </td></tr> <tr><td> <center> <b>Total Area To Be Painted</B><br> Total Area: <input type='text' name='total1' style="width:100px;"> sq. ft.<br><hr width='200'><br> </center> </td></tr> </table> </form> </body> </html> Thanks to codingforums that help me to gain success with my javascript program! Please let me know what do you think about it: http://backslash.altervista.org/messa/mass_search.html The js script read the page http://backslash.altervista.org/messa/orari_messa.html and get the church's data and the mass's time. I know it'll better use a db but i have no control on server where the html page is (the mine is only a copy) and i want to do something that if the owner of the server want put in, it can without problem. Any review will be very appreciated Thanks ps: look at the footer pps: sorry it's all in italian Dear all, MAIN QUESTIONS : QUESTIONS for www.cyoffshore.byethost12.com/feedback4test.html I designed the Contact Us (Feedback) page of my website but something goes wrong. I would like to set an email address or some email addresses where the visitors can find me. Now, this function does not work! I would also like the users / visitors who complete and submit the (my) Contact Form, to receive an auto-confirmation to their email which will confirms that they have addressed to me with their details (their name, address, tel ,etc) according to their input into the fields and options from the (my) Contact form and if they would like to see their written request (what they have written to me if they did), they could use an option button from the (my) Contact Form. Actually the details of their written request will depend of what they would like to choose (depends on their choice). According to the submitted Contack Form, generally many users take the advantage of the Contact Us Forms where they send spam emails via the Contact Form. This might be avoid by the usage of the free tool: http://www.google.com/recaptcha Below is the url of the feedback.html page of my website. I have created a copy of the same and I renamed it to: feedback4test.html for testing purposes. www.cyoffshore.byethost12.com/feedback4test.html Here is the code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <!-- this template was designed by http://www.tristarwebdesign.co.uk - please visit for more templates & information - thank you. --> <head> <title>cyproservices</title> <!-- change to whatever you want as the title for your website --> <meta name="description" content=" " /> <!-- enter a description for your website inside the " " --> <meta name="keywords" content=" " /> <!-- enter a a string of keywords that relate to your website inside the " " --> <meta http-equiv="Content-Language" content="en-gb" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <div id="headercont"> <div id="header"> <h1><span>cyproservices</span></h1> </div> </div> <div id="menucont"> <div id="menu"> <ul> <li><a title="link one" title="home" href="index.html">ABOUT CYPRUS</a></li> <li><a title="link two" href="ourservices.html">OUR SERVICES</a></li> <li><a title="link three" href="offshorejurisdictions.html">OFFSHORE JURISDICTIONS</a></li> <li><a title="link four" href="fees.html">PRICES</a></li> <li><a class="active" href="feedback.html">CONTACT US</a></li> </ul> </div> </div> <div id="maincont"> <div id="main"> <h1>Feedback</h1> <p style="margin-top: 0; margin-bottom: 0" align="justify"> <font size="3" face="Book Antiqua" color="#FF0000"> Tell me what you think about my website. I welcome all of your comments and your suggestions.</font></p> <form method="POST" action="--WEBBOT-SELF--" onSubmit="location.href='../_derived/nortbots.htm';return false;" name="SENDEMAIL" webbot-onSubmit> <!--webbot bot="SaveResults" u-file="C:\Users\antonis\Documents\My Documents\My webs\cyproservices\_private\formresults.csv" s-format="TEXT/CSV" s-label-fields="TRUE" b-reverse-chronology="FALSE" s-date-format="%d %b %Y" s-time-format="%H:%M:%S" s-builtin-fields="REMOTE_NAME REMOTE_USER HTTP_USER_AGENT Date Time" u-confirmation-url="confirm.htm" s-email-address="georgeashiotis@yahoo.com" s-email-format="TEXT/PRE" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" --><p align="justify" style="margin-top: 0; margin-bottom: 0"><strong><font color="#666666" face="Book Antiqua"> What kind of comment would you like to send?</font></strong></p> <dl> <dd> <p align="justify" style="margin-top: 0; margin-bottom: 0"><font color="#666666" face="Book Antiqua"><strong><input type="radio" name="MessageType" value="Complaint">Complaint <input type="radio" name="MessageType" value="Problem">Problem <input type="radio" checked name="MessageType" value="Suggestion">Suggestion <input type="radio" name="MessageType" value="Praise">Praise</strong></font></dd> </dl> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong><font color="#666666" face="Book Antiqua"> Subject:</font></strong></p> <blockquote> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="text" size="26" maxlength="256" name="Subject"></p> </blockquote> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong><font color="#666666" face="Book Antiqua"> Enter your comments in the space provided below:</font></strong></p> <dl> <dd> <p align="justify" style="margin-top: 0; margin-bottom: 0"><textarea name="Comments" rows="5" cols="42"></textarea></dd> </dl> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong><font color="#666666" face="Book Antiqua"> Tell me how to get in touch with you:</font></strong></p> <dl> <dd> <table> <tr> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong> <font color="#666666" face="Book Antiqua">Name:</font></strong></td> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="text" size="35" maxlength="256" name="Username"></td> </tr> <tr> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong> <font color="#666666" face="Book Antiqua">E-mail:</font></strong></td> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="text" size="35" maxlength="256" name="UserEmail"></td> </tr> <tr> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong> <font color="#666666" face="Book Antiqua">Tel:</font></strong></td> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="text" size="35" maxlength="256" name="UserTel"></td> </tr> <tr> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><strong> <font color="#666666" face="Book Antiqua">Fax:</font></strong></td> <td> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="text" size="35" maxlength="256" name="UserFAX"></td> </tr> </table> </dd> </dl> <p align="justify" style="margin-top: 0; margin-bottom: 0"> <strong><font color="#666666" face="Book Antiqua"> </font></strong><p align="justify" style="margin-top: 0; margin-bottom: 0"> <strong><font color="#666666" face="Book Antiqua"> <input type="checkbox" name="ContactRequested" value="ContactRequested"> Please contact me as soon as possible regarding this matter.</font></strong><p align="justify" style="margin-top: 0; margin-bottom: 0"> <p align="justify" style="margin-top: 0; margin-bottom: 0"><input type="submit" value="Submit Comments"> <input type="reset" value="Clear Form"></p> </form> </li> </ul> </td> </tr> </table> </div> </div> </div> <div id="footercont"> <div id="footer"> <div id="footerleft"> <p><a title="back to top" href="#headercont">^ back to top</a></p> </div> <div id="footerright"> <p>template design by <a title="derby web design" href="http://www.tristarwebdesign.co.uk">tristar web design</a></p> </div> </body> </html> </body> </html> According to the above CODE , I would like to inform you that I've just done a copy and paste to the above FORM from an other website of mine which is working properly, meaning that I do receive emailS from the users/ visitors when they fill and submit the (my) Contact Form. . This website is www.cypruspainters.net and the related web link is: http://cypruspainters.net/feedback2.htm The related CODE of the secondary website which I have copied and pasted the above code is the following CODE: : Code: <html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> <meta content="en-us" http-equiv="Content-Language"> <title>Feedback2</title> <meta name="Microsoft Theme" content="pixel 011"> </head> <body background="_themes/pixel/pixbkgnd.gif" bgcolor="#FFFFFF" text="#000000" link="#6666CC" vlink="#999999" alink="#663333"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"> <tr> <td width="49" colspan="2" align="center"> <p style="margin-top: 0; margin-bottom: 0"> <a href="http://www.agora-gallery.com/" rel="nofollow" target="_blank"> <img border="0" src="photogallery/logoForLinks2.gif" hspace="3" width="125" height="78"></a></p> </td> <td align="center" width="907"><p style="margin-top: 0; margin-bottom: 0"> <img border="0" src="HEADERS/feedback2.gif" width="621" height="60"></td> </tr> <tr> <td width="882" colspan="3" style="border-bottom-style: none; border-bottom-width: medium"> <p style="margin-top: 0; margin-bottom: 0"></td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td style="border-bottom-style: solid; border-bottom-width: 1" align="right"> <h4 style="margin-top: 0; margin-bottom: 0"> </h4> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="727" height="78"> <tr> <td style="border-style: none; border-width: medium" valign="top" width="140"> <p> <!--webbot b-include-home="TRUE" b-include-up="FALSE" bot="Navigation" s-orientation="vertical" s-rendering="graphics" s-theme="nature 100" s-type="siblings" --> </p> <p><br> </p> <p> </p> </td> <td style="border-style: none; border-width: medium" valign="top" width="3"> <p></p> </td> <td height="100%" style="border-style: none; border-width: medium" valign="top" width="584"> <h3 align="justify" style="margin-top: 0; margin-bottom: 0"> <font color="#FF0000" face="Book Antiqua" size="3">Tell me what you think about my website. I welcome all of your comments and your suggestions.</font></h3> <h1><b><b><b><b><b>Contact Us:</b></b></b></b></b></h1> <form action="test.mf" method="post"> Your Name:<br /> <input name="Name" size="20" type="text" value="" /><br /> <br /> Email:<br /> <input name="Email" size="20" type="text" value="" /><br /> <br /> Comments:<br /> <textarea cols="40" name="Comments" rows="10"></textarea><br /> <br /> <script src="http://api.recaptcha.net/challenge?k=6LfxMwYAAAAAAM8fEdeJUlJzGmueIL9-gDhnUdpo " type="text/javascript"></script> <noscript> <iframe frameborder="0" height="300" src="http://api.recaptcha.net/noscript?k=6LfxMwYAAAAAAM8fEdeJUlJzGmueIL9-gDhnUdpo " width="500"> </iframe><br> <textarea cols="40" name="recaptcha_challenge_field" rows="3"> </textarea> <input name="recaptcha_response_field" type="hidden" value="manual_challenge"></noscript><input type="submit" value="Submit Form" /> </form> </td> </tr> </table></td> </tr> </table></td> </tr> </table> <blockquote> </blockquote> <p> </p> <p style="margin-top: 0; margin-bottom: 0"> </p> <p style="margin-top: 0; margin-bottom: 0"> <a href="index.htm"><img align="right" border="0" height="40" src="images/Press/home3.gif" width="40"></a></p> <p style="margin-top: 0; margin-bottom: 0"> </p> <table border="0" cellpadding="0" cellspacing="0" width="746" height="0%" style="border-collapse: collapse"> <tr> <td valign="baseline" width="746"> <p align="right" style="margin-top: 0; margin-bottom: 0"> <a href="Links.htm"> <img border="0" src="images/Press/back.gif" width="47" height="29"></a><a href="feedback2.htm"><img border="0" src="images/Press/top.gif" width="40" height="29"></a></td> </tr> </table></body> </html> You can email me at: antonis20032002@yahoo.gr and I can reply to you by attaching, uploading and sending my www.cyoffshore.byethost12.com website or/ and www.cyoffshore.byethost12.com/feedback4test.html (Contact Us Form) to your email in order to investigate the case! SECONDARY QUESTIONS : ADDITIONAL QUESTIONS for www.cypruspainters.net/feedback2.htm under your consideration: Firstly, when I visit my website a pop up page appears which is very annoying for the visitors! The url of the pop up is: http://www.freelotto.com/register.as...&affiliateid=3 Another issues are : According to these issues, I have attached the screenshots and the text below: The screenshots below are refered to my previous software which was FRONTPAGE. Now I am using a substituted program which is Microsoft Expression Web 3. The problem is when I would like to use a Captcha image to block form spam and include this setting in my test.mf file (see attached screenshot -test.mf file), then @recaptchaFailPage is pointing to the page I want the visitor redirected to should they enter the wrong text from the image and does not work (see attached screenshot - recaptchaFailPage). In addition, we can add more fields to Misk Contact Us.htm Form (see attached screenshot- Misk Contact Us.htm Form) and the file test.htm is merely an example of what can be done! I created under my website a web link www.cypruspainters.net/MiskMailForm.htm with 3 images to look over the guidelines describing what is supported by my hosting provider and it will help you setup any form with their Mail Form service. Another issue, as instructed in the pdf, my hosting provider provides a Mail Form service which I can setup a confirmation page to notify people of their form being submitted successfully within the test.mf file. My confirmation page is listed as: @redirPage=confirm2.htm within the test.mf file. This is merely a redirect and will not pass Form Information to the page in order to show people what was submitted. Currently this might not be a feature of my hosting provider Mail Form service. But I am not sure! According to the attached screenshot- confirm2.htm , could you make the necessary changes to confirm2.htm in order to notify people of their form being submitted successfully with a more detailed and presentable way, for example, showing what the visitors have requested (visitors input), their details, their comments, etc and at the bottom maybe will be better if we would add a web link back to the Form! You can email me at: georgeashiotis@yahoo.com and I can reply to you by attaching, uploading and sending my www.cypruspainters.net/index.htm website or/ and www.cypruspainters.net/feedback2.htm (Contact Us Form) to your email in order to investigate the case! Thanks! Antonis For some reason i cant get this bit of code to work. You can ignore the php and html if its getting in your way. Thanks: Code: <div id="pl"> <? if($edit == true){ ?> <script type="text/javascript"> $("#add_playlist_form").css({display:"none"}); $("#add_playlist").click(function(){ alert($("#add_playlist").html()); if($("#add_playlist").html() == "Add a Playlist >>"){ $("#add_playlist").html("Hide <<"); $("#add_playlist_form").css({display:"block"}); } else{ $("#add_playlist").html("Add a Playlist >>"); $("#add_playlist_form").css({display:"none"}); } }); </script> <a href="#" id="add_playlist">Add a Playlist >></a> <form id="add_playlist_form" method="POST" action=" "> <input type="text" name="pl_name" class="add_playlist"/> <textarea name="pl_dsec" maxlength="200"></textarea> <input type="submit" name="submit_playlist" value="Add Playlist" class="submit_playlist"/> </form> <? } ?> <ul class="vList"> Hi Guys, I'm after a form saver script like this one? http://tf.dtbaker.com.au/form_saver/test_form.html The Email it sends is this: Quote: Thank you, your form has been saved you can now complete it later. To complete filling in your form, please click here or use the link below. http://tf.dtbaker.com.au/form_saver/...051c4eb3834ce9 Thank you Can anyone help as I can't get the source code for this... Dan Hi guys, I recently bought a template for a site that has a mail form. But I can't seem to figure out where I'm supposed to put my e-mail address so that I receive the e-mails. The code below is the only file associated with the e-mail form that came with the template. It calls on a mail.php file; do I need to create that file? If so, what do I put in that file? Is there somewhere in this script where I should put my e-mail address? I'm a total newbie with this stuff (obviously). But I would be sooo grateful for any help. Code: function isValidEmailAddress(emailAddress) { var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i); return pattern.test(emailAddress); } /*FORM validation and div changing*/ $(document).ready(function() { /*email validatin*/ $("#submit").click(function() { var email = $("input#email").val(); if(!isValidEmailAddress(emailAddress)){ $("input#email").focus(); $("input#email").val('Enter a valid e-mail!'); return false; } }) /*form submit*/ $("form#contactForm").submit(function() { var email = $("input#email").val(); $.ajax({ url:'mail.php', type:'post', data: "email="+email, success: function(msg){ if (msg==0) { $("input#email").focus(); $("input#email").val('Some trouble on sending!'); } if (msg==1) { $("input#email").val('Thank you!'); } } }); return false; }); /*end formsubmit*/ }); Hi All Javascript novice here so just need a bit of help. I'm sure it's something easy I have a form, attributes below: Code: <form id="frmOrder" name="input" method="post" onsubmit="return OnSubmitForm();"> I need the deposit input value to match the total input value if the weeks10 checkbox is ticked. The reason for this is my client requires full payment if this box is ticked. This must be done upon form submission. The reason for this is the email.php and payment.php submission pages collect the deposit value using $_POST and use that as the payment total Attributes for inputs below: Weeks10 checkbox: Code: <input type="checkbox" name="weeks10" id="weeks10" class="weeks10" /> Deposit input: Code: <input type="text" name="deposit" id="txtTotal3" readonly="readonly" size="2" value="0.00"></input> Totals input: Code: <input type="text" readonly="readonly" id="txtTotal" value="0.00" size="2" name="total"/> I'm using the following script: Code: <script type="text/javascript"> function OnSubmitForm() { if(document.input.weeks10[0].checked == true) { document.input.deposit.value = document.input.total.value; } return true; } function OnSubmitForm() { if(document.input.operation[0].checked == true) { document.input.action ="email.php"; } else if(document.input.operation[1].checked == true) { document.input.action ="payment.php"; } return true; } </script> The problem is, the second function works (email.php or payment.php action depending on radio selection). But the first one to adjust the total doesnt Now I know my script is wrong so would somebody be kind enough to lend me a hand? Thanks! *Edit - forgot to mention the example is live here if you need to see the full code. It's a fairly complicated form (for me atleast anyway) http://lake-form.carpbookings.co.uk Hi Guys, Im new to JS and need some help.. I have a contact form on my webpage and i want to put in an alert box if people done enter a field. Below is the html i have for the form PHP Code: <form id="form" method="post" action="consultation.php" onsubmit="return validate(this)"> <p> <label>Name:</label> <input type="text" name="name" id="name" /> </p> <p> <label>Company:</label> <input type="text" name="company" id="company" /> </p> <p> <label>Email:</label> <input type="text" name="email" id="email" /> </p> <p> <label>Phone:</label> <input type="text" name="phone" id="phone"/> </p> <p style="margin-bottom:0px"> <input class="submit_btn" type="image" src="images/submit_btn.gif" name="submit" value="Submit" /> </p> </form> and here is the external Java Script file that iv made so far PHP Code: var nName = nForm['name']; var nCompany = nForm['company']; var nEmail = nForm['email']; var nPhone = nForm['phone']; if (nName.value.replace(/s/g, "").length < 1) { alert('Please enter your full name'); return false; } if (nCompany.value.replace(/s/g, "").length < 1) { alert('Please enter your company name'); return false; } if (!/^w+[w|.|-]{0,1}w*[w|.|-]{0,1}w*@w+[w|-]{0,1}w*[w|-]{0,1}w*.{1,1}[a-z]{2,4}$/.test(nEmail.value)) { alert('Please enter your correct email address'); return false; } if (!/[ds-]+$/.test(nPhone.value) || !/d{10}/.test(nMobile.value.replace(/[s-]/g, ""))) // must contain 10 digits; { alert('Please enter your correct phone number'); return false; } iv referenced this Java script file in the head of the html document.. Can anyone help me make this script please... THanks I have a webpage in which my users complete a form in order to get through to page 2. I cannot use PHP to check as it must be on-the-fly checking. My idea was like the following: PHP Code: <script type="text/javascript"> function check(x) { if (x == 1) { document.write('<IMG SRC="img/'+x+'.jpg">'); } if (x == 2) { document.write('<IMG SRC="img/'+x+'.jpg">'); } if (x == 3) { document.write('<IMG SRC="img/'+x+'.jpg">'); } if (x == 4) { document.write('<IMG SRC="img/'+x+'.jpg">'); } } </script> And for the images to actually be PHP files that check further details of the user and insert details to DB. Then when the user clicks the next button it will check to see if all 4 users have loaded under that users details. However, I would much prefer it if I could use more PHP as I'm a Javascript n00b. Preferably I would like to use PHP to create unique keys for the images so that once I have obfuscated the javascript code the user will not figure out how to cheat the system even if they manage to reverse engineer the code. Is it possible to use PHP within javascript? E.g. PHP Code: <?php $pic = "picture.jpg"; ?> <script> function something(){ document.write('<IMG SRC="img/$pic">'); } </script> Or is this not at all possible? Edit: I know how much simpler that first script could have been, was just trying to simplify from my double as messy full script which will probably confuse you even more!!! Hi All, my first post on CodingForums I'm a javascript novice so looking for some help I'm using a handy little script from he http://www.mredkj.com/javascript/orderform.html On an order form he http://www.bluecoast.co.uk/test/order/form.php I've searched the net for hours and had a pop myself but I can't figure it out and it's driving me crazy Couple of things I'm after: 1. Need the "total price" to duplicate at the bottom of the form 2. Need exactly half the "total price" to show in both the deposit fields next to the total prices Hopefully that makes sense, can anybody give me a hand? Thanks in advance! Craig "<scr'+'ipt type="text/javascript" src="js/val_feedback_Email.js<\/scr'+'ipt>" How should I call the js validation script for a feedback form that was document.written in a pop up? I have a page which contains a button. Onclick it produces a pop up window that contains a small feedback form produced by document.write. This much works. NOW I need to call the js validate script but nothing seems to work I tried this is the head of the page <script type="text/javascript" src="js/val_feedback_Email.js"> I tried this is the head of the doumnet.write part "<scr'+'ipt type="text/javascript" src="js/val_feedback_Email.js<\/scr'+'ipt>" How do I call the js script to validate the form in the pop up? Where if anywhere should it go? I'm stumped Any and all ideas welcomed LT THis is the start of my script Code: <script type="text/javascript"> var newWindow; function subWrite() { newWindow = window.open("","","status,height=500,width=700") //bring subwindow to front newWindow.focus(); //assemble content for new window var newContent = '<html><head><title>ACES UK. Send us your Email</title>'; newContent += '</head><body>'; newContent += '<form action="feedback.php" method="post" name="feedback_1" id="feedback_1" onsubmit="return validate(this.form)"'; hi there i got an website with lots of images on different foods and udner all the images i want to be able to put an html form and in javascript i want to be able to set an string or number for each different html for so if the user get the string or number right then move to an page i have set them to go to if they get it wrong it takes them to an errors page how would i do this in javascript i would like to have an different string or number for each html form on the page Code: <form id="apple" name="apple" method="post" action=""> <label>apple <input name="apple" type="text" id="apple" value="apple password here" /> </label> </form> <p> <input name="submit" type="submit" value="submit" /> thank you for your help I am having some trouble with this form and I was hoping someone could help me with it. It is not returning any errors, it is simply not returning the results of the form fields. The clear form works, the redirect works, the layout is fine, just no results. I am just beginning to learn Javascripts and I know this is a pretty basic script, but could someone be so kind to show me what it is I am doing wrong and teach me the right way to do this? I know it has to be something very simple but I keep going over it and i can not see what I am doing wrong. Rather than just post a snipit of the code I included the whole form so I do not forget to include any information. Thanks guys, I really appreciate it! Code: <form name="evaluation" action="http://www.YOURURL.com/webformmailer.php" target="_self" method="post"><input value="Submission" name="subject" type="hidden" /><input value="evaluationreturn.html" name="redirect" type="hidden" /> <span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;"><br /> <table bgcolor="F7F5F2" border="0" cellpadding="0" cellspacing="0" width="456"> <tbody> <tr> <td><span style="color: rgb(40, 89, 161);">Comment 1</span><br style="color: rgb(40, 89, 161);" /> <br style="color: rgb(40, 89, 161);" /> <span style="color: rgb(40, 89, 161);">Comment 2</span><br style="color: rgb(40, 89, 161);" /> <br style="color: rgb(40, 89, 161);" /> <span style="color: rgb(40, 89, 161);">comment 3</span><br /> <br /> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 52px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 137px; text-align: left; color: rgb(40, 89, 161);" class="text_1">Your name:</td> <td style="width: 40px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="yourname" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 52px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 137px; text-align: left; color: rgb(40, 89, 161);" class="text_1">Business name:</td> <td style="width: 40px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="businessname" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="75" valign="top"> <table style="width: 456px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="text_1" style="padding-top: 3px; width: 138px; text-align: left; vertical-align: middle; color: rgb(40, 89, 161);">Business Location:</td> <td style="width: 38px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 272px;"><textarea name="location" class="form_1"></textarea></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="40" valign="top"> <table style="width: 456px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="padding-top: 3px; width: 138px; text-align: left; vertical-align: middle; color: rgb(40, 89, 161);" class="text_1">Business Hours:</td> <td style="width: 38px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 272px;"><textarea name="businesshours" class="form_1"></textarea></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 50px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="text-align: left; width: 143px; color: rgb(40, 89, 161);" class="text_1">Reservation required?</td> <td style="width: 34px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="reservation" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 50px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 138px; text-align: left; color: rgb(40, 89, 161);" class="text_1">Reservation Telephone Number:</td> <td style="width: 39px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="reservationphone" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 50px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 138px; text-align: left; color: rgb(40, 89, 161);" class="text_1">E-mail address:</td> <td style="width: 39px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="email" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="28" valign="top"> <table style="width: 456px; height: 50px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 138px; text-align: left; color: rgb(40, 89, 161);" class="text_1">Your contact number:</td> <td style="width: 39px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 271px;"><input name="yournumber" class="form_1" type="text" /></td> </tr> </tbody> </table> </td> </tr> <tr> <td height="91" valign="top"> <table style="width: 456px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="text_1" style="vertical-align: top; padding-top: 3px; width: 138px; text-align: left; color: rgb(40, 89, 161);">Select dates to perform evaluation: From/To <br /> Maximum of 30 days</td> <td style="width: 38px;"><img src="images/spacer.gif" height="1" width="1" /></td> <td style="width: 272px;"><textarea name="performdate" class="form_2"></textarea></td> </tr> <tr> </tr> </tbody> </table> </td> </tr> </tbody> </table> <br /> </span></span> <table style="text-align: left; width: 458px;" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td style="width: 220px; text-align: center;"> <p> <input value="Clear Form" onclick="reset(); return false;" type="reset" /></p> <input value="alpha" name="form_order" type="hidden" /> </td> <td style="width: 218px; text-align: center;"> <p> <input value="Submit" onclick="submit();" type="submit" /></p> <input value="alpha" name="form_order" type="hidden" /> </td> </tr> </tbody> </table> <span style="font-family: Arial,Helvetica,sans-serif;"><span style="font-weight: bold;"></span></span></form> Hello, Working With a touch screen, have created HTML page that has a custom keyboard for password input, no mouse or keyboard connected. Is there a way to enter keystrokes from the HTML into a (my form) text area (password) using Java. From the example below I am trying to put (1) into myform. <td><a class="Keys" type="password" target="myform">1</a></td> <!-- This Did not Work--> Thank You for any Info. I have two seperate js files. One that houses the functions mylibrary.js and another that call the validated functions myform.js. I can not get the form to validate any data. The data just sits there and will not report errors. Any help would be greatly appreciated. Code: function valForm() { if(!isAlpha(document.myform.firstname.value)) { myform.firstname.focus(); return false; } if(!validEmail(document.myform.email.value)) { myform.email.focus(); return false; } if(!isRequired1(document.myform.options.value)) { myform.options.focus(); return false; } return true; } // JavaScript Document seperate js file mylibrary.js function isNumber(num) { return !(/\D/.test(num)); } function isAlpha(text){ return text.match(/\w+/) } function validEmail(email){ return email.match(/^([a-zA-Z0-9]{3,})(((\.|\-|\_)[a-zA-Z0-9]{2,})+)?@([a-z]{3,})(\-[a-z0-9]{3,})?(\.[a-z]{2,})+$/i ) } function isRequired1(){ if(myform.food.selectedIndex ==0) { alert("Please select from the drop-down list."); } } Hello, I am trying to create simple Java Script form that will open a URL based on the contents entered into the form. The form shall consist of only a text box and submit button. A user will enter XXXX in the text box and click submit. The form would then load a URL consisting of http://www.company.com/XXXX I know this can be done because I had a code like this a few years back but I have lost it. I've been searching for over an hour, trying to figure this out. Any help would be grately appreciated. Thanks! Hello, I am trying to add radio buttons in this quiz script that i'm using, but when i change the drop down box to radio buttons the quiz script stops working, i.e it will not calculate the correct answers / percentage. I dont think i am correctly adding the input type "radio" and the script cannot recognise the value properly as i'am trying to make custom radio buttons from javascript / css. here is the script thats stopped working but how do i make the radio buttons send the correct value to the quiz script? Hope someone can help, i can add the css file if need be.. Code: <HTML> <HEAD> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=yes;" /> <TITLE>Seventies Trivia Quizzes & Games</TITLE> <link rel="stylesheet" type="text/css" href="style.css" /> <script language=Javascript> <!-- function stopErrors(){ return true; } window.onerror=stopErrors; // --> </script> <script language="JavaScript1.1"> <!-- Hide from old browsers function quiz(form) { var i = 0 var result1=document.form1.answer1.selectedIndex var result2=document.form2.answer2.selectedIndex var result3=document.form3.answer3.selectedIndex var result4=document.form4.answer4.selectedIndex var result5=document.form5.answer5.selectedIndex var result6=document.form6.answer6.selectedIndex var result7=document.form7.answer7.selectedIndex var result8=document.form8.answer8.selectedIndex if (result1==0){ alert("Question #1 was not answered");} if (result2==0){ alert("Question #2 was not answered");} if (result3==0){ alert("Question #3 was not answered");} if (result4==0){ alert("Question #4 was not answered");} if (result5==0){ alert("Question #5 was not answered");} if (result6==0){ alert("Question #6 was not answered");} if (result7==0){ alert("Question #7 was not answered");} if (result8==0){ alert("Question #8 was not answered");} else { if (result1==3){i++} if (result2==3){i++} if (result3==1){i++} if (result4==4){i++} if (result5==3){i++} if (result6==1){i++} if (result7==1){i++} if (result8==2){i++} document.total.score.value = i var per = Math.round((i / 20) * 100) document.total.percent.value = per if (result1 != 3){document.form1.check1.checked = true} else {document.form1.check1.checked = false} if (result2 != 3){document.form2.check2.checked = true} else {document.form2.check2.checked = false} if (result3 != 1){document.form3.check3.checked = true} else {document.form3.check3.checked = false} if (result4 != 4){document.form4.check4.checked = true} else {document.form4.check4.checked = false} if (result5 != 3){document.form5.check5.checked = true} else {document.form5.check5.checked = false} if (result6 != 1){document.form6.check6.checked = true} else {document.form6.check6.checked = false} if (result7 != 1){document.form7.check7.checked = true} else {document.form7.check7.checked = false} if (result8 != 2){document.form8.check8.checked = true} else {document.form8.check8.checked = false} } } //--> </SCRIPT> <style type="text/css"> <!-- body { margin-left: 10px; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; } --> </style></HEAD> <BODY> <FORM NAME="form1"><INPUT TYPE="hidden" NAME="check1"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer1" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-1a0"> <input name="sample-radio" id="sample-radio-1a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-1a1"> <input name="sample-radio" id="sample-radio-1a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-1a2"> <input name="sample-radio" id="sample-radio-1a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-1a3"> <input name="sample-radio" id="sample-radio-1a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-1a4"> <input name="sample-radio" id="sample-radio-1a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form2"><INPUT TYPE="hidden" NAME="check2"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer2" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-2a0"> <input name="sample-radio" id="sample-radio-2a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-2a1"> <input name="sample-radio" id="sample-radio-2a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-2a2"> <input name="sample-radio" id="sample-radio-2a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-2a3"> <input name="sample-radio" id="sample-radio-2a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-2a4"> <input name="sample-radio" id="sample-radio-2a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form3"><INPUT TYPE="hidden" NAME="check3"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer3" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-3a0"> <input name="sample-radio" id="sample-radio-3a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-3a1"> <input name="sample-radio" id="sample-radio-3a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-3a2"> <input name="sample-radio" id="sample-radio-3a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-3a3"> <input name="sample-radio" id="sample-radio-3a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-3a4"> <input name="sample-radio" id="sample-radio-3a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form4"><INPUT TYPE="hidden" NAME="check4"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer4" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-4a0"> <input name="sample-radio" id="sample-radio-4a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-4a1"> <input name="sample-radio" id="sample-radio-4a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-4a2"> <input name="sample-radio" id="sample-radio-4a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-4a3"> <input name="sample-radio" id="sample-radio-4a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-4a4"> <input name="sample-radio" id="sample-radio-4a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form5"><INPUT TYPE="hidden" NAME="check5"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer5" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-5a0"> <input name="sample-radio" id="sample-radio-5a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-5a1"> <input name="sample-radio" id="sample-radio-5a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-5a2"> <input name="sample-radio" id="sample-radio-5a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-5a3"> <input name="sample-radio" id="sample-radio-5a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-5a4"> <input name="sample-radio" id="sample-radio-5a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form6"><INPUT TYPE="hidden" NAME="check6"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer6" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-6a0"> <input name="sample-radio" id="sample-radio-6a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-6a1"> <input name="sample-radio" id="sample-radio-6a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-6a2"> <input name="sample-radio" id="sample-radio-6a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-6a3"> <input name="sample-radio" id="sample-radio-6a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-6a4"> <input name="sample-radio" id="sample-radio-6a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form7"><INPUT TYPE="hidden" NAME="check7"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer7" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-7a0"> <input name="sample-radio" id="sample-radio-7a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-7a1"> <input name="sample-radio" id="sample-radio-7a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-7a2"> <input name="sample-radio" id="sample-radio-7a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-7a3"> <input name="sample-radio" id="sample-radio-7a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-7a4"> <input name="sample-radio" id="sample-radio-7a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <FORM NAME="form8"><INPUT TYPE="hidden" NAME="check8"> <b>1. Who wrote the Eagles' 1972 hit "Take It Easy"?</b><BR><BR> <input type="hidden" SELECT NAME="answer8" SIZE=1> <fieldset class="radios"> <label class="label_radio" for="sample-radio-8a0"> <input name="sample-radio" id="sample-radio-8a0" NAME="radio" type="radio" SELECTED VALUE="0"/> CHOOSE AN ANSWER</label> <label class="label_radio" for="sample-radio-8a1"> <input name="sample-radio" id="sample-radio-8a1" NAME="radio" type="radio" VALUE="1" /> Randy Meisner</label> <label class="label_radio" for="sample-radio-8a2"> <input name="sample-radio" id="sample-radio-8a2" NAME="radio" type="radio" VALUE="2" /> J.D. Souther</label> <label class="label_radio" for="sample-radio-8a3"> <input name="sample-radio" id="sample-radio-8a3" NAME="radio" type="radio" VALUE="3" /> Jackson Browne & Glenn Frey</label> <label class="label_radio" for="sample-radio-8a4"> <input name="sample-radio" id="sample-radio-8a4" NAME="radio" type="radio" VALUE="4" /> Don Henley</label> </fieldset> </SELECT></FORM> <BR> <BR><BR><HR> <P>That's it! Now click the "Submit" button to grade your Seventies music knowledge.<BR> <form name="total"> <INPUT TYPE="BUTTON" VALUE="Submit" onClick="quiz()"> <INPUT TYPE="button" VALUE="Reload Quiz" onClick='parent.location="javascript:location.reload()"'><BR><HR><BR>Results:<BR><BR> You scored <INPUT TYPE="TEXT" NAME="score" VALUE="" SIZE=5> out of <INPUT TYPE="TEXT" NAME="outof" VALUE="8" SIZE=5> questions correct.<BR><BR> Your Sco <INPUT TYPE="TEXT" NAME="percent" VALUE="" SIZE=3> %<BR><BR> <HR> </FORM> <script> var d = document; var safari = (navigator.userAgent.toLowerCase().indexOf('safari') != -1) ? true : false; var gebtn = function(parEl,child) { return parEl.getElementsByTagName(child); }; onload = function() { var body = gebtn(d,'body')[0]; body.className = body.className && body.className != '' ? body.className + ' has-js' : 'has-js'; if (!d.getElementById || !d.createTextNode) return; var ls = gebtn(d,'label'); for (var i = 0; i < ls.length; i++) { var l = ls[i]; if (l.className.indexOf('label_') == -1) continue; var inp = gebtn(l,'input')[0]; if (l.className == 'label_check') { l.className = (safari && inp.checked == true || inp.checked) ? 'label_check c_on' : 'label_check c_off'; l.onclick = check_it; }; if (l.className == 'label_radio') { l.className = (safari && inp.checked == true || inp.checked) ? 'label_radio r_on' : 'label_radio r_off'; l.onclick = turn_radio; }; }; }; var check_it = function() { var inp = gebtn(this,'input')[0]; if (this.className == 'label_check c_off' || (!safari && inp.checked)) { this.className = 'label_check c_on'; if (safari) inp.click(); } else { this.className = 'label_check c_off'; if (safari) inp.click(); }; }; var turn_radio = function() { var inp = gebtn(this,'input')[0]; if (this.className == 'label_radio r_off' || inp.checked) { var ls = gebtn(this.parentNode,'label'); for (var i = 0; i < ls.length; i++) { var l = ls[i]; if (l.className.indexOf('label_radio') == -1) continue; l.className = 'label_radio r_off'; }; this.className = 'label_radio r_on'; if (safari) inp.click(); } else { this.className = 'label_radio r_off'; if (safari) inp.click(); }; }; </script> <P>Ratings:<br><br> 90-100% - "I Just Want To Celebrate"<br> 80-89% - "I Want To Take You Higher"<br> 70-79% - "One Toke Over The Line"<br> 60-69% - "What's Going On"<br> 50-59% - "Stuck In The Middle With You"<br> 0-49% - "Ball of Confusion"<br> </blockquote> </BODY> </HTML> |