Jump to content

BigAl75

Members
  • Posts

    94
  • Joined

  • Last visited

Everything posted by BigAl75

  1. I'm trying to create a hover menu in javascript for the website of the company I work for. I have a working version written strictly in CSS, but our reports show almost 70% of our visitors are still using IE 6.0 which doesn't support the navigation menu we have in CSS. We are redirecting them to a sub-directory, and need the javascript menu so that they can navigate the site. I almost have it completely working, but there is one section (products) that has three levels. This section isn't working properly. I was wondering if someone could take a look at it and let me know what I'm doing wrong with it.Here's the javascript code: <script type="text/javascript"><!--window.onload=montre;function montre(id) {var d = document.getElementById(id); for (var i = 1; i<=10; i++) { if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';} }if (d) {d.style.display='block';}}//--></script> The CSS: dl, dt, dd, ul, ol, li { margin: 0; padding: 0; list-style-type: none;}#menu { position: relative; width: 135px;}#menu dl { float: left; width: 135px; position: static; font: 12px/20px Arial, Helvetica, sans-serif; text-align: left; list-style-type: none;}#menu dt { text-align: left; background: #0033CC; border: 1px solid black; list-style-type: none; text-indent: 3px;}#menu dt a { width: 133px; font: 12px/20px Arial, Helvetica, sans-serif; color: white; text-decoration: none; list-style-type: none;}#menu dt a:hover { background: #99CCFF; color: black; text-decoration: none; display: block; list-style-type: none;}menu dd { border: 1px solid black; list-style-type: none; text-align: left; font: 12px/20px Arial, Helvetica, sans-serif; padding: 0px 0px 0px 3px;}#menu ul { position: absolute; left: 125px; width: 135px; margin-top: -22px;}#menu ol { position: absolute; left: 125px; height: -22px; width: 135px; padding: 0px; margin: 0px; display: block;}#menu li { background: #0033CC; width: 130px; border: 1px solid #000; list-style-type: none; margin: 0px; text-align: left; font: 12px/20px Arial, Helvetica, sans-serif; text-indent: 3px;}#menu li a { width: 130px; font: 12px/20px Arial, Helvetica, sans-serif; color: white; text-decoration: none; text-align: left; list-style-type: none; text-indent: 3px;}#menu li a:hover { background: #99CCFF; color: black; text-decoration: none; display: block; list-style-type: none; width: 130px; padding: 0px;} And the html: <dl id="menu"> <dt onmouseover="java script:montre('smenu1');"><a href="index.html">Home</a></dt> <dd id="smenu1" onmouseover="java script:montre('smenu1');" onmouseout="java script:montre();"> <ul> <li><a href="index.html">Porous Materials, Inc. Home</a></li> <li><a href="http://www.app.bz">Applied Pressure Products Home</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu2');" onmouseout="java script:montre();"><a href="company/index.html">About Us</a></dt> <dd id="smenu2" onmouseover="java script:montre('smenu2');" onmouseout="java script:montre();"> <ul> <li><a href="company/index.html">About PMI</a></li> <li><a href="employment/index.html">Employment</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu3');" onmouseout="java script:montre();"><a href="products/index.html">Products</a></dt> <dd id="smenu3" onmouseover="java script:montre('smenu3');"> <ul> <li onmouseover="java script:montre('smenu4');" onmouseout="java script:montre('smenu4');"><a href="products/index.html">PMI Products</a></li> <ol id="smenu4"> <li><a href="products/porometers.html">Porometers</a></li> <li><a href="products/permeameters.html">Permeameters</a></li> <li><a href="products/porosimeters.html">Porosimeters</a></li> <li><a href="products/bet_sorptometers.html">BET/Sorptometers</a></li> <li><a href="products/pycnometers.html">Pycnometers</a></li> </ol> <li><a href="products/pore_size.html">Pore Size</a></li> <li><a href="products/pore_volume.html">Pore Volume</a></li> <li><a href="products/permeability.html">Permeability</a></li> <li><a href="products/density.html">Density</a></li> <li><a href="products/surface_area.html">Surface Area</a></li> <li><a href="products/adsorption.html">Adsorption</a></li> </ul> </dd> <dt onmouseover="java script:montre('smenu5');" onmouseout="java script:montre();"><a href="testing/index.html">Testing Services</a></dt> <dd id="smenu5" onmouseover="java script:montre('smenu5');" onmouseout="java script:montre();"> <ul> <li><a href="testing/index.html">PMI Testing Services</a></li> <li><a href="testing/docs/testing_price_list_4_12_05.pdf" target="_blank">Testing Price List</a></li> <li><a href="testing/docs/testing_request_form_4_12_05.pdf" target="_blank">Testing Request Form</a></li> </ul> </dd></dl> Thanks for the help.
  2. The layout I had wasn't showing up correctly in any browser. I decided to not have a definitive width and just chane the body margins instead. Thanks for the help anyway.
  3. There's supposed to be a fly-out menu that you won't see in IE 6.0 because it doesn't handle the CSS hover like IE 7.0, FF and Opera do.
  4. From her shout box: Oh, I don't know, write better code, perhaps?I've used a lot of online editors in my day, from Homestead to Google and others, as well as FrontPage. One thing I always did was make it at least aesthetically pleasing. This site is horrible from the time you open it. My only hope (slim that it may be) is that it's some stay-at-home mom who's doing this for her friends. I can't believe this is someone who actually thinks they're doing something good.
  5. OK, I think I get what jlhaslip is talking about with he 'id' thing, but as far as getting the LVAH in order, I guess it's just not clicking right now (half asleep).CSS: #navmenu { width: 135px; position: static; font: 12px Arial, Helvetica, sans-serif; margin: 0px 0px 0px 0px;}#navmenu a { width: 135px; height: auto; padding-left: 2px; border: 1px solid #000; background: #003366; line-height: 20px; font-size: 12px; color: White;}#navmenu ul { padding: 0px; margin: 0px;}#navmenu ul li { list-style-type: none;}#navmenu ul li a:visited { display: block; text-decoration: none; color: #EEEEEE;}#navmenu ul li a { display: block; text-decoration: none; color: #FFFFFF;}#navmenu ul li a:hover { background: Yellow; color: Black;}#navmenu li ul { display: none;} #navmenu li:hover > ul#a3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#b3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#c3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#d3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#e3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#f3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#g3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#a3a { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#a3b { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;} HTML: <div id="navmenu"> <div class="navhead">Navigation</div> <ul> <!-- Home Navigation --> <li><a href="index.html">Home</a></li> <!-- End Home Nav --> <!-- Begin About Us Nav --> <li><a href="#nogo">About Us</a> <ul id="a3"> <li><a href="about/index.html">About the Website</a></li> <li><a href="about/staff.html">About the Staff</a></li> </ul> </li> <!-- End About US Nav --> <!-- Begin Interact Nav --> <li><a href="#nogo">Interact With Us</a> <ul id="b3"> <li><a href="forums/">Forums</a></li> <li><a href="gallery/">Photo Gallery</a></li> </ul> </li> <!-- End Interact Nav --> <!-- Begin Attractions Nav --> <li><a href="attractions/index.html">Local Attractions</a> <ul id="c3"> <li><a href="attractions/automotive.html">Automotive</a></li> <li><a href="attractions/theater.html">Theater & Plays</a></li> <li><a href="attractions/food_beverage.html">Food & Beverages</a></li> </ul> </li> <!-- End Attractions Nav --> <!-- Begin Events Nav --> <li><a href="events/index.html">Events</a> <ul id="d3"> <li><a href="events/fund_raisers.html">Fund Raisers</a></li> <li><a href="events/community/index.html">Community Events</a> <ul id="a3a"> <li><a href="events/community/mara_maple.html">Marathon Maple Festival</a></li> </ul> </li> <li><a href="events/sports.html">Sports</a> <ul id="a3b"> <li><a href="events/sports/baseball.html">Baseball</a></li> <li><a href="events/sports/hockey.html">Hockey</a></li> <li><a href="events/sports/golf.html">Golf</a></li> <li><a href="events/sports/other.html">Other Sports</a></li> </ul> </li> </ul> </li> <!-- End Events Nav --> <!-- Begin Concerts Nav --> <li><a href="#nogo">Concerts & Gatherings</a> <ul id="e3"> <li><a href="shows/concerts.html">Concerts</a></li> <li><a href="shows/gatherings.html">Gatherings & Get Togethers</a></li> </ul> </li> <!-- End Concerts Nav --> <!-- Begin Music Nav --> <li><a href="localmusic/index.html">Local Music</a> <ul id="f3"> <li><a href="music/events.html">Music Events</a></li> <li><a href="music/rock.html">Rock/Metal</a></li> <li><a href="music/country.html">Country</a></li> <li><a href="music/classic.html">Classic Rock</a></li> <li><a href="music/other.html">Other Genres</a></li> </ul> </li> <!-- End Music Nav --> <!-- Begin Contact Us Nav --> <li><a href="#nogo">Contact Us</a> <ul id="g3"> <li><a href="contact/index.html">Contact Us</a></li> <li><a href="contact/submit.html">Submit Stuff</a></li> </ul> </li> <!-- End Contact Us Nav --> </ul> </div>
  6. Yeah, that's why I'm here asking for help. Yeah, I know. I'm not unveiling the site until late this summer, so I have time to get something done up in javascript for IE 6.0 using IE conditional statements. Not sure if I'm going to try and have the js nav on the same page, or redirect it to a sub-directory.Thanks.
  7. I took the suggestion and looked at a couple of sites online to change from javascript navigation to CSS navigation. Now I'm running into a new problem, and was wondering if you could help. When you roll-over my nav, the menu that pop-ups out in the wrong location on some screen resolutions. What can I do to fix this?http://www.ny-outdoors.com/tester/index.htmlHere's the CSS: #navmenu { width: 135px; position: static; font: 12px Arial, Helvetica, sans-serif; margin: 0px 0px 0px 0px;}#navmenu a { width: 135px; height: auto; padding-left: 2px; border: 1px solid #000; background: #003366; line-height: 20px; font-size: 12px; color: White;}#navmenu ul { padding: 0px; margin: 0px;}#navmenu ul li { list-style-type: none;}#navmenu ul li a:visited { display: block; text-decoration: none; color: #EEEEEE;}#navmenu ul li a { display: block; text-decoration: none; color: #FFFFFF;}#navmenu ul li a:hover { background: Yellow; color: Black;}#navmenu li ul { display: none;} #navmenu li:hover > ul#a3 { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;}#navmenu li:hover > ul#a3b { display: block; position: absolute; margin-top: -22px; left: 135px; text-align: left;} Here's the html: <div id="navmenu"> <div class="navhead">Navigation</div> <ul> <!-- Home Navigation --> <li><a href="index.html">Home</a></li> <!-- End Home Nav --> <!-- Begin About Us Nav --> <li><a href="#nogo">About Us</a> <ul id="a3"> <li><a href="about/index.html">About the Website</a></li> <li><a href="about/staff.html">About the Staff</a></li> </ul> </li> <!-- End About US Nav --> <!-- Begin Interact Nav --> <li><a href="#nogo">Interact With Us</a> <ul id="a3"> <li><a href="forums/">Forums</a></li> <li><a href="gallery/">Photo Gallery</a></li> </ul> </li> <!-- End Interact Nav --> <!-- Begin Attractions Nav --> <li><a href="attractions/index.html">Local Attractions</a> <ul id="a3"> <li><a href="attractions/automotive.html">Automotive</a></li> <li><a href="attractions/theater.html">Theater & Plays</a></li> <li><a href="attractions/food_beverage.html">Food & Beverages</a></li> </ul> </li> <!-- End Attractions Nav --> <!-- Begin Events Nav --> <li><a href="events/index.html">Events</a> <ul id="a3"> <li><a href="events/fund_raisers.html">Fund Raisers</a></li> <li><a href="events/community/index.html">Community Events</a> <ul id="a3b"> <li><a href="events/community/mara_maple.html">Marathon Maple Festival</a></li> </ul> </li> <li><a href="events/sports.html">Sports</a> <ul id="a3b"> <li><a href="events/sports/baseball.html">Baseball</a></li> <li><a href="events/sports/hockey.html">Hockey</a></li> <li><a href="events/sports/golf.html">Golf</a></li> <li><a href="events/sports/other.html">Other Sports</a></li> </ul> </li> </ul> </li> <!-- End Events Nav --> <!-- Begin Concerts Nav --> <li><a href="#nogo">Concerts & Gatherings</a> <ul id="a3"> <li><a href="shows/concerts.html">Concerts</a></li> <li><a href="shows/gatherings.html">Gatherings & Get Togethers</a></li> </ul> </li> <!-- End Concerts Nav --> <!-- Begin Music Nav --> <li><a href="localmusic/index.html">Local Music</a> <ul id="a3"> <li><a href="music/events.html">Music Events</a></li> <li><a href="music/rock.html">Rock/Metal</a></li> <li><a href="music/country.html">Country</a></li> <li><a href="music/classic.html">Classic Rock</a></li> <li><a href="music/other.html">Other Genres</a></li> </ul> </li> <!-- End Music Nav --> <!-- Begin Contact Us Nav --> <li><a href="#nogo">Contact Us</a> <ul id="a3"> <li><a href="contact/index.html">Contact Us</a></li> <li><a href="contact/submit.html">Submit Stuff</a></li> </ul> </li> <!-- End Contact Us Nav --> </ul> </div>
  8. Do you have a link or some code for us to look at?Look at the source for this:img bg for div
  9. Thanks for the help guys. I hope I can get this figured out. While I have yet to sit down and work strictly on it yet, I have messed around with it a little here and there. So far, no luck. I'll be back once I can sit down and concentrate on it if/when I run into problems.
  10. Yeah, I've been playing with that all weekend. Of course, I find it after I made my post. I'll keep messing with it, and if I run into any problems, I'll be back. Thanks.
  11. I just started working for this company, and one of my jobs is going through their website and updating it. Once it is updated, they want the entire thing re-written, and myself and the rest of the IT dept. want to get rid of as much javascript as we can, and use CSS. The biggest obstacle for me is going to be the navigation. Take this page for example:http://pmiapp.com/products/index.htmlThe main site navigation is on the left, and the main products navigation is on the top. The main nav has fly-out menus, while the top is a drop down type of menu. All of my experience with CSS in the past has been just basic formatting; background colors, widths, fonts, etc. I really haven't done a whole lot with it, as my clients haven't needed it. (I still use tables for site layouts because I haven't had the time to learn more on CSS.)If anyone can point me in the right direction where I can figure out how to do these menus, I'd appreciate it.Al
  12. I found something on the main website. Kind of works, but I can''t get the CSS formattting to work now. Oh well, better than where I was.
  13. I'm working on a project for work and need some help. We currently have a (junk) javascript hover menu for our products page. Here's the problem: it works fine in IE6 and later, but doesn't work at all in IE 7.0. All we want to do right now is get it working in IE 7.0 using javascript because we know JS works in the older versions of IE. Eventually, we want to re-do the entire site using CSS, XML, etc., but right now, we need the navigation menu to work in IE 7.0.Basically, the menu is 5 sections, and each section should have a vertical menu that shows up when that section is hovered over, which will contain links to the different products for that type of product.Thanks for the help.Al
  14. BigAl75

    Perl?

    Anyone know where I can get help with Perl programming? I've found stuff online, but I guess I'm doing something wrong, as when I upload the code to my server, I keep getting 500 errors when I open the file in my browser.Al
  15. Awesome! Thank you very much. You've all been a great help to me on this, and I can't say enough how much I appreciate it.Al
  16. OK, this is what I have on the "post" page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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></head><body><?phpif(isset($_POST['add'])) { include 'library/config.php'; include 'library/opendb.php'; $username = $_POST['username']; $post = $_POST['post']; $result = mysql_query("SELECT username FROM houndusers") or die(mysql_error()); if(!$username) { $query = "INSERT INTO houndusers (username) VALUES ('$username')"; } $query1 = "INSERT INTO houndposts (post) VALUES ('$post')"; mysql_query($query1) or die('Error, insert query failed'); include 'library/closedb.php'; echo "New Post Added"; }else{?><form method="post" enctype="multipart/form-data"> <table align="center" cellspacing="15"> <tr> <td align="left" valign="top">Username: <input name="username" type="text" id="username"></td> </tr> <tr valign="top"> <td align="left">Post:<br /> <br /> <textarea name="post" type="textarea" cols="75" rows="10" id="post"></textarea></td> </tr> <tr align="center"> <td valign="top"> <input name="add" type="submit" id="add" value="Add New Post"> <input name="Reset" type="reset" value="Reset"> </td> </tr> </table></form><?php}?></body></html> And this is what I have on my "display" page: <?phpinclude 'library/config.php';include 'library/opendb.php';/*$query = "SELECT userid, post FROM houndposts";*/$query = "SELECT houndusers.username, houndpost.post FROM houndusers, houndposts WHERE houndusers.userid = houndposts.userid";/*$query2 = "SELECT userid, username FROM houndusers INNER JOIN houndposts WHERE houndusers.userid = houndposts.userid";SELECT Employees.Name, Orders.ProductFROM Employees, OrdersWHERE Employees.Employee_ID=Orders.Employee_ID*/$result = mysql_query($query);while(list($username,$post)= mysql_fetch_row($result)){?> <table> <thead> <tr> <th> Posted by :<br /><br /><? echo "$username "; ?> </th> </tr> </thead> <tr> <td> <? echo "$post"; ?> </td> </tr></table><?}include 'library/closedb.php';?> The only problem I'm having now is that it's not adding the user name to the 'houndusers' database. Because of this, I don't know if '$query2' is working or not.One other small thing, how would I get the posts to show descending? I know it's DESC, but not sure where to put that.Thanks for the help.Al
  17. Didn't plan on using asp. Don't care for it as a programming language. Would rather use xhtml before I used that. I'll probably use php.Thanks for the help. I really appreciate it.Al
  18. boen, is there any way you can go into a little more detail with your explanation? I want to use xml and xsl to display the data from my MySQL db on the PHP problem I have posted in the PHP forum. I'm in the process of learning xml, and am learning PHP on my own. We haven't gotten to database integration in the xml class yet.Thanks for the help.Al
  19. if(isset($_POST['add'])) { include 'library/config.php'; include 'library/opendb.php'; $username = $_POST['username']; $post = $_POST['post']; $query = "INSERT INTO houndposts (username, post) VALUES ('$username', '$post')"; mysql_query($query) or die('Error, insert query failed'); include 'library/closedb.php'; echo "New Post Added"; } This is what I have so far. After I got this to work, I realized that if the user has the same name when trying to make another post, it creates an error. What I want it to do is to check the username against the names listed in the new table houndusers (which I created after this). If it's all ready there, get the userid from that table, then add the userid and the post to the houndposts table.I think it should go something like this, but I can't get the coding correct: if (username all ready exists){get userid from table houndusers}else{add username and get new userid}$query = "INSERT INTO houndposts (userid, post) VALUES ('$userid', '$post')";mysql_query($query) or die('Error, insert query failed'); include 'library/closedb.php'; echo "New Post Added"; } It's the first part of this new code I'm having trouble with.I apologize if my questions aren't very clear. I've always had trouble forming my questions correctly, and normally do get "I'm not sure what you're asking" as my responses. I do try to ask better questions, but have difficulty in forming them correctly. Thanks for your patience and your help.Al
  20. What I posted is just explaining what I want to do. It wasn't supposed to be the actual code, which is what I'm trying to figure out how to write.I've got an idea of what the code is suposed to look like, but I can't get it from my head to the keyboard.Al
  21. Can someone help me with the coding for this? I can't figure out the correct way to code the follow:open table siteusersif (username = exists){get userid}else{add username (userid is set to auto increment)}I am trying to create a way for a user to easily add updates to his website. I figured using php & mysql would be about the easiest. The problem is, when ever you add the username to a new post, and try to add the post to the db, you get the error message because the username all ready exists.
  22. BigAl75

    New to asp.net

    Oh. Thanks for the help. As I said, I'm new to this. In fact, this is the first ASP.net code I've ever written.Al
  23. BigAl75

    New to asp.net

    Was wondering if someone could look at this and tell me what it is I did wrong. It's supposed to ask for a name (required), CC number (required) expiration date (required, set format). It doesn't like the line:"sub submit(sender As Object, e As EventArgs)" (line 6)and I don't know why.Thanks for the help.Al <%@ Page Language="JScript" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <script runat="server"> sub submit(sender As Object, e As EventArgs) if Page.IsValid then lbl.Text="Thank you!" else lbl.Text="Error!" end if end sub </script><html><body><h2>Enter Your Credit Card Information</h2> <form runat="server"> Cardholder: <asp:TextBox id="name" runat="server" /> <br /><br /> <asp:RequiredFieldValidator ControlToValidate="name" Text="The Cardholder field is required!" runat="server" /> Card number: <asp:TextBox id="txtbox1" runat="server" /> <br /><br /> <asp:Label id="lbl" runat="server" /> <br /> <asp:RegularExpressionValidator ControlToValidate="txtbox1" ValidationExpression="^\d+$" EnableClientScript="false" ErrorMessage="The card number must be 16 numeric digits, with NO spaces or dashes." runat="server" /> Expiration (MM/YY): <asp:TextBox id="txtbox2" runat="server" /> <br /><br /> <asp:Label id="lb2" runat="server" /> <br /> <asp:RegularExpressionValidator ControlToValidate="txtbox2" ValidationExpression="\d{2}/\d{2}" EnableClientScript="false" ErrorMessage="The date format should be in MM/YY format." runat="server" /> Payment type: <asp:DropDownList id="drop1" runat="server"> <asp:ListItem>Visa</asp:ListItem> <asp:ListItem>Master Card</asp:ListItem> <asp:ListItem>American Express</asp:ListItem> <asp:ListItem>Discover</asp:ListItem> </asp:DropDownList> <asp:Button Text="Submit" OnClick="submit" runat="server"/> <br /><br /> <asp:ValidationSummary HeaderText="You must enter a value in the following fields:" DisplayMode="BulletList" EnableClientScript="true" runat="server"/> <br /><br /> <asp:Button runat="server" Text="Submit" /> </form></body></html>
×
×
  • Create New...