Jump to content

FishSword

Members
  • Posts

    80
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

FishSword's Achievements

Member

Member (2/5)

0

Reputation

  1. I have the following menu that changes to red if each of the menu items are hovered over. This menu shows on every page of my website. I have the following problem: If a user was to click a menu item (e.g. Menu 2), the page will navigation to the page set in the a tag (i.e page2.html) If the user was to leave there mouse in the same position as it was in before the menu item was clicked (i.e. over the selected menu item), then the menu would automatically change to red again on the new page, as the jQuery hover code below will be activated. Is there a way to stop this behaviour? Ideally I want users to have to mouse off of the menu item and then on it again before the menu item changes to red if the users mouse is still over the selected menu item after clicking one of the menu links. <script type="text/javascript"> $(document).ready(function() { $('li').hover(function() { $(this).css('background', 'red'); }, function() { $(this).css('background', 'none'); }) }) </script> <ul> <li><a href="page1.html">Menu 1</a></li> <li><a href="page2.html">Menu 2</a></li> <li><a href="page3.html">Menu 3</a></li> </ul>
  2. I can convert PSD, JPG plans/mockups etc into valid HTML for a very resonable price. Get in touch for a quote. Contact: PM MSN - fishsword@live.com eMail - fishsword@live.com Skype - fishsword.skype Save Money Per Hour: I Charge Per Project FishSword "Have you been hooked yet?"
  3. These isn't any. The attached file is to demonstrate what I'm trying to do. All the code I have so far has been posted in this thread.
  4. Hi vpros, I have sent you a PM. With the same title as this thread! Cheers, FishSword
  5. I am still stuck with this. I have attach a .zip file containing what I am trying to achieve. Example.zip
  6. Thanks for your response, it's much appreciated. My aim is to create a vertical page menu using <ul>'s. Upon a user clicking a parent menu item, they will taken to a different page where the content of the selected page will be displayed. Any child pages will be displayed as <li>'s of a child <ul> in the menu, underneath the relevent paten in the menu. Child pages need to be visible only when the parent page, or child pages belonging to the parent have been selected. I'm guessing I will need to check if the user is in a parent or child page of the parent, in order to show any relevent child pages?
  7. I have a problem with my code. What is the best way to display all sub pages for a parent page regardless of whether or not you are viewing the parent or child pages? If a different parent is chosen, then the child pages of the previously selected parent should be hidden. All pages have a id vairable in the URL that is available using $_GET['id']. My MYSQL DB looks like this. CREATE TABLE IF NOT EXISTS `pages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `parent` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=8; With the code I have currently, the child pages display if you are on the parent page, but as soon as you jump to any of the child pages, the child pages disappear. $gParents = mysql_query('SELECT * FROM db.pages WHERE parent = 0'); while($parents = mysql_fetch_assoc($gParents)) { echo '<a href="?id='.$parents['id'].'">'.$parents['title'].'</a><br />'; $qChilds = mysql_query('SELECT * FROM db.pages WHERE parent = '.$parents['id'].' AND parent = '.$_GET['id']); while($childs = mysql_fetch_assoc($qChilds)) { echo '<a href="?id='.$childs['id'].'">'.$childs['title'].'</a><br />'; } }
  8. Hi Folks, I'm in two minds whether or not to start using proper freelance websites. I have created a simple poll, in order to find out what you think of these websites, and would be extremely interested to hear what you have to say. Please be honest, and post your thoughts. Cheers [[ Due to technical constraints, this thread's poll has been edited to have only one question. Current vote counts: Do you use a freelance website?Yes: 1 No: 2 What annoys you most about these websites?High Fees: 1 Not many suitable jobs: 1 Other (Reply in thread): 1 What feature on these sites would you introduce/improve and how if you had a chance?Better Support: 0 Lower Fees: 2 Other (Reply in thread): 1 --requinix ]]
  9. I have no choice. The databases have already been created.
  10. I have 10 MySQL databases that feature the same table structures/names in each. The table I am partically interested in is the Users I need a way to display/paginate the results from each of the Users tables, and sort the data by category_colour The table fields are: id: INT(11) name: varchar(255) - e.g. Dave, Lisa, Steve category_colour: char(1) - Can be G = Green, O = Orange, B = Blue, O = Orange. If I was to do this without paginate, there would be too many results, and the server would take an age to display them all. I need the results to be categorized and in order of category_colour (1st: Red, 2nd: Green, 3rd: Blue, 4th: Orange) - Displaying the users database id OUTPUT EXAMPLE: Category Colour: Red Dave - 1 Steve - 5 Fred - 4 etc Category Colour: Green Richard - 6 Kelly - 8 etc. Category Colour: Blue Emma - 3 Scott - 2 Louise - 7 etc.
  11. Thanks for this. Would it be possible to post an example on how I would replace the contents of the tags shown in my first post?
  12. Hello there, Using PHP, what's the best way of replacing the contents between different HTML 5 element tags on the fly? Some of the elements I'm looking to change can be found below. I have looked into the possibility of using Regular Expressions, but have found lots of material on the internet that try to prevent you from using such a method for parsing HTML due to speed and other HTML code related issues. Any help, example code, and ideas on this is greatly appreciated. <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Some Title</title> </head> <body> <div>Replace contents of div tag.</div> <p class="someClass">Replace contents of p tag.</p> <table> <tr> <th>Static Table Heading 1</th> <th>Static Table Heading 2</th> <th>Static Table Heading 3</th> </tr> <tr> <td>Replace Table Data 1 Contents</td> <td>Replace Table Data 2 Contents</td> <td>Replace Table Data 3 Contents</td> </tr> <tr> <td>Replace Table Data 4 Contents</td> <td>Replace Table Data 5 Contents</td> <td>Replace Table Data 6 Contents</td> </tr> </table> </body> </html>
  13. This information is in it's own table. This table only contains information about the sessions, not user information such as username, and password etc. When I say one table I mean can the total number of users online in the last 15 minutes and today be calculated from the same table, rather than duplicating information? I need to know the total users, total logged in and total guests for both. I'm a little stuck with the guests, as what happens if the users logs out?
  14. I need to know the total users, for both the last 15 minutes, and today, Isn't it best to keep this information in just one table if possible, else aren't you duplicating information?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.