Jump to content


  • Posts

  • Joined

  • Last visited

marisc88's Achievements


Newbie (1/7)



  1. Ok thank you both for replying. I've made the changes suggested by Don E and replaced type="image" with type="reset" as suggested by thescientist and it now appears to work... I'm confused why you can customise the submit button by using type="image" but can't use it for the reset button.. going to have to work out how to do that now. My submit button is behaving differently in Mozilla (opening outlook email) and IE (opening message box alerting email is being sent) but im guessing thats because the site hasnt actually been uploaded to the server yet - or am I wrong and the forms supposed to work as should live? But anyways, Thanks again for help with the intial problem.
  2. Hello I've just done my first form validation and need help with one little niggle. The problem is with the "resetForm" Function. It works in terms of clearing the form but the alert that shows is the first alert for Function validateForm i.e."We would like to know your name! A first name must be entered". Can someone see where I have gone wrong?? So the JavaScript at the mo is this: function validateForm(){var x=document.forms["contact"]["fname"].value;if (x==null || x=="") { alert ("We would like to know your name! A first name must be entered"); return false; }var x=document.forms["contact"]["lname"].value;if (x==null || x=="") { alert ("We would like to know your name! A last name must be entered"); return false; }var x=document.forms["contact"]["email"].value;var atpos=x.indexOf("@");var dotpos=x.lastIndexOf(".");if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) { alert("Please enter a valid email address"); return false; } }function show_alert(){alert("Entering a postcode informs us where the demand for our service is, in turn allowing us to best serve your location. If you prefer not to give us this information just leave the field blank.");}function resetForm(){ document.forms("resetForm").reset(); alert("The form has been cleared") } An then the HTML form is this: <form name="contact" action="mailto:mypartplanner@hotmail.co.uk" enctype="text/plain" onsubmit="return validateForm()" method="post"> <p> First Name: * <input type="text" name="fname" size="20"> </p> <p> Last Name: * <input type="text" name="lname" size="20"> </p> <p> Post Code: <input type="text" name="postcode" size="20"> </p> <p> <input type="button" onclick="show_alert()" value="Why a Postcode?"/></p> <p> Email: * <input type="text" name="email" size="20"> </p> <p> Phone Number: <input type="text" name="phonenumber" size="20"> </p> <p> Reason for Contacting: <select name="regarding"> <option> Praise <option> Criticism <option> Supplier Review <option> Supplier Recommendation <option> Listing Application <option> Other </select></p> <p> Comments: <textarea name="comments" rows="10" cols="50"></textarea></p> <br> <p> * Required Field </p> <p><input type="image" src="submitbutton.gif" height="40" width="100" border="0" alt="Submit Form"></p> <p><input name="resetForm" type="image" src="clearbutton.jpg" height="30" width="90" onClick="this.form.reset()"/></p> </form> Many Thanks!
  3. Excellent thank you!! - those changes have sorted my intial list styling problem so thanks very much. Unfortunately the link styling is still an issue in Mozilla but i'm not too fussed with sorted this right now. Quick question though what type of code is: /*.....*/ ? Thanks again
  4. p.s I realise the whole thing is a bit of a mess anyway.
  5. Hi Thanks for the reply; this is better CSS and works again in IE but not Mozilla still. I can change the font of the bulleted list and it works in both but not the colour- the colour stays the same as the numbered list. I'm actually having trouble changint the colours of my links in Mozilla aswell so I must have messed up somewhere else. Clearly i'm new to all this and don't quite understand what cancels what out etc. Here is my full style sheet, Any obvious mistakes that might cause this??? : a:link { border-style: 0}a:link {color:#0066CC}a:hover {color:#0000FF}table{ background-color:"white";font-family:Calibri}td {font-family: Calibri; font-size: 11pt;}table.first {border-bottom: 2px solid #6600CC}table.second{border: 3px solid #6600CC}table.third {border: 1px solid #C0C0C0}table.third table { /* keep nested tables from having borders */border-width: 0px}table.fourth {background-color:"#aacde9"}h1{font-family:Teen;color:#6600CC}h2{font-family:Teen;color:#6600CC}h3{font-family:calibri;color:#6600CC}h4{font-family:calibri;color:"black"}h5{font-family:calibri;color:"black"}p.tab { margin-left: 20px; }h3.tab{margin-left: 20px; font-family:calibri;color:#6600CC; font-size; 12px }h4.tab{margin-left: 20px; font-family:calibri;color:"black"; font-size; 10px }ol.a li {font-family:Teen;color:#6600CC;}ol.a ul li {font-family:Calibri;color:"Black";} Many Thanks
  6. Well I worked something out using: <li class="a">Why is my area not listed?</li> and: li.a {font-family:Teen;color:#6600CC} in my style sheet Which works for firefox but not IE, so obviously its not the correct way to do it ???
  7. Hi Im trying to style a group of nested lists. I want the numbered list to be one font with the nested bulleted list to be a different font. In my external style sheet i've put this : ol.a {font-family:Teen;color:#6600CC} and my html lists are this: <ol class="a" type="1" start="1"> <li>Why is my area not listed? <ul><li> copy ....... <a href="contact.html"> Contact us </a> copy ....... </li> </ul> <li>copy .......? <li>copy .......? <li>copy .......? <li>copy .......? <ul><li>copy ....... <a href="contact.html"> Contact us </a> copy ........ </li> </ul> </ol> But the CSS is changing every tag to the style, instead of just the <ol> .I've tried changing the style to apply to <li> and insert <li class="a"> wherever i want that style but that doesnt work either. Can someone please tell me what im missing in this extremely simple code?? Many Thanks
  8. Excellent thank you!So I just changed "function SwapOut to function "SwapOu " just to test and they now both work
  9. thanks for the reply, but one the rollovers works so I dont see why the other wouldn't - the document.Home.src is referred in the HTML later using:<a href="index.html" onMouseOver="SwapOut()" onMouseOut="SwapBack()"><img name="Home" I realise its probably not the 'correct' way of doing it but its currently the only way I know - Basically I did the "Home" rollover first - worked fine then tried to add the "Venues" rollover after and now only the "Venues" one works - Any suggestions by editing the current code? Thanks again
  10. Can someone tell me where the error is in this code? - the "venues" rollover works but now the "home" rollover does not - i.e. how do add multiple rollovers - I understand there is a shorter way of coding this but I just need to keep to what I understand for now.. Many Thanks in advance :)Catherine <script language="JavaScript"><!--Rollimage = new Array ()Rollimage[0] = new Image (87,44)Rollimage[0].src = "home.gif"Rollimage[1] = new Image (87,44)Rollimage[1].src = "homerollover.gif"function SwapOut(){ document.Home.src = Rollimage[1].src; return true; }function SwapBack(){ document.Home.src = Rollimage[0].src; return true; } Rollimage = new Array () Rollimage[2] = new Image (83,44)Rollimage[2].src = "venues.gif"Rollimage[3] = new Image (83,44)Rollimage[3].src = "venuesrollover.gif"function SwapOut(){ document.Venues.src = Rollimage[3].src; return true; }function SwapBack(){ document.Venues.src = Rollimage[2].src; return true; }
  11. Thanks for the quick reply! - OK i will do - so is it true that onmouseover onmouseout can't be used in any situation without Javascript ? - or is there a reason why in this particular case it does? Cheers
  12. Forgive me I am very new to HTML... Can anyone work out what is wrong with this code, in red and bold - currently the rollovers do not work. The images are both saved in the same folder and both the image names are correct - Any ideas? <html><head><title>My Party Planner</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#aacde9" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><style type="text/css">table{border-bottom: 2px solid #6600CC}</style><table id="Table_01" width="1200" height="200" border="0" cellpadding="0" cellspacing="0"> <tr> <td rowspan="2"><a href="index.html"><img src="logo.gif " width="253" height="200" border="0" alt=""></a></td> <td colspan="15"> <img src="mypartyplannertext.jpg" width="947" height="156" alt=""></td> </tr> <tr> <td><a href="index.html" onMouseOver="homerollover.gif" onMouseOut="home.gif"><img src="home.gif" width="87" height="44" border="0" alt=""></a></td> <td> <img src="blank7.jpg" width="16" height="44" alt=""></td> <td><a href="venues.html"><img src="venues.gif" width="83" height="44" border="0" alt=""></a></td> <td> <img src="blank10.jpg" width="15" height="44" alt=""></td> <td><a href="catering.html"><img src="catering.gif" width="99" height="44" border="0" alt=""></a></td> <td> <img src="blank5.jpg" width="14" height="44" alt=""></td> <td><a href=entertainment.html"><img src="entertainment.gif" width="127" height="44" border="0" alt=""></a></td> <td> <img src="blank4.jpg" width="14" height="44" alt=""></td> <td> <img src="file:///C|/Users/Cat/Documents/Web Page/Web Page Images/images/images/navigationbar_11.gif" width="1" height="44" alt=""></td> <td><a href="decoratiions.html"><img src="decorativetouch.gif" width="113" height="44" border="0" alt=""></a></td> <td> <img src="blank3.jpg" width="14" height="44" alt=""></td> <td> <img src="about.gif" width="85" height="44" alt=""></td> <td> <img src="blank3.gif" width="14" height="44" alt=""></td> <td> <img src="contact.gif" width="114" height="44" alt=""></td> <td> <img src="blank1.jpg" width="151" height="44" alt=""></td> </tr></table></body></html> Many Thanks in AdvanceCatherine
  • Create New...