HTML - Submit, Onclick And A World Of Confusion
Hi there guys, I'm a newb to forms in Dreamweaver, so any help will be appreciated.
I would like a form on my DJ website that asks the potential customer how many hours they want a disco for, their location and any extras they want to have with the package. The form will then calculate the value of everything and give them a price. I would like to display this answer only after the visitor clicks on a button, rather than just have the information pop up/recalculate every time the visitor changes something on the form. Thanks guys! Similar TutorialsHi, I'm trying to make a portfolio website where when you hover your mouse over a "thumbnail A", "image A" appears in a separate div and when you move your mouse off the "thumbnail A", "image A" goes away. I made it do that with "onmouseover" and "onmouseout" codes, but now i want to make it so when you click on "thumbnail A", "Image A" stays visible even when you move your mouse away using an "onclick" behavior code. But the code is getting confused by the "onclick" conflicting with the "onmouseout" behavior code, so "image A" still dissapears when you move your mouse off the thumbnail. Is there a way to fix this or a better way to do this??? Thanks!! Hello there! I want to start from scratch on HTML, XHTML, CSS and further. For that I need some guidance as to where to look for learning these languages from BASIC to MASTERY. I learned a bit from w3schools.com but it seems there it's less descriptive and explanatory and more on the practical side. After studying and completing the languages, I want to take an exam and get certifications for that all ONLINE! Thanx! Hi Masters of Code World! I admit - I'm a major newbie when it comes to code - but I'm always willing to learn from you experts. Here's my duh issue. In Word Press, I have these green buttons I made.. <div style="width: 100%;"> <div style="float: left; margin-right: 5px;"><a id="testbutton" href="http://www.claritymind.com/?page_id=746">Who I Work With</a></div> <div style="float: left; margin-right: 5px;"><a id="testbutton" href="http://www.claritymind.com/?page_id=750">How I Work</a></div> <div style="float: left; margin-right: 5px;"><a id="testbutton" href="http://www.claritymind.com/what-is-coaching/">What Is Coaching</a></div> <div style="float: left; margin-right: 5px;"><a id="testbutton" href="http://www.claritymind.com/?page_id=869">Clients</a></div> <div style="float: left; margin-right: 5px;"><a id="testbutton" href="http://www.claritymind.com/ ">Clarity Mind Blog</a></div> </div> They look pretty cool, see: http://www.claritymind.com/services/ my problem happens when I insert text after them... the text butts up to the green buttons. ARHH. In order to create a space or line break, I found a work around by adding 1 or 2 If I do other editing on the rest of the page, or if I update the page - I lose those spacers and have to re-input them over and over. It's driving me nuts. Sometimes, I'll have to use those spacers when line breaks don't work on the page. What a pain. So - masters of CODE world - what's up here? Why is it doing this? What am I missing? Why can't I just hit ENTER to provide a space and see it reflected on the front end? AWAITING YOUR WISDOM Ken: Hello, okay, so i was thinking about redesigning my site because i never really have done so before. but as i was thinking, i was thinking it would be nice to be able to fit more stuff across the screen width wise.... right now my website has like 750px width... and i was wondering if i increased it some, would the majority of the people not have a problem viewing it? and if so, how many pixels wide do u think i could go before its too wide... i have my screen resolution said at 1280x1024... does anybody know what the majority of people set their screen resolutions to? any help would be great..thanks.. Hello everyone. I'm not sure what type of menu this is called, and I believe it's Javascript, but I'm just not sure. What it is is a menu that just shows the top level, but when you click on it, it drops down to show you a sub-level. Does anyone know what this type of menu is called? Any help is greatly appreciated. Thanks! ok, ive made a form that allows people send comments to my email, this is the first form ive made http://www.freewebs.com/narcotica/contact.htm but the form does not work i have checked website and i still cant work out why it wont work, the same message comes up "This form is inoperational!" so please could someone help me here. Thanks, Narc I am totally confused about DOCTYPE code. My site does not have any doctype code on it and works fine, however been playing about with some jquery script and it wanted a doctype on my site to work. I have tried all the different doctypes listed on the w3 site and all make my site look strange and text/images all over the place the only way the site looks ok is without doctype. please advise the site in question is http://virtualhunterston.eu.org example test page with doctype added http://www.virtualhunterston.eu.org/...0-%20Copy1.htm I'm trying to re-do and validate all my 100+ websites; this one is the most recent: http:// www.sticksite.com/cook/indexNEW.html and after "Tidy" cleaned it up I now have the very top looking like this which I know is not right: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> --> <html> <head> <meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org"> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title>Fast, nutritious meals</title> My pages are nothing fancy, I just want them to work. "Transitional" is fine; I'm not worried yet about "Strict." I'm validating at http://validator.w3.org/ Can one of you super HTML specialists please tell me how the top of my pages SHOULD look? Many thanks in advance! Hi Hope someone can help and old silver surfer who is completely confused. I have built a site http://beautyadvicestore.com/skincare using dreamweaver with the following result. In IE7 the sales page is OK until 75% down when the black background obscures the print. This is the only fault apart from the fact I have not loaded one of the pictures (a small matter) In Firefox the sales page is OK all the way down but when I try to load the articles from 'Tips Tricks and Secrets' at the bottom of the sales page which goes to an article index page http://beautyadvicestore.com/skincare/articleindex.php the articles load without the graphics. I have tried saving the articles as html and php formats with no difference all graphics show in IE7 but not in Firfox. Strange thing is it is ONLY the articles that this happens all other pages are OK Privacy- about us- contact us etc. All have graphics. I have used the same template throughout only adding text. Can anyone help to show what I am doing wrong this is the first time this has happened in my limited experience. regards Hello all. This is my first post here. I have a question regarding tables, divs, just basically anything to do with that area, etc. I am making a simple javascript calculator, and what I want to do with it is put it in a table. Just simple forms, buttons, tables, and divs. My problem, however, is that I need to have the operators (add, minus, subtract, divide buttons) centered along the bottom across. Right now, the code is causing the buttons to be in somewhat a "grid" and stuck to the right side of the table. I've tried <div align="right">, i've also tried <td align="right">.. Yet with no luck. I kindly ask for anyone generous enough to help me to please review my code I'm going to paste into this message. Thanks for reading. tl;dr: I need the buttons on the bottom to be centered horizontally, not stacked and positioned in the right side of the table. ps. if I was unclear about anything, please ask me, and I will try my best to explain. index.html Code: <!DOCTYPE html PUBLIC "~//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Document Title</title> <meta name="Generator" content="x" /> <meta name="Author" content="x" /> <meta name="Keywords" content="x" /> <meta name="Description" content="This is a simple calculator" /> <style type="text/css"> body { background-color:#d0e4fe; } #btnadd { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btnminus { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btndiv { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } #btnmult { background-color:white; border-color:#0000FF; color:blue; font-size:15px; } h1 { color:orange; text-align:center; } p { font-family:"Times New Roman"; font-size:20px; } </style> <script language="javascript"> function fadd() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first+sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fminus() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first-sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fdiv() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first/sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function fmult() { var first,sec,res; //Take the value of first textbox and convert it to float first=parseFloat(document.forms[0].txt1st.value); //Take the value of second textbox and convert it to float sec=parseFloat(document.forms[0].txt2nd.value); res=first*sec; //show the result in alertbox alert("the result is "+res); //show the result in the result textbox document.forms[0].txtresult.value=res; } function pushButton(buttonValue) { if (buttonValue == 'C') { document.getElementById('txt1st').value = ' '; document.getElementById('txt2nd').value = ' '; } else { document.getElementById('txt1st', 'txt2nd').value += buttonValue; } } </script> </head> <body> <form name="cal" method="post" action=""> <table width="310px" border="0" cellspacing="0" cellpadding="20px"> <tr> <td width="40%"><div align="left">Enter 1st number </div></td> <td width="81%"><input name="txt1st" type="text" id="txt1st"></td> </tr> <tr> <td><div align="left">Enter 2nd number </div></td> <td><input name="txt2nd" type="text" id="txt2nd"></td> </tr> <tr> <td height="28"><div align="left">Result </div></td> <td height="28"><input name="txtresult" type="text" id="txtresult"></td> </tr> <tr> <td height="21"> <div align="left"> </div></td> <td width="100%"> <input name="btnadd" type="button" id="btnadd" value="Add" onclick="fadd()"> <input name="btnminus" type="button" id="btnminus" value="Subtract" onClick="fminus()"> <input name="btndiv" type="button" id="btndiv" value="Divide" onClick="fdiv()"> <input name="btnmult" type="button" id="btnmult" value="Multiply" onClick="fmult()"> <br> <input name="btnClr" type="button" id="btnClr" value="C" onclick="pushButton(this.value);"> </td> </tr> </table> </form> </body> </html> To further explain how I wish the buttons to be positioned: Go here > http://koderguru.com/tutorials/javas...culatorex1.php. See how the buttons are aligned horizontally? I want it like that, but across the whole bottom. Thanks again for reading!! I hope to view your replies soon! Okay, I have a problem. I haven't been doing this long, but when I coded my website, it looked fine the way it was (in Firefox), but I recently checked the look in Opera and Internet Explorer, and the whole layout falls apart. I have no idea what the problem is, can anyone suggest some possible problems? Here is the URL: Homepage EDIT: My message was over 10,000 characters, so please view the source code. Thank you. Here's my code: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Language" content="EN-GB"> <html> <head> <title>History Project - Home</title> <link rel="stylesheet" type="text/css" href="Data\pagestyle.css"> </head> <body> <!-- Start Navigation Board --> <div class="navboard"> <img src="Data\logo.png"> <p class="txt1"><a class="nav" href="\">Towns</a></p> <p class="txt1"><a class="nav" href="\">Life</a></p> <p class="txt1"><a class="nav" href="\">Entertainment</a></p> <p class="txt1"><a class="nav" href="\">Guilds</a></p> <p class="copy">© Copyright Joshua Wilkinson.</p> </div><!-- End Nav Board --><!-- Start page text --> <p class="txt2">Welcome!</p> </body> </html> And here's the css: Code: body { background-color:#660000; margin:0px; overflow:; } div.navboard { background-color:#9E0000; position:absolute; height:100%; width:126px; float:left; } p.txt1 { margin:0px; text-align:center; font-size:17; } a.nav { color:#000000; margin:0px; text-decoration:none; position:relative; } p.copy { color:#000000; font-size:10; text-align:center; } p.txt2 { color:#000000; font-size:18; margin-left:130px; float:right; } Now I want the lighter part to be on the left as it is, but then I want the text to be about 4px away from it at the top-left. But whenever I try to put it right, it all goes wrong. Anybody help? If you need me to answer a question, I'm subscribed to this thread. Hey folks - Everywhere I've read states that if I give a series of checkboxes the same name, then upon hitting submit, I will get a comma separated list of the values. But, that just isn't working for me. I have this code : Code: <html><body> <form method="get"> <input name="input" size="30" maxlength="100" id="searchbox" value="test" /><br /> <input type="checkbox" name="referBy" value="td"/> Test driven a vehicle<br/> <input type="checkbox" name="referBy" value="dlr"/> Visited an autotmotive dealer<br/> <input type="checkbox" name="referBy" value="veh"/> Purchased/Leased a vehicle<br/> <input type="checkbox" name="referBy" value="ins"/> Purchased automobile insurance<br/> <input type="submit" value="Submit"/> </form> </body> </html> But, it results in this for the URL - ...../s_r2.htm?input=test&referBy=td&referBy=dlr Any thoughts Maybe I'm missing a step or a setting Syl Hi, I've been looking at a friends website, built by a design company, which is not gathering much in the way of hits. I've noticed that the keyword and description tags are in single quotes, rather than double quotes. An html online check tells me that there are no tags on the page. Can anyone tell me whether this use of single quotes would stop a searchengine seeing the tags, please? Or do I need to look elsewhere for the problem? Ian For some reason I cannot get any of my divs to be click-able in Internet Explorer. Can someone give me a hand? The code looks like... <div id="select_connected" onClick="toggleView(1);"></div> <div id="select_involved" onClick="toggleView(2);"></div> <div id="select_contact" onClick="toggleView(3);"></div> <div id="search_icon" onClick="searchme();"></div> and the style looks like... #search_icon { cursor:pointer; position: absolute; left: 569px; top: 16px; width: 32px; height: 31px; z-index: 6; } #select_connected { cursor:pointer; position: absolute; left: 385px; top: 53px; width: 134px; height: 35px; z-index: 6; } #select_involved { cursor:pointer; position: absolute; left: 522px; top: 52px; width: 104px; height: 35px; z-index: 6; } #select_contact { cursor:pointer; position: absolute; left: 628px; top: 53px; width: 137px; height: 35px; z-index: 6; } You can see my page at www.masconline.info/titlebar.html Can anyone lend me a hand? Hello, I am trying to create a div that has 5 images on it, and when you click on one of the images it will fill the entire div with a quote. I would include a "close" link to close out the expanded quote, and return back to the 5 images. Does anyone know of any resources where I could learn more about how to do this? Thanks, Steve I have a form and I'm creating a "tab" effect where if you click on a tab ( image I created) that specific div will appear. I tried using the Onclick tag but as soon as I release the mouse button the div disappears... I've tried onmousedown, onmouseup, onmouseout and nothing is working. Anyone have any ideas? <td width="12%"><input src="images/TabReferralReport.jpg" type="image" runat="server" class="submit" height="127" width="75" onclick="ShowPanel('Referral',true); ShowPanel('RecordChecks',false); ShowPanel('ChildAbuse',false); ShowPanel('Disposition',false); ShowPanel('Response',false); ShowPanel('Eligibility',false); ShowPanel('ReferralSource',false);"></td> <td width="12%"><input src="images/TabRecordChecks.jpg" type="image" runat="server" height="127" width="75" onclick="ShowPanel('Referral',false); ShowPanel('RecordChecks',true); ShowPanel('Eligibility',false); ShowPanel('Disposition',false); ShowPanel('Response',false); ShowPanel('ChildAbuse',false); ShowPanel('ReferralSource',false);"></td> I want to add a cart type feature to the website I'm working on. Basically I want it say quantity in stock: # then when someone clicks on an Add to Cart Button it reduces this number by 1 and sends them to a page where it says what item they added. I am trying to implement some HTML code where the user is able to click on a letter of the alphabet and it would return a row of data with that letter. The row of data is from a SQL query. How would I i mplement that into HTML? Here is a bit of the code I am trying to implement. How would I be able to return a row of data with the same letter as each link?? <a id='A' href="#" onclick="('A'); return false;"><span class="alpha">A </span></a> <a id='B' href="#" onclick="('B'); return false;"><span class="alpha">B </span></a> Im hoping i posted in the right forum, but my question is basically just that. Alright let's assume I have a basic website. There are images with rollovers, and etc, so its nice and sleek. But what I want to add, is an onclick function for a certain image, and the result to be another image changing on the website in a different location. Your probly thinkin.. huh? Here ill try and explain alil better... [Image 1] -> Is on left side of screen. [Image 2] -> Is on right side of screen. When i click [Image 1], I want Image 2 to change... without having to refresh the page. Kind of like those javascript menu's -- you click on one button, and then a content menu on the side updates without having to reload the website, nor redirect. Can someone point me in the right direction? I am fully willing to do the research, just need a keyword or two for google.com |