Jump to content

Coyote

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Coyote

  • Rank
    Newbie

Contact Methods

  • Website URL
    http://www.coyotewebdesign.co.uk/

Profile Information

  • Location
    Norfolk, UK
  1. This is off the top of my head, since I'm not going to create a mySQL table just to test this out, but something along the lines of this should be what you're looking for: <html><head> <script type="text/javascript"> function hidefield(){ document.getElementById('div1').style.display='none'; document.getElementById('div2').style.display='none'; } function showfield(name){ if (name=='vendor1'){ document.getElementById('div1').style.display='block'; }else{ document.getElementById('div1').style.display='none'; } if (name=='vendor2'){ document.getElementById('div2').style.display='block'; }else{ document.getElementById('div2').style.display='none'; } } </script></head> <body onload="hidefield()"> <table><tr> <td> <select name="vendor" onchange="showfield(this.options[this.selected].value)"> <?php$result1=mysql_query("SELECT * FROM vendor");while ($row1=mysql_fetch_array($result1)){ $value = $row1["vendorname"]; $text = $row1["vendorname"]; echo " <option value='$value'>$text</option>\n";}?> </select> </td> <td> <?php$total = 13; // <-- change the number to however many entries are in column A// then use a "for..." loop to create the divsfor ($i=1; $i<=$total; $i++) { $divID = "div" . $i; $vendor = "vendor" . $i; echo " <div id='$divID'>\n"; echo " <select name='product'>\n"; $result2=mysql_query("SELECT * FROM product WHERE vendor='$vendor'") while ($row2=mysql_fetch_array($result2)) { $text = $row2["productname"]; echo " <option value='$text'>$text</option>\n"; } echo " </select>\n"; echo " </div>\n\n";}?> </td> </tr></table></body></html>
  2. The 'title' attribute is definitely the easiest way to achieve what you're after. It will trigger the basic 'tooltip' behaviour of the browser. example: Name: <input type="text" title="First Name"> Of course there are several ways to make that prettier, using javascript, but this works prefectly adequately.
  3. Coyote

    Chrome white screen bug

    Very nice :)Where's your html/css code? Maybe someone can then help you out.
  4. While I largely agree with the sentiments of the others who've replied, above, I'm feeling uncharacteristically generous atm. I believe this is what you're after. In your code (above), put a space then a letter "a" (for "anchor") after the ".style3" declaration like thus: .style3 a{color: #FFFFFF;font-size: large;}
  5. How are you triggering the effect currently? That portion of the html would makes things a little bit clearer :)If I understand you correctly, you'd want something along the lines of <div id="fadingtext" onmouseover="your-animation-script">
  6. Coyote

    CSS: 2 columns

    Well, for a start you've left out the <ul> opening and closing tags in your html, so none of your <li>s will match up with your css rules. Is there a reason for you to have <p> tags inside <li> tags?
  7. Coyote

    CSS: 2 columns

    What do you mean, exactly? When I run that code, it shows two columns side by side with a 90px margin in between.What's the css styling for "panel_02"?
×
×
  • Create New...