HTML - Unable To Add Buttons To Html
Hi guys,
hello to all and thank you for letting me be apart of this forum! Im having some problems with a new site i have published and kind of need some solutions to my my problems if at all possible! My current situation is that i have subscribed to streamline.net,buit my new shopping site in their site wizard program and have published it on the web,all is hunky dorry upto now. I have adjusted certain aspects of the design via Dreamweaver and even published some affiliate logos/adverts on my home page by copy and pasting the HTML codes and saving into my FTP files and have added a small piece of music on the opening welcome page. Now, i have signed up with Google Checkout and also Paypal Checkout and i am unable to copy and paste their associated 'Add to basket' buttons onto my item lists.I can copy the buttons to other parts of the site like the disclaimer page but just cant seem to copy them to my item description boxes. My thinking is its down to me using a template form to enter my item descriptions in site wizard. Another strange thing i have noticed is that i can't seem to find the item description text in my FTP files only the pictures product ID ,name and price. I am in the process of trying to sort out my problem with streamline via email but is slow going,i just thought you guys could shed some light onto my problems. Any help at all would me much appreciated!!!!! my site is on line at www.designerswitching.co.uk . Kind regards , James Similar TutorialsHi All, I am having issues with the following code from a video file (in html). Hoping you can help, I need to make the video start automatically. This video is from Tube Chop (Tube Chop is a similar service than you tube) and you can copy and paste the code from any video and paste is onto a website as an embedded file. I am trying to get the file to start automatically as soon as any user goes to the page (as opposed to having to click on the video). I know for you tube all you have to do is add "&autostart=1 and it works fine. But I tried to put this code below and it still doesn't work. Can someone assist? FYI - Pls note that the part that reads "&start=0&end=26" below was included on purpose so the video starts at the beginning and end after 26 seconds. The website added the code. I need to keep this rule while still getting the video to autostart. Code: <p> <object width="500" height="344"><param name="movie" value="http://swf.tubechop.com/tubechop.swf?vurl=SJyCGltS95k&start=0&end=26&cid=227694"></param><embed src="http://swf.tubechop.com/tubechop.swf?vurl=SJyCGltS95k&start=0&end=26&cid=227694" type="application/x-shockwave-flash" allowfullscreen="true" width="500" height="344"></embed></object></p> Thanks very much. Hi I'm trying to add an update profile page on my site and am uploading the details from a database. I want to display the details in a form where there will have the option to click an update button the problem is: i have a radio button where I want it to automatically show the current sex of the member, but how to I determine which box to check and which one to leave? the sex is stored in the database in a enum, values 'male', 'female' the html I've got at the moment is: HTML Code: Male: <input type="radio" name="male" <?php if ($msex = "male") {echo "checked";}?>/> Female: <input type="radio" name="female" <?php if ($msex = "female") {echo "checked";}?>/> Hi, well I didn't know where to post this, but it's about coding and HTML so I think this is it. I would like to add audio (a MP3 file) to my web page, but I have no idea how to do this by HTML. I would like to know: 1.- How do I add a music file (HTML) 2.- Which is the code for the On and Off button. 3.- How exactly do I use frames (i'm totally new in that aspect) in order to have the same music going on in every part of the site even if I change of page instead of strating over agian. Thanks for your help. Hey guys, EDIT: I figured it out. There was a phantom image that I had between the two that no longer belongs. Nevermind! Thanks, ~C-Style~ I created my website in photoshop and sliced it up and exported it as HTML/Images so it would be coded in CSS and with div tags. But I am unable to center my website as a whole. If I export them as a table I can center it easily (Here is my site in tables.), but no one really like tables and I would much prefer it in CSS and with div tags. Here's the site when coded with CSS. HTML Code: <html> <head> <title>Linnit</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <!-- Save for Web Styles (Linnit.psd) --> <style type="text/css"> <!-- #Table_01 { position:relative; right:50px left:0px; top:0px; width:950px; height:1250px; padding-left: 200em; } #index-01 { position:absolute; left:0px; top:0px; width:950px; height:14px; } #index-02 { position:absolute; left:0px; top:14px; width:198px; height:1236px; } #Logo { position:absolute; left:198px; top:14px; width:175px; height:87px; } #index-04 { position:absolute; left:373px; top:14px; width:392px; height:87px; } #index-05 { position:absolute; left:765px; top:14px; width:185px; height:1236px; } #index-06 { position:absolute; left:198px; top:101px; width:567px; height:6px; } #Left-Nav { position:absolute; left:198px; top:107px; width:232px; height:60px; } #index-08 { position:absolute; left:430px; top:107px; width:6px; height:60px; } #Home { position:absolute; left:436px; top:107px; width:55px; height:60px; } #About { position:absolute; left:491px; top:107px; width:47px; height:60px; } #Linnit { position:absolute; left:538px; top:107px; width:52px; height:60px; } #Contact { position:absolute; left:590px; top:107px; width:65px; height:60px; } #index-13 { position:absolute; left:655px; top:107px; width:55px; height:60px; } #Other { position:absolute; left:710px; top:107px; width:55px; height:60px; } #index-15 { position:absolute; left:198px; top:167px; width:567px; height:6px; } #Main { position:absolute; left:198px; top:173px; width:468px; height:232px; } #index-17 { position:absolute; left:666px; top:173px; width:6px; height:232px; } #Right { position:absolute; left:672px; top:173px; width:93px; height:232px; } #index-19 { position:absolute; left:198px; top:405px; width:567px; height:845px; } --> </style> <!-- End Save for Web Styles --> </head> <body style="background-color:#FFFFFF; margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px;"> <!-- Save for Web Slices (something.psd) --> <div id="Table_01"> <div id="index-01"> <img src="images/index_01.gif" width="950" height="14" alt=""> </div> <div id="index-02"> <img src="images/index_02.gif" width="198" height="1236" alt=""> </div> <div id="Logo"> <a href="index.html"> <img src="images/Logo.gif" width="175" height="87" border="0" alt="Logo"></a> </div> <div id="index-04"> <img src="images/index_04.gif" width="392" height="87" alt=""> </div> <div id="index-05"> <img src="images/index_05.gif" width="185" height="1236" alt=""> </div> <div id="index-06"> <img src="images/index_06.gif" width="567" height="6" alt=""> </div> <div id="Left-Nav"> <img src="images/Left_Nav.gif" width="232" height="60" alt=""> </div> <div id="index-08"> <img src="images/index_08.gif" width="6" height="60" alt=""> </div> <div id="Home"> <a href="index.html"> <img src="images/Home.gif" width="55" height="60" border="0" alt=""></a> </div> <div id="About"> <a href="about.html"> <img src="images/About.gif" width="47" height="60" border="0" alt=""></a> </div> <div id="Linnit"> <a href="linnit.html"> <img src="images/Linnit.gif" width="52" height="60" border="0" alt=""></a> </div> <div id="Contact"> <a href="contact.html"> <img src="images/Contact.gif" width="65" height="60" border="0" alt=""></a> </div> <div id="index-13"> <img src="images/index_13.gif" width="55" height="60" alt=""> </div> <div id="Other"> <a href="other.html"> <img src="images/Other.gif" width="55" height="60" border="0" alt=""></a> </div> <div id="index-15"> <img src="images/index_15.gif" width="567" height="6" alt=""> </div> <div id="Main"> <img src="images/Main.gif" width="468" height="232" alt=""> </div> <div id="index-17"> <img src="images/index_17.gif" width="6" height="232" alt=""> </div> <div id="Right"> <img src="images/Right.gif" width="93" height="232" alt=""> </div> <div id="index-19"> <img src="images/index_19.gif" width="567" height="845" alt=""> </div> </div> <!-- End Save for Web Slices --> </body> </html> I just put up a flash banner and below it are the html links (incase someone doesn't want to dl the plugin) and it worked in IE6 but not in Firefox I don't know the reason why, I do see it in the source for FF but it's not showing. I also cleared cache but still don't see it. my site's at www.PTSgirl.com ..am I the only one who doesnt see it in firefox?? thanks in advance! hi. i am developing a web application which includes tree view on left hand side and a table on right hand side which displays information if i clicked on any leaf of tree. This is the concept, i hv created view but unable to show information in right pane if i am gng to click on any link in tree view. Please help me i've designed my page as: HTML Code: <div class="yesVisible" id="loginFormDiv" name="loginFormDiv"> <form method="get" id="loginForm" name="loginForm" onsubmit="validate(this)" > <input type="text" size="10 /> <img src="login.gif" name="loginImg" id="loginImg" /> </form> </div> And the validator function is as follows: Code: function validate(form) { var v= document.getElementById("loginFormDiv"); // print a line saying loggin in and show an icon in the login div v.innerHTML=" <h1> loging in... </h1>" + "<img src=\"loadin.gif\" />" alert("validating"); // later other ajax code will be here return false; } But unfortunately this code is not working...........What should i do ???? This code is intended to let users a feeling that they are loggin in...... The website will be made for: http://www.favourite9site.com/blog Hey guys. I don't know if I'm not using the correct data type, but I can't seem to get this audio file to play when I run my startTimer function. Any suggestions? Thank you! <!DOCTYPE html> <head> <script type="text/javascript"> var c = 0; var T; var a = 1000; var b; //var audio = document.createElement('asharpdot1'); //audioElement.setAttribute('audio', 'loading.wav'); //audioElement.play(); function startTimer(){ c = c+1 document.getElementById('myText').innerHTML=c; function Music(){ document.getElementById('asharpdot').audioElement.play(); } if(c<4){ T = setTimeout("startTimer()", a); //document.getElementById('myText').innerHTML=c; } else { c=0 T = setTimeout("startTimer()", a); }; } function SlowTemp(){ a=a-50 } function UpTemp(){ a=a+50 } document.getElementById('tempo').innerHTML= b; </script> </head> <body> <a id="myText" href="#">Beat</a> <a id="tempo" href="#">Tempo</a> <audio id="asharpdot" autoplay="autoplay" src="../Rhythm/VM618 home/asharpdot.wav" </audio> <input type="button" onclick="startTimer()" value="Start Timer"> <input type="button" onclick="SlowTemp()" value="Tempo Up"> <input type="button" onclick="UpTemp()" value="Tempo Down"> <audio id="csharp1dot" autoplay="autoplay" src="csharp1dot.wav" </audio> </body> </html> I am createing HTML page in notepad++ some code is here. My problem is , i would like to apply the same formatting to each <td> without using <p> how to do it please reply. <html> <head> <title>Policy</title> <style> how to write style style here? </style> </head> <body lang=EN-US link=blue vlink=purple> <table border=0 width=100% height=100% cellpadding=10 cellspacing=0> <tr > <td > <p style='margin-left:30%;'> <img width=332 height=144 src="ftp_files/image001.jpg"> </p> </td> </tr> <tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr> <tr> <td > <p style='font-size:26.0pt;font-family:Arial;margin-left:25%;'>Foreign Travel Policy &Procedures</p> </td> </tr> <tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr> <tr> <td> <p style='font-size:26.0pt;font-family:Arial;margin-left:40%;'>Version 1.1</p> </td> </tr> <tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr> <tr> <td> <p style='font-size:12.0pt;font-family:Arial;margin-left:5%'><b>Document Version Control<b></p> </td> </tr> <tr> <td> <table border=1 cellspacing=0 cellpadding=3 width=568 style='margin-left:5%;background:silver;border-collapse:collapse;'> <tr> <td> <p style='font-size:10.0pt;font-family:Arial;text-align:center'>SR. No.</p> </td> <td> <p style='font-size:10.0pt;font-family:Arial;text-align:center'>Date</b></p> </td> <td > <p style='font-size:10.0pt;font-family:Arial;text-align:center'>Description/Comments</b></p> </td> <td> <p style='font-size:10.0pt;font-family:Arial;text-align:center'>Submitted by</b></p> </td> </tr> <tr style='background:white'> <td><p style='font-size:10.0pt;font-family:Arial;text-align:center'>1</p> </td> <td><p style='font-size:10.0pt;font-family:Arial;text-align:center'>22 October 2007</span></p> </td> <td ><p style='font-size:10.0pt;font-family:Arial;text-align:center'>Initial draft on Foreign Travel Policy & Procedures</span></p> </td> <td><p style='font-size:10.0pt;font-family:Arial;text-align:center'>Gianfranco Di Bonaventura</span></p> </td> </tr> <tr style='background:white'> <td ><p style='font-size:10.0pt;font-family:Arial;text-align:center'>2</span></p> </td> <td> <p style='font-size:10.0pt;font-family:Arial;text-align:center'>1st November 2008</p> </td> <td><p style='font-size:10.0pt;font-family:Arial;text-align:center'>Review on Foreign Travel Policy & Procedures</p> </td> <td><p style='font-size:10.0pt;font-family:Arial;text-align:center'>Gianfranco Di Bonaventura</p> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr style='background:white'> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> </td> </tr> <tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'> Authorized Signatory</b> </td> </tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>On behalf of Arjuna IT Solutions Pvt. Ltd.</b> </td> </tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Gianfranco Di Bonaventura </b> </td> </tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>( Managing Director ) </b> </td> </tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Sign: </b> </td> </tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Date:</b> </td> </tr> <tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr><tr><td> </td></tr> <tr> <td> <b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Table Of Contents</b> </td> </tr> <tr> <td><b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Objective................................................................................. </td> </tr> <tr> <td><b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Scope..................................................................................... </td> </tr> <tr> <td><b><p style='font-size:10.0pt;font-family:Arial;margin-left:5%'>Procedure................................................................................. </td> </tr> <tr> <td><p style='font-size:9.0pt;font-family:Arial;margin-left:8%'>PLANNING................................................................................... </td> </tr> <tr> <td><p style='font-size:9.0pt;font-family:Arial;margin-left:8%'>Travel Checklist........................................................................... </td> </tr> <tr> <td><p style='font-size:9.0pt;font-family:Arial;margin-left:8%'>Travel Budget.............................................................................. </td> </tr> <tr> <td><p style='font-size:9.0pt;font-family:Arial;margin-left:8%'>Expense Maintenance Sheet ................................................................. </td> </tr> <tr> <td><b><p style='font-size:9.0pt;font-family:Arial;margin-left:5%'>Attachment................................................................................. </td> </tr> <tr> <td> </td> </tr> </table> </body> </html> Hi! I've been trying none end to get this form working for a friend..I always get the same error - Here's the code, it points to a script with www.godaddy.com (can anyone please look into it?) Thx!! <form name="contact" method="post" action="gdform.asp" enctype="multipart/form-data" id="form"> <input type=hidden name="recipient" value="exquisitetaramtl@live.ca"/> <input type=hidden name="subject" value="Online Inquiry"/> <input type=hidden name="redirect" value="http://www.exquisitetara.com/index3.html"/> <table style="width:515px; height: 149px;" class="style19"> <tr> <td style="width:210px"> <table style="height: 155px"> <tr> <td style="">Name: <br /> <input name="name" type="text" /></td> </tr> <tr> <td style="">E-mail: <br /> <input name="email" type="text" /></td> </tr> <tr> <td style="">Phone: <br /> <input name="phone" type="text" /></td> </tr> </table> </td> <td style="">Message: <br /> <textarea name="message" style="width: 336px; height: 107px"></textarea> <div style="text-align:right"> <span><a href="#" onClick="document.getElementById('form').reset()">clear</a></span><img src="images/spacer.gif" alt="" width="26" height="1"/><span><a href="#" onClick="document.getElementById('form').submit()">send</a></span></div> </td> </tr> </table> </form> i am dynamically creating a HTML in which i have an <img> tag but when i click on it it is not giving any sound like we normally get. so what could be wrong. any help on this ASAP is very help full Hi, I am a noobie, now in the middle of learning HTML. I tried to move an image from my local drive but it seem not working. Below are my code. HTML Code: <html> <body style="background-color:PowderBlue;"> <h1>This is Page1</h1> <p>This is some text.</p> <p><a href="mainpage.htm">This is a link to Main Page</a></p> <p style="font-family:times;color:white;font-size:30"><a href="page2.htm" target="_blank"><acronym title = "TEST TEST TEST TEST">This is a link to Page <sup>2</acronym></a></p> <br /> <p> <b>You can also use an image as a link:</b> <a href="mainpage.htm"> <img border="0" src="pulpit.jpg" width="265" height="238"> </a> </p> <br /> <br /> <img border="0" src="http://www.w3schools.com/images/pulpit.jpg" alt = "picture" width="265" height="238"> <h1>Look! Styles and colors</h1> <a href="#tips">Useful Tips Section</a> <p style="font-family:verdana;color:red"> This text is in Verdana and red</p> <p style="font-family:times;color:white;font-size:50px"> This text is in Times and green</p> <p style="font-size:30px">This text is 30 pixels high</p> </body> </html> The image file was located in the path "C:\language\lesson1\images\pulpit.jpg" The script file was located in the path "C:\language\lesson1\test.htm" Is there any initial setup to be done in order the IE could locate the images? Thanks in advance. i am dynamically creating a HTML in which i have an <img> tag but when i click on it it is not giving any sound like we normally get. so what could be wrong. any help on this ASAP is very help full HOW MANY <body> </body> BODIES CAN I HAVE IN THIS INDEX FILE? IF YOU SEE ANY IMPORTANT MISTAKE PLEEAAAASEEE HEEELLLPPPP!!! Code: <html> <head>PLEASE HELP!</head> <script type="text/javascript"> window.onload=function() { document.getElementById('NewsletterList').onchange=function() { window.location=('http://www.homeless-forum.org/'+this.value+''); } } </script> <body> <br> <CENTER> <select id="NewsletterList"> <a target=\"_blank\" href=\"file.doc\" title=\"\">John Doe<br> XXXXXXXXXXX</br></a>. <option value=""><b> PLEASE SELECT<b/></option><!--this option takes you to --> <body mar="0" marginheight="0" bgcolor="rgb(38,38,38)"> "BACKGROUND BLUE GREEN MARMOL " <embed width="100%" height="100%" name="plugin" src="http://canImakeApdfFileA1stWebPage?.pdf" type="application/pdf"> <option value=index.htm>Option #1</option><!--this option takes you to --> <option value="option2">Option #2</option><!--this option takes you to --> <option value="option3">Option #3 </option><!--this option takes you to --> <option value="option4"><br>Option #4</br></option><!--this option takes you to --> <option value="option5">Option #5</option><!--this option takes you to --> <option value="option6">Option #6</option><!--this option takes you to --> <option value="blog/wp-login.php"><!--this option takes you to blog--> </select> </body> </CENTER> </br> <html xmlns:v="urn:schemas-microsoft-com:vml" ............... </html> I've played around with this code but it seems as if I can't get the buttons to appear. Is this related to the script type? Anyone know how I can fix this? [the location is not set yet, my problem is just getting the buttons to show up] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <TITLE> Meats </TITLE> </HEAD> <BODY> <SCRIPT type="text/javascript"> <table> <table border="1" align="center" cellpadding="1" cellspacing="1" BGCOLOR=blue > <tr> <td> <INPUT type="button" value="Home" name="button1"onClick="window.location='http://www.htm'"> <td> <INPUT type="button" value="History" name="button2" onClick="window.location='http://steakslocation.htm'"> <td> <INPUT type="button" value="Residents" name="button3" onClick="window.location='http://porklocation.htm'"> <td> <INPUT type="button" value="Events" name="button4" onClick="window.location='http://poultrylocation.htm'"> <td> <INPUT type="button" value="Links" name="button5" onClick="window.location='http://venisonlocation.htm'"> </SCRIPT type="text/javascript"> <div id="PICTURE"> <img src="anthropormophic_bacon.jpg" height="90%" width="90%" alt="Buddy!" /> <center> Y Halo Thar </center> </div> </table> The content of the document...... </BODY> </HTML> Hi Guys/Ladies Im working through CSS learning it and so far its going well but i am stuck on this issue and a refuse to turn back to Html Tables etc i want to learn how to code without tables So i have a horizontal Menu bar and i would like to populate it with buttons linking to different sections on the site there is already two buttons but you can see from the image they are both touching one another i need to space them out, the buttons arent finished i want to get the layout sorted first then start adding detail. This is the CSS for the menu bar. I added the background image. HTML Code: div.hideSkiplink { background-image: url('/images/BottomMenu.gif'); width:100%; } div.menu { padding: 4px 0px 4px 8px; } div.menu ul { list-style: none; margin: 0px; padding: 0px; width: auto; } div.menu ul li a, div.menu ul li a:visited { background-color: #465c71; border: 1px #4e667d solid; color: #dde4ec; display: block; line-height: 1.35em; padding: 4px 20px; text-decoration: none; white-space: nowrap; } div.menu ul li a:hover { background-color: #bfcbd6; color: #465c71; text-decoration: none; } div.menu ul li a:active { background-color: #465c71; color: #cfdbe6; text-decoration: none; } This is the code on the site master where im calling the CSS HTML Code: <div class="clear hideSkiplink"> <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/> <asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/> </Items> </asp:Menu> </div> iv attached the image so you can see what its doing.... Hope some one can help me I am making a simple calculator program for a school science fair project, and I used a CSS Button Maker program that I got fro ma google search, and when I try to change my buttons from the normal preset ones to the one I made, it disrupts the onClick, and makes he buttons not work. any idea on how to fix this? Here is before the change to the cool buttons: Code: <HTML> <HEAD> <TITLE>Gavin's Science Fair Project</TITLE> <script LANGUAGE="JavaScript"> function CalculateSum(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A + B; } function CalculateDif(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A - B; } function CalculatePro(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A * B; } function CalculateQuo(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A % B; } function ClearForm(form) { form.input_A.value = ""; form.input_B.value = ""; form.Answer.value = ""; } // end of JavaScript functions --> </SCRIPT> <style type="text/css"> input.groovybutton { font-size:15px; width: 250px; height: 25px; font-family:Comic Sans MS,sans-serif; font-weight:bold; color:#000000; background-color:#FF0066; border-style:outset; } </style> </HEAD> <DIV ALIGN=CENTER> <table border="10" bgcolor="#0C6AA1"> <tr> <td><P><FONT SIZE="+3">Simple Calculator</FONT></P> <FORM NAME="Calculator" METHOD="post"> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_A" SIZE=15></P> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_B" SIZE=14></P> <DIV ALIGN=CENTER><P><INPUT TYPE="button" VALUE="Add Numbers" name="AddButton" onClick="CalculateSum(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Subtract Numbers" name="SubButton" onClick="CalculateDif(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Multiply Numbers" name="MultButton" onClick="CalculatePro(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Divide Numbers" name="DivButton" onClick="CalculateQuo(this.form.input_A.value, this.form.input_B.value, this.form)"></P> <P><INPUT TYPE="button" VALUE="Clear Fields" name="ClearButton" onClick="ClearForm(this.form)"></P></DIV> <P>Answer = <INPUT TYPE=TEXT NAME="Answer" SIZE=18></P> </FORM></td> </DIV> </BODY> </HTML> And here is after: Code: <HTML> <HEAD> <TITLE>Gavin's Science Fair Project</TITLE> <script LANGUAGE="JavaScript"> function CalculateSum(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A + B; } function CalculateDif(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A - B; } function CalculatePro(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A * B; } function CalculateQuo(Atext, Btext, form) { var A = parseFloat(Atext); var B = parseFloat(Btext); form.Answer.value = A % B; } function ClearForm(form) { form.input_A.value = ""; form.input_B.value = ""; form.Answer.value = ""; } // end of JavaScript functions --> </SCRIPT> <style type="text/css"> input.groovybutton { font-size:15px; width: 250px; height: 25px; font-family:Comic Sans MS,sans-serif; font-weight:bold; color:#000000; background-color:#FF0066; border-style:outset; } </style> </HEAD> <DIV ALIGN=CENTER> <table border="10" bgcolor="#0C6AA1"> <tr> <td><P><FONT SIZE="+3">Simple Calculator</FONT></P> <FORM NAME="Calculator" METHOD="post"> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_A" SIZE=15></P> <P>Enter a number: <INPUT TYPE=TEXT NAME="input_B" SIZE=15></P> <form name="groovyform"> <input type="button" name="AddButon" class="groovybutton" value="Add Numbers" onClick="CalculateSum(this.form.input_A.value, this.form.input_B.value, this.form)" title=""> </form> <form name="groovyform"> <input type="button" name="SubButton" class="groovybutton" value="Subtract Numbers" onClick="CalculateDif(this.form.input_A.value, this.form.input_B.value, this.form)" title=""> </form> <form name="groovyform"> <input type="button" name="DivButton" class="groovybutton" value="Divide Numbers" onClick="CalculateQuo(this.form.input_A.value, this.form.input_B.value, this.form)" title=""> </form> <form name="groovyform"> <input type="button" name="MultButton" class="groovybutton" value="Multiply Numbers" onClick="CalculatePro(this.form.input_A.value, this.form.input_B.value, this.form)" title=""> </form> <form name="groovyform"> <input type="button" name="ClearButton" class="groovybutton" value="Clear Fields" onClick="ClearForm(this.form)" title=""> </form> <P>Answer = <INPUT TYPE=TEXT NAME="Answer" SIZE=18></P> </FORM></td> </DIV> </BODY> </HTML> If anyone can help with this, It would be greatly appreciated. |