Jump to content

carinemaz

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by carinemaz

  1. That's what I did at first, but since it wasn't working, I assumed I had to leave the elementID ....Even more confused now!
  2. Thank for the code, but....hum.... Been trying to get it to work, but can't figure it out...I know I'm doing something wrong but don't know what? <script type="text/javascript">var obj = document.getElementById('elementId');obj.onmouseover=function(){onMouseOver="writeText('Moulin')"}obj.onmouseout=function(){onMouseOver="writeText(' ')"}</script></head><body><a id="test" href="#">test</a> <p id="desc"></p></body> I've tried with and without the onmouseover between the {} but doesn't make a difference...
  3. I'm still in the process of learning Javascript, and want to learn it using the best practice. So it seems inline elements are not the way to go...I've been working on an image map, and all works, thanks to the help of some of you, but I'd like to get rid of the inline elements "onmouseover" and "onmouseout"... And have my code in an external sheet.Is it possible in this example? Would anyone be willing to show me how to create such a code?The code is a little long, so here is the linkhttp://www.medipsy.com/medecin/implantation.phpThanks in advance for any help or suggestions!
  4. put this in your cssimg {border: none;}
  5. ok, I used your code, and it works on my localhost, but not on the website The table is actually being called by include() and the content is on my sql database... Not sure if it's creating some sort of conflit, or if I'm still doing something wrong... Anyhow it's driving me nuts....Here is the complet code, and the link : http://www.medipsy.com/medecin/medecin.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>MEDIPSY</title><link rel="stylesheet" type="text/css" href="medipsy_m.css" /><link rel="stylesheet" type="text/css" href="dropdownmenu_medipsy.css" /><style type="text/css">#body {width: 930px;}#main {width: 730px;float: right;}#sidebar {width: 140px;float: left;display: block;}table {border-collapse: collapse;}tr:hover, .hilite {background-color: #34339B;color:#FFF;}td {padding: 0 0 0 5px;width: 180px;border: 1px solid #34339B;}.tdentete {font-weight:bold;font-size: 20px;color: #34339B;}.tdtelephone {width: 120px;text-align: center;padding: 0;}.tdtitre {width: 100px;text-align: center;padding: 0;}</style><script type="text/javascript"><!--function getElements(){var rows = document.getElementsByTagName("tr");for (var i = 0; i < rows.length; i++){ rows[i].onmouseover=function(){ this.className += "hilite"; } rows[i].onmouseout = function(){ this.className=this.className.replace("hilite" , ""); } }}//--></script><script language="JavaScript"><!--function SymError(){ return true;}window.onerror = SymError;var SymRealWinOpen = window.open;function SymWinOpen(url, name, attributes){ return (new Object());}window.open = SymWinOpen;//--></script><script type="text/javascript"><!--//--><![CDATA[//><!--sfHover = function() { var sfEls = document.getElementById("nav").getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } }}if (window.attachEvent) window.attachEvent("onload", sfHover);//--><!]]></script></head><body onload="getElements()"><?php include('entete.inc')?><div id="body"><div id="main"><table><tr><td><span class="tdentete">Medecin</span></td><td><span class="tdentete">Clinique</span></td><td class="tdtelephone"><span class="tdentete">Téléphone</span></td><td class="tdtitre"><span class="tdentete">Type</span></td><td class="tdtitre"><span class="tdentete">Pst CME</span></td></tr></table><?phpinclude ('select_medecin.inc')?></div><div id="sidebar"><h3>Afficher la liste par :</h3><form action="#" method="post">Docteurs<input type="radio" checked="checked" onclick="window.location.href='medecin.php?typetri=1'" /><br/>Cliniques<input type="radio" onclick="window.location.href='medecin.php?typetri=2'" /></form></div> <?phpinclude('pied2page.inc')?> </div></body></html><script language="JavaScript"><!--var SymRealOnLoad;var SymRealOnUnload;function SymOnUnload(){ window.open = SymWinOpen; if(SymRealOnUnload != null) SymRealOnUnload();}function SymOnLoad(){ if(SymRealOnLoad != null) SymRealOnLoad(); window.open = SymRealWinOpen; SymRealOnUnload = window.onunload; window.onunload = SymOnUnload;}SymRealOnLoad = window.onload;window.onload = SymOnLoad;//--></script>
  6. no... unfortunatly, still not working...
  7. huh...never mind thoes bottom lines....I figured out I didn't have to apply the class to my tr tag...But still, can't get it to work
  8. cause it's not working... <script type="text/javascript">var rows = document.getElementsbytagname("tr");for (var i=0; i <rows.length; i++) {rows[i].onmouseover=function() {this.className += " hilite";}rows[i].onmouseout=function() {this.className=this.className.replace("hilite" , "");}}</script> I'm trying to create a hover effect for IE6, in a table.When I apply the class .hilite to my tr tag, the row looks the way it should look when I hover over it... and when I do mouseover nothing happens...Any suggestions?Thanks
  9. That was easy to fix!!!Thanks, works great!
  10. didn't see your reply...Will try changing the order, thanks!
  11. Thanks for your response.I am calling an entire page...The whole thing works fine if I just call one page... say the form page. But as soon as I put the "include" in the if statements to call two different pages, it bugs... I don't know how to do it any other way...
  12. Hi all,I'm having problems displaying properly my pages once you hit the submit button on my form...Here is the code <form class="form" action="message_rep.php" method="post"> <p><label for="nom">Nom :</label><input type="text" name="nom" size="30" /></p> <p><label for="email">Email :</label><input type="text" name="email" size="30" /></p> <p><label for="objet">Objet :</label><input type="text" name="objet" size="30" /></p> <label for="message">Message :<br /><textarea rows="10" cols="40" name="message"></textarea> <p><input type="submit" value="Soumettre" class="input" /></p> </form> <?php$nom=$_POST['nom'];$email=$_POST['email'];$objet=$_POST['objet'];$message=$_POST['message'];$message_bis= "Vous avez oublié de remplir : " ;if (empty($nom)) : $message_bis= $message_bis . " Nom";endif;if (empty($email)) : $message_bis = $message_bis . " Email";endif;if (empty($objet)) : $message_bis= $message_bis . " Objet";endif;if (empty($message)) : $message_bis= $message_bis . " Message";endif;if (empty($nom) or empty($email) or empty($objet) or empty($message)) : echo "<script type='text/javascript'>\n"; echo "alert('$message_bis');\n"; echo "</script>";include('message.php');else : $envoyer_vers='patricia@medipsy.com'; $delapartde='from: patricia@medipsy.com'; $contenu_message = 'Nom : '.$nom."\n". 'Email : '.$email."\n". 'Message : '.$message."\n"; mail($envoyer_vers, $objet, $contenu_message, $delapartde); $message_bis= "Votre message a bien été envoyé. " ; echo "<script type='text/javascript'>\n"; echo "alert('$message_bis');\n"; echo "</script>";include('index.php');endif;?> Depending if you've filed the form correctly or not, you get redirected to a different page. If all fields are filed, you go back to the index, if not, back to the form page....In order to do that, I've put my include() in the if or else statement, but by consequence, when you hit submit, the popup window comes up with a blank page in the back, and for whatever reason, when you click ok, my content is no longer centered...I'd like my form page to stay up when the popup window comes up... And figure out why my content gets shifted to the left....Hope my explanations make sense?Any solutions?
  13. Great!!!!Thanks a lot for your time!
  14. Thanks Scott,but it doesn't work....here is the link:http://www.medipsy.com/medecin/implantation.php
  15. Hi all!Is it possible to apply different styles to text that is called by onmouseover in an images map?say I'd like the first one "Pen An Dalar" in blue, and the second one "Moulin" in red...How do I add the css??I've tried to add an <h1>, like they show in the tutorials.... but not workinghere is the code... <head><style type="text/css">#desc {font-family: Arial, Helvetica, sans-serif;font-size: 16px;font-weight: bold;color: #34339B;}</style><script type="text/javascript">function writeText(txt){document.getElementById("desc").innerHTML=txt}</script></head><body><div id="main"><img src="images/carte-medipsy.gif" alt="Emplacement des Etablissements MEDIPSY" border="0" usemap="#Map" title="Emplacement des Etablissements MEDIPSY" /><map name="Map" id="Map"> <area shape="rect" coords="5,132,26,153" href="#" alt="Pen An Dalar" onMouseOver="writeText('Pen An Dalar\n Directeur:\n Jean LE MARTRET\n147, rue de Paris\n29490 GUIPAVAS\nTel: 02 98 84 76 25\n Fax: 02 98 84 88 92')" onmouseout="writeText(' ')" /> <area shape="rect" coords="97,161,116,176" href="#" alt="Moulin" onMouseOver="writeText('Moulin\n Directrice:\nJoelle MODE\nCarcé BP 7138\n35171 BRUZ Cedex\nTel: 02 99 05 05 05\n Fax: 02 99 05 05 99')" onmouseout="writeText(' ')" /> <p id="desc"></p></div></body></html>
  16. Is this what you want? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><html><head><style type="text/css"><!--#outerbox{width:500px;height:200px;border-style:solid;border-width:1px;}#leftbox{width:100px;height:100px;border-style:solid;border-width:1px;float: left;margin: 98px 0 0 0;}.rightbox{width:100px;height:50px;border-style:solid;border-width:1px;float:right;margin: 148px 0 0 0;}--></style></head><body><div id="outerbox"><div id="leftbox"></div><div class="rightbox"></div><div class="rightbox"></div></div></body></html> All I did was add a margin to your divs, and by the way you can't use an id twice in the same document, so I replaced your id rightbox by a class...Hope it helps, otherwhyse, you may want to check this tutorial:http://css.maxdesign.com.au/floatutorial/index.htm
  17. If you want to use the float property to do that, I would suggest creating an other div that would push your images to the bottom of your main box by using the height property.Make sens?<div id="main"> (your wrapper)<div></div> (the one with the height)<div id="a"></div><div id="b"></div><div id="c"></div></div>But you can also use the absolute positionning to do that! Depends what you're trying to do...Did that help?
  18. Hi,Your background color is not showing in IE because you used "min-height", and IE doesn't support that. So your wrapper does not have any height. You need to replace it with a height size (which will be a pain)or "height: auto;"In that case you need to review your layout.Your header does not have to be absolute, leave it in relative (and by the way, relative position is the default one, so you don't need to specify it in your css, same for height: auto... saves lines in your css and makes it lighter).For your content, instead of absolute, float it left, same for your navigation...And in your footer, use "clear: both"That should solve your problems in IE, and not cause any new ones in FFHope that helps!If still nor working, shoot the questions; and by the way, I can't view your code on your website... Weird?
  19. You may want to check this website.... tutorial 8http://css.maxdesign.com.au/floatutorial/index.htmHope that helps
  20. if you want to create a dropdown menu, you may want to check out this website :http://www.htmldog.com/articles/suckerfish/dropdowns/best dropdown menus I know of. (expect you need to use some javascript for IE...)Works great!
  21. Not sure what you're trying to do...But if you want to create a 2 columb layout page, here is an easy way to do it: <style type="text/css">.container {width: 800px; padding:10px; border:1px solid black; }.sub1 { width:100px; height:200px; border:1px solid lime; float: left; }.sub2 { width: 690px; border:1px solid purple; float: right; }#footer {clear: both;}</style></head><body><div class="container"><div class="sub1"> <h1>sub1</h1></div><div class="sub2"> <h1>sub2</h1></div><div id="footer"></div></div></body> You should asign a width to your main container (you may run into problems with IE if you don't), and I added a width to your sub2, and I used float: right instead of left...And added that third div that I mentioned earlier to maintain your container's height.Sorry if that's not what you want to do...
  22. oh and if your trying to put those 2 divs one next to an other.... you need to creat a 3 div and give it the property "clear: both" to maintain the height of your div container....Hope that helps
  23. Add the property Clear: both;to your .sub2that should solve your problem...
  24. Hi,For starters, you need to use the form tag : <form> Login:<input type="text" name="login" size="15" id="formTxt" /> </form>Don't use the <br /> to send your box down... just reduce the size of your #loginContainer : width: 80px;that will send your box to the line...Does that solve your problem?A good way to create a form is to use a list... <form><ul><li>Login:<input type="text" name="login" size="15" id="formTxt" /></li><li>Password: <input type="password" name="password" size="10" /></li><li><input type="submit" value="Submit" /></li> </ul></form> And then set the properties for your list with css...
  25. Thanks for the info!Should have known to look in the W3 tutorials!
×
×
  • Create New...