JavaScript - Utilizing Html Forms And Javascript For Data Entry
Hello folks! This is my first time posting here, and I am relatively new to JavaScript.
I have come in need of assistance in guiding me in the right direction. My intentions are to create a web-based page where one can select from a few drop down menu's, and enter a few select pieces of information. This information would then be logged for later purposes, when the user chooses to retrieve this information (during the initial usage, no long term storage) in the format of a report. Would anyone have sources to similar coded applications, or any ideas of the directions I can go in for further assistance. I have at this point been utilizing the W3 website to learn. Thanks a ton! Similar TutorialsI'm working on a data entry form for an application, and I'm stuck at what may end up being some bad code. I'm capturing data for two tables (custinfo and orderinfo) on one page. The top part of the data entry form collects data once for the transaction, kind of like an invoice captures customer details. The bottom part (the part I'm stuck on) captures order information line after line. So, for example: TopForm (custinfo) Customer name Customer address Customer city, state, zip Bottom form (orderinfo) Item description Item quantity Item price What I'm looking for is two things: 1) The ability to extend the bottom form line by line as the order grows. 2) The ability to remove liness (last in, first out) from the bottom form if the order needs to shrink. Dear all, attached is a page for my website to allow visitors to purchase photos. It is made from 2 Paypal example scripts - one for the form and another for an additional text box. It works fine apart from one detail, the text being entered does not get sent - instead, the information it forwards is "6x4 Colour Prints. Item Number id10" The "6x4 Colour prints" bit is good - the "Item number id10" is where I'd ideally like to see the custom text being entered and the guys at Paypal developer forums have said that a Javascript command is overriding the text being forwarded and to seek advice from those who know Javascript. I've tried for a day by trial and error to see if I can take this command out but it has got to the hair pulling out stage so I'm calling on those who know best to cast a wise eye over the code and see if there is an easy fix to this. Any help or suggestions as to howe to alter this will be most gratefully received. Thanks in advance, Dave. I'm stuck! - I have a search form, that when data is entered and submitted, the data is sent to another page! - this works well see eg below. http://www.nctfleetlist.co.uk/normal.php My problem is, I have a piece of javascript called "greybox", it basically loads an external page, dimming the first page and focusing on the external - see eg below. http://www.nctfleetlist.co.uk/div4.php The new window can be called via either a href "rel" link or an "onclick" command. I have tried implementing the the two together but when I use the javascript to call the new window the data from the original form is not passed over! - this is what I have so far... example 1 - using onclick command (http://www.nctfleetlist.co.uk/eg1.php) Code: <script> GB_show(caption, url, /*optional*/ height, width, callback_fn) </script> <form name="form1" action="test_script.php" method="post"> <input type="text" name="var1" value=""> <input type="submit" name="submit" value="submit" onclick="return GB_show('Search', 'http://www.nctfleetlist.co.uk/test_script.php', this.href)"> </form> example 2 - using onsubmit within the form tag (http://www.nctfleetlist.co.uk/eg2.php) Code: <script> GB_show(caption, url, /*optional*/ height, width, callback_fn) </script> <form name="form1" action="test_script.php" method="post" onSubmit="return GB_show('Search', 'http://www.nctfleetlist.co.uk/test_script.php', this.href)"> <input type="text" name="var1" value=""> <input type="submit" name="submit" value="submit"> </form> example 3 - using a javascript link to submit the form, adding a "rel" tag (http://www.nctfleetlist.co.uk/eg3.php) Code: <script> GB_show(caption, url, /*optional*/ height, width, callback_fn) </script> <form name="form1" action="test_script.php" method="post"> <input type="text" name="var1" value=""> <a href="#" onclick="document.forms[0].submit()" rel="gb_page_center[720, 300]">Search</a> </form> Any help is appreciated! I know that Javascript is client side, but I'd like to know the best way to populate HTML drop downs in real time based on information typed in the other HTML form fields with information found on the server as opposed to the client. For instance if a user wants to select certain files located in a directory on the server, as they type in the pathname supposedly containing the files the drop downs continually refresh themselves with the server files listed in that directory (if it exists, and apache has permissions to see what's inside) as if it was showing client files instead. What would be nice is if my browser could continually query the server for some of its private information and not have to refresh itself to obtain it, whether that means the server-side would have to continually refresh itself makes no difference to me as long as the client-side doesn't have to. But I guess this is not possible because no matter what you would have to at least refresh the client-side page once? Submitting the form to a CGI or PHP script would not work because I need this functionality to help populate the form BEFORE I send it. I would like to not have to press a button to update the form every time I change the pathname and need to update the drop downs since this would be annoying. I'm open to anything that could do this or something similar not just Javascript. I'm not sure if you could accomplish this by converting the HTML page to CGI/PHP and having it continually reload itself without refreshing the page? I'm not worried about any security risks this may pose because: 1) The server is located on company intranet which is firewalled 2) I could always password protect and encrypt all transmissions, making sure only authorized users use the app Hey guys, I use a newsletter service called Aweber to handle my blog's subscription service. What I have right now is a simple HTML form that I can have pass its variables through to a thank you page, so I can add customization there. The web form looks like this: Name: ________________ Email: ________________ Choose a free gift!: drop down list with "gift1" "gift2" or "gift3" as the choices. When a user submits the form, it will bring them to a custom thank you page, which I have made as "thank-you.php". On the "thank you" page, there is a javascript code that was given by Aweber which basically loads up all the variables... you can then CALL all of the variables in the page like this: <script type="text/javascript">formData.display("name")</script> ========================== So what's my question? I wanted there to be a display on the bottom that would allow users to download a different gift based on whether they chose gift 1, 2 or 3. I would also love to have there be an image of the ebook next to the download link depending on which book they chose. Is there a way I can pass variables through into an html <img> tag? (i.e. src="http://www.website.com/formData.display("gift").jpg" ... or something like that). Building off this, how would I generate a different download link based on the choice they made in the web form? (i.e. <a href="http://www.website.com/formData.display("gift").pdf"> or similar) Hopefully this all makes sense, let me know if you can help! I just have a quick question.... Is it possible to use Javascript to set the name of a tag to be the tag's id? For example, something like this: Code: <input type="text" id="textInput" name="this.id"> The example code above doesn't work. The reason I'm asking is because I have a complex form that uses Javascript to change ids a lot (the input fields are dynamically created). When I was coding the form I completely overlooked the fact I need to use the name tag to process it with PHP. (to enter it into a mysql database) It'd be a pain to have to go through all my javascript and change the name where ever I change the ids. If need be, I'll do this, but I'm just looking for an easier way. Thanks in advance! hey guys, just wondering if u could help me out i'm writing a form for ordering pizza and i'm using a button to submit the info with an onclick event handler. for some reason it won't call the function that i want it to when the submit button is click. here is the code any idea what i'm doing wrong???? <html> <body> <form name="form1" action="popup" method="get"> <fieldset> <legend>Pizza Order form</legend> <p>Write in a First name</P> <input type="text" size="20" maxlength="50" name="firstName"></p> <p>Write in a last name (or surname):<br> <input type="text" size="20" maxlength="50" name="surName"></p> <p>Write in an email address:<br> <input type="text" size ="20" maxlegth="50 name="address"> <p>Are you a previous customer?:<br> <select name="precust"> <option selected>- - - - - - Select one - - - - - -</option> <option value="Yes">Yes</option> <option value="No">No</option> </select></p> <p>pickup or delivery:<br> <select name="delivery"> <option selected>- - - - - - Select one - - - - - -</option> <option value="pickup">pickup</option> <option value="dilivery">delivery</option> </select></p> <p>size:<br> <select name="size"> <option selected>- - - - - - Select one - - - - - -</option> <option value="small">small</option> <option value="medium">medium</option> <option value="large">large</option> <option value="XL">extra large</option> </select></p> <p>number of pizzas:<br> <select name="num"> <option selected>- - - - - - Select one - - - - - -</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select></p> <p>Toppings:<br> Bacon <input type="checkbox" name="bacon" value="bacon"><br> extra cheese <input type="checkbox" name="xcheese" value="extra cheese"><br> olives<input type="checkbox" name="olives" value="olives"><br> pepperoni<input type="checkbox" name="pepperoni" value="pepperoni"><br> mushrooms<input type="checkbox" name="mushrooms" value="mushrooms"><br> green pepper<input type="checkbox" name="gpepper" value="green pepper"><br> red pepper<input type="checkbox" name="rpepper" value="redpepper"><br> sausage <input type="checkbox" name="sausage" value="sausage"><br> ham<input type="checkbox" name="ham" value="ham"><br> pineapple<input type="checkbox" name="pineapple" value="pineapple"><br><br> <input type=button name="hawaiian" value="hawaiian" onclick=' document.form1.ham.checked = true; document.form1.mushrooms.checked = true; document.form1.pineapple.checked = true; document.form1.bacon.checked = false; document.form1.gpepper.checked = false; document.form1.rpepper.checked = false; document.form1.olives.checked = false; document.form1.pepperoni.checked = false; document.form1.sausage.checked = false; document.form1.xchees.checked = false; '> <input type=button name="meatlovers" value="meatlovers" onclick=' document.form1.ham.checked = false; document.form1.mushrooms.checked = false; document.form1.pineapple.checked = true; document.form1.bacon.checked = false; document.form1.gpepper.checked = true; document.form1.rpepper.checked = true; document.form1.olives.checked = true; document.form1.pepperoni.checked = false; document.form1.sausage.checked = false; document.form1.xcheese.checked = false; '> <input type=button name="vegetarian" value="vegetarian" onclick=' document.form1.ham.checked = true; document.form1.mushrooms.checked = false; document.form1.pineapple.checked = false; document.form1.bacon.checked = true; document.form1.gpepper.checked = false; document.form1.rpepper.checked = false; document.form1.olives = "unchecked" document.form1.pepperoni.checked = true; document.form1.sausage.checked = true; document.form1.xcheese.checked = false'> <p><input type=button name="submit" value="Submit" onclick='submit()'></p> </fieldset> </form> <script type="text/javascript" language="Javascript" > function submit() { var fname = document.form1.firstname.value; var lname = document.form1.surname.value; var address = document.form1.address.value; var size = document.form1.size.value; var num = document.form1.num.value; var delivery = document.form1.delivery.value; var precust = document.form1.precust.value; var price; var message; if(document.form1.size.value == "small"){price=5} if(document.form1.size.value == "medium"){price=8} if(document.form1.size.value == "large"){price=10} if(document.form1.size.value == "XL"){price=13} price = price * num; if(document.form1.precust.value == "yes"){price=price*0.9} if(document.form1.delivery.value == "delivery"){price=price+4} message = "Thank you " + fname + " " + lname; message += "You ordered " + document.form1.num.value + " " + document.form1.size.value + " pizzas. "; message += "Your total price is $" + price; var r=confirm(message);// displays the message in a pop-up return(1); } </script> </html> Hello everyone at CodingForums! This is my first post on this site and I would really appreciate any help I can get, First off, all I am trying to do is have someone enter one value into a field then another value into the second field, then have javascript subtract those numbers. This is my first time trying to do something on my own without tutorial help, so I am for the most part just stumbling in the dark. here is what I have thus far: Code: <script type="text/javascript"> <!-- var lastMonth; var thisMonth; function diff(form) { var difference; difference = lastMonth - thisMonth; form.Fdiff.value = difference; } function SetLast(usuage) { lastMonth = usuage.value; } function SetThis(usuage2) { thisMonth = usuage2.value; } // --> </script> <center> <form method="post"> <TABLE border=3> <tr> <tr> <td><p>Last Months <br /> Usuage</p></td> <td><p>This Months <br /> Usuage</p></td> <td><p>Difference</p></td> <TD><INPUT TYPE=BUTTON ONCLICK="diff(this.form)" VALUE="Calculate"></TD> </tr> <tr> </tr> <td><p><input type=text name=lastMonth size="4" onchange="SetLast(usuage)"></p></td> <td><p><input type=text name=thisMonth size="4" onchange="SetThis(usuage2)"></p></td> <td><p><INPUT TYPE=text NAME="Fdiff" VALUE="" SIZE="6"></p></TD> <TD><p></p></tr> </tr> </tr> </table> </form> </center> </center> I'm going off of the code found at this site "http://www.javascriptkit.com/script/cut141.shtml" for a calorie counter. the way the code is now, I get a NaN in the difference box. Again, I would appropriate ANY help and guidance you guys could provide. Thanks I have a web page with two forms, when I click the button on one of the forms, the onclick event goes to a javascript that emails the first form and then the second form. This is correct, this is the way I want this to work. It's simple, it's easy, it works! However, it only works in FireFox and Internet Explorer, it will not work in Google Chrome browser. I've spent many hours trying lots of various ways to implement this so I'm not interested in speculating about possible solutions that might work, I've already tried too many of those. Also, it needs to work this way, not combining the forms, etc. Does anyone have any tried and tested solutions that work with Chrome? Thanks, in advance, for your expert advice. I know I can always rely on EE when all else fails. I know somebody here can solve this problem. Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <title></title> </head> <body> <form id="NameForm" method="post" action="mailto:yourFirstemail@email.com"> Name: <input type="text" size="10" name="name"> <br /> <input onclick=functionCaller() type="button" value="Submit Two Forms"> </form> <form id="AddressForm" name="DComments" method="post" action="mailto:yourSecondemail@email.com"> Address: <input type="text" size="10" name="address"> <br /> </form> <script type="text/javascript"> <!-- function functionCaller() { document.getElementById('NameForm').submit(); document.getElementById('AddressForm').submit(); } --> </script> </body> </html> I have auto cursor focus event to be triggered when data is entered in a field.The issue is in the table when the cursor focuses to next field, that field doesnt come into view. the user can not see what he is entering in the field. This problem is for IE7, this wrks fine on mozilla. the horizontal bar scrolls automatically in mozilla but not in IE7, hence causing the problem. Please help me resolving this. Hi guys I d like to know that is it possible to submit data to the server or to an email from the client using JAVAScript? I know that javascript is clientside,but if you work with Facebook, when you chat, just view its source, u ll see that is using Javascript? I d like to know,how is it possible? Hi, I am new to javascript, Please help me with the issue below. My javascript code below should actually fetch the data from html table on button click. function displaymessage() { alert ("button pressed"); var table_cells = new Array(); var table7 = document.getElementById('Auth'); for (i=0,n=table7.rows.length; i < n ; i++) { var Rowdata = table7.rows[i]; table_cells[i] = new Array(); for(j=0,cols = Rowdata.cells.length; j < cols; j++) { table_cells[i,j] = Rowdata.cells[j].innerHTML; alert (table_cells[i,j]); } } alert (table_cells[1,1]); alert (table_cells[2,1]); alert (table_cells[3,1]); alert (table_cells[4,1]); alert (table_cells[5,1]); alert (table_cells[6,1]); alert (table_cells[7,1]); alert (table_cells[8,1]); } The problem with my code above is that the statement "alert (table_cells[i,j]);" executes properly and shows the correct value. But the other alert statements shows only the value of the last row of the table. i.e., my table has 9 rows. and all the alert statements shows 9th row's 2nd column's value outside the for loop. But inside the for loop it executes fine. I tried it in IE7. I seem to miss something. Could someone please help me out with this? Thanks in advance. Hi, I'm wondering if someone can help me. I have recently used this tutorial: http://net.tutsplus.com/tutorials/ph...-confirmation/ to develop a more complex sign up form for a competition for a client. Basically, the way the validation has been done is different to many other validation methods I've used before and don't understand how to implement it, for some additional requirements. This is an example of the PHP validation code that I have altered, to suit my form requirements: Code: //quick/simple validation if(empty($code)){ $action['result'] = 'error'; array_push($text,'You forgot to enter your entry code'); } if(empty($name)){ $action['result'] = 'error'; array_push($text,'You forgot to enter your name'); } if(empty($email)){ $action['result'] = 'error'; array_push($text,'You forgot to enter your email address'); } This code only validates that there is content in those fields. But, for example on the 'entry code' field, I would like to put a maximum character input there and restrict certain characters, as well as a standard 'email' validation, so that the form is sent through to the database correctly. If anyone knows how I can do this, with this sign-up form in particular, please assist me, as every other method I've tried to work with this form hasn't worked and caused the form to error. Thank you in advance. When I click Vacant after 5 and it goes to occupied. How would I make it come back to vacant when clicked again? Code: <html> <head> <script type="text/javascript"> function fillForm() { if (counter > 10){ } } </script> <script type="text/javascript"> function StartCounting(){ setInterval("DoCounting()", 1000) } var Counter = 0; function DoCounting(){ var obj = document.getElementById('countingtext'); obj.innerHTML = '' + Counter; Counter++; if( Counter > 5) { var obj1 = document.getElementById("closed").value = "Open"; var space1 = document.getElementById("space1") space1.onclick = linkClick; } } function linkClick(){ space1 = document.getElementById("space1").value = "Occupied"; } </script> </head> <body onload= "StartCounting()"> Open at 5: <span id="countingtext"></span> </body> </html> <div style="margin-right:3mm; " > <form action="#" method="post" id="theForm" > <input size="10" id="closed" value="Closed" style="text-align:center;" /> <script type="text/javascript"> </script> <input type='button' id="space1" name='s"+ i+"' value='Vacant' onclick='readSpace(s"+ i+")' style='width:15mm;' /></td> </form> </div> I'm having a total brain fart as to why this is happening. I just transferred my company's website from aplus.net servers to a linux based server on GoDaddy. My company's "shop" page has a drop down menu which should automatically re-direct you to a different page (on a different website where our shopping cart is hosted) when the option is selected. For some reason, after the switch to a different host, the option tags are no longer re-directing to the proper pages. Instead, they just tack on the value URL onto the existing URL and i just go in circles. javascript: <script language="JavaScript" type="/text/javascript"> function nav() { var w = document.myform.mylist.selectedindex.html; var url_add = document.myform.mylist.options[w].value; window.location.href = url_add; } </script> HTML for options form: <FORM NAME="myform"> <SELECT NAME="mylist" onChange="nav()"> <OPTION VALUE="http://bedvoyage.com/shop">Select Your Product <OPTION VALUE="http://bedvoyage.myshopify.com/products/twin-sheet-set">Sheet Set - Twin - $139.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/double-sheet-set">Sheet Set - Double - $159.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/queen-sheet-set">Sheet Set - Queen - $179.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/king-sheet-set">Sheet Set - King - $199.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/twin-pillow-case">Pillow Case - Twin - $20.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/double-pillow-case">Pillow Case Set - Double - $40.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/queen-pillow-case">Pillow Case Set - Queen - $42.00 <OPTION VALUE="http://bedvoyage.myshopify.com/products/king-pillow-case">Pillow Case Set - King - $45.00 <option value="http://bedvoyage.myshopify.com/products/zippered-travel-pillow-case">Zippered Travel Pillow Case - $19.00 <!-- <OPTION VALUE="http://bedvoyage.myshopify.com/produ...uot;>Travel Blanket - $39.00 --> </SELECT> </FORM> Is there an option on godaddy that i'm just missing out on that i'm too ignorant to notice? Thanks in advance. Currently I have the following script:- Code: function validate_form(){ if(regform.reguser.value == ""){ alert("Please completed the selected box"); regform.reguser.focus(); return false; }else if(regform.regemail.value == ""){ alert("Please completed the selected box"); regform.regemail.focus(); return false; }else if(regform.regpass1.value == ""){ alert("Please completed the selected box"); regform.regpass1.focus(); return false; }else if(regform.regpass2.value == ""){ alert("Please completed the selected box"); regform.regpass2.focus(); return false; }else{ return true; } } to validate a simple registration form, however I initially tried to streamline this function by cycling through an array using a loop to point to various input elements in the HTML page itself. I found that when trying to use a variable in the aforementioned if statements the javascript failed to work i.e. Code: var test = "reguser"; if(regform.test.value = ""){ } I know the javascript is looking for the input element "test" instead of "reguser" but is there any way I can force it to look for the contents of the variable. I have found a code to help me learn how to add forms in javascript, but it's limited to text input forms. Code: <script type="text/javascript"><!-- function updatesum() { document.form.sum.value = (document.form.sum1.value -0) + (document.form.sum2.value -0); } //--></script> Where the inputs sum1 and sum2 are text fields you put whatever numbers you want in. That works fine. Great. Now what I'm having trouble with is modifying the code so that it will add one form with an input number with a form that spits out a randomly generated number. Code: <input type="button" value="D20" onclick="this.form.display.value = Math.round (20 * Math.random())" class="buttonHi" /> <input name="display" type="text" size="6" value="" /> This is what I'm using for my random number generator. So basically I want to be able to put, say, 5, into the input text field above this. And then click on the d20 button to get a random number, say, 15, and then have the first code add the inputted 5 with the randomly generated 15. Is this possible? i am new to JavaScript and i have an assignment to create a tour calculator here is the code and its not working please help its urgent thanks. [code] <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style type="text/css"> .font { font-size: 28pt; } font2 { font-size: 15pt; } </style> </head> <body> <strong class="font">USA Tour Cost Calculator</strong> <br/> <br/> Conplete the form below to calculate the cost of your tour of the United States <script type="text/javascript"> function calculate(){ var cost=0; var accomodation=0 var radio1 var radio2 var duration=0 function accomodation() { for (var i=1; i<=3; i++) {radio1= document.getElementById("radio"+i); if (radio1.checked==true) {accomodation=i;}} if (accomodation=1){cost=parseInt(radio.value); return value;} else if (accomodation=2){cost=parseInt(radio.value); return value;} else if (accomodation=3) {cost=parseInt(radio.value);return value;} else {window.alert("Please select the type of accomodation")} } function peak() { var cost=accomodation() var peak=document.getElementById("check1") if (peak.checked==true) {cost +=parseInt(checkbox.value); return value;} else {cost=accomodation()} } function calc(){ var cost=peak() for (var i=1; i<=4; i++){ radio2=document.getElementById("Radiobutton"+i); if (radio2.checked==true) {duration=i;} if (duration=1) {cost*=parseInt(radio.value); return value;} else if (duraion=2){cost*=parseInt(radio.value); return value;} else if(duration=3) {cost*=parseInt(radio.value); return value;} else if(duration=4){caost*=parseInt(radio.value); return value;} else {alert("Please select the duration of tour")} } } </script> <br/> <form id="form2" name="form2" method="post" action=""> <p> <label> <input type="radio" name="RadioGroup2" value="95" id="Radio1" /> Camping</label> <br /> <label> <input type="radio" name="RadioGroup2" value="140" id="Radio2" /> Budget Hotel</label> <br /> <label> <input type="radio" name="RadioGroup2" value="170" id="Radio3" /> Premier Hotel</label> <br /> </p> </form> Click here if you will be travelling during the peak season of June to August: <input name="" type="checkbox" value="20" id="check1" /> <br/> <br/> Duration of tour: <form id="form1" name="form1" method="post" action=""> <label> <input type="radio" name="RadioGroup1" value="4" id="Radiobutton1" /> 4 days, 1sate</label> <br /> <label> <input type="radio" name="RadioGroup1" value="7" id="Radiobutton2" /> 7 dasy, 3 states</label> <br /> <label> <input type="radio" name="RadioGroup1" value="14" id="Radiobutton3" /> 14 days, 12 states</label> <br /> <label> <input type="radio" name="RadioGroup1" value="20" id="Radiobutton4" /> 20 days, 18 states</label> <br /> </p> </form> <br/> <p> <input type="submit" value="Calculate" onClick='alert("The total cost of your tour is $calculate();")'><input type="reset" value="Reset" /></p> </body> </html> [code] Hello, I need to solve the following task on my website: I have products with add to cart button, like this: Code: <form action="cart.php" method="post" id="_cart" name="_cart"> <input type="hidden" name="prodid" value="Product1" /> <a href="javascript: AddToCart()"> <img src="/images/design/buynow.gif" /> </a> </form> However, it doesn't work, since i have the same value under the name of each form: "_cart". Is there any way i still can send a form regardless the name of the form? I tried to use "onclick", like this: Code: <a href="javascript: void(0);" onclick="document._cart[0].submit();return false;"> However, i still have to change the value under the _cart element from 0 to the number of my forms. I need just submit a form itself, with the same form names. For some reason i cannt use the html submit button. Everything should be done with JavaScript. I beleive this text is not hard for understanding ) Look forward to your help Guys. Hi, I am very new to Javascript and am having some difficulties with implementing two forms on the same page. The page in question is http://www.devoteddomains.com/contac...ed-domains.asp. The form at the top appears on every page and works on all of the other pages except this one. When you try to complete the form it validates the second form on the page. The code for the top form can be found he http://www.devoteddomains.com/web-de...vices-cta.html (it is an include file). The two scripts that I am using are as follows: Top Form: http://www.devoteddomains.com/scripts/scripts.js Contact Page Form: http://www.devoteddomains.com/scripts2/scripts.js Can someone please help! Cheers, Peter |