Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Without seeing all the code, I can't know for sure what the validator is complaining about. <noframes> is obsolete.
  2. I think a good idea might be to float the inputs to the left and give them a percentage width. If you make them 12.5% wide, 8 of them will show at a time. If there are more than eight, you use Javascript to hide all the remaining ones. Clicking on an arrow button should add or subtract 8 from a number used to indicate which if the first element to display, then it would hide all the elements and only show eight of them starting from the current index. I don't know how experienced you are with Javascript, if you're new to it, you probably should do some more learning before trying something like this. It involves an understanding of arrays, the DOM and changing CSS styles with Javascript.
  3. You can't do that in just HTML. The script that processes the form, which may be PHP, Javascript, or some other server-side language, has to deal with that.
  4. What that line is doing is telling PDO to throw an exception if a MySQL error occurrs. This would mean you can catch MySQL errors using a try-catch block. For example: try { // .. Some PDO database operations} catch(PDOException $e) { echo 'MySQL error: ' . $e->getMessage();} PDO's setAttribute() method just sets some of PDO's configuration.
  5. Ingolme

    Sort Table

    Is there a problem with using that jQuery plug-in? You just need to be sure your table is structured properly with a <thead> and <tbody> Your code should be like this: <table> <thead> <tr><th>Shop name</th><th>Type shop</th><th>location </th></tr> </thead> <tbody> <tr><td>The Common Defense</td><td>Armor Shop</td><td>New Sorpigal</td></tr> <tr><td>The Eagle's Eye</td><td>Weapon Shop</td><td>Castle Ironfist</td></tr> <tr><td>Smoke and Mirrors</td><td>Alchemist Shop</td><td>Mire of Damned</td></tr> </tbody></table> Then you can follow the instructions they give with the plug-in
  6. You should post just the specific CSS classes that are targeting the element you want to style. The CSS also doesn't help diagnose the problem if we don't have an HTML conteht to work with. Show us the portion of HTML code that is relevant to this problem. Put your code in code blocks for easier readability. Use the [<>] button in the post editor to make a code block.
  7. Well, you start off with that CSS, then use Javascript to deal with the overflow and add the paging buttons.
  8. A sibling doesn't necessarily need to be an element node, it can be a text node or any other type. What I'd do is check whether the nodeType of the last child is 3 (text node, see a list of node types), if so, then remove the child node.
  9. You can certainly force all elements in a list to be horizontal, but you'll need Javascript to slide the list or divide it into pages. Given a structure like this: <ul class="horizontal"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li></ul> You can force all the items to be horizontal to each other like this: .horizontal { margin: 0; padding: 0; list-style-type: none; white-space: nowrap;}.horizontal li { display: inline-block;} Setting the overflow property of .horizontal you can decide whether you want to hide elements that get outside the page, show them, or put a horizontal scrollbar.
  10. You're using a real browser to read this forum right now. Firefox, Internet Explorer and Google Chrome are all browsers. Here are download links for many different browsers, they're compatible as far back as Windows XP, except Internet Explorer. https://www.firefox.com/ http://www.google.com/chrome/ http://windows.microsoft.com/en-ca/internet-explorer/download-ie To test a page, open it in any browser. Dreamweaver's preview function is not very accurate so you need to open your website in an actual browser to be sure it's working as intended. At the moment, <audio> is the best way to embed music on your page. You can read about how to use it here: http://www.w3schools.com/tags/tag_audio.asp
  11. Don't use Dreamweaver's design view, just write all your code in code view and test in a real browser.
  12. Edit: This is a Javascript-related post. If you're using PHP to output HTML, don't worry about the DOM, just print out the HTML. If you're reading an XML document, use PHP's DOMDocument object. Do you mean getAttribute()? In the HTML DOM, most elements have properties that are associated with the attribute. For example, an <a> element with an href attribute will have an href property. But the attribute and the property are not the same thing, the property is what actually does the work, while the attribute is just part of the DOM structure. For example, if your HTML is like this: <a id="home-link" href="/index.html">Home</a> Then this is what the following code would be like: alert( document.getElementById("home-link").href ); // Shows "http://www.example.com/index.html"alert( document.getElementById("home-link").getAttribute("href")); // Shows "/index.html" In most cases, changing the attribute won't actually change the functionality of the element, you need to change the property to make it behave differently. If you're working with XML DOM, none of the elements have properties, only attributes, so you must use getAttribute() and setAttribute() to work with them. I think this also holds true for XML-based technologies, such as SVG.
  13. It looks like this is the line that sets the user ID: $_SESSION['userid'] = $userid;
  14. That depends on how you created your user login system.
  15. Select "verifypend" from the table where the user ID is the same as the user that's currently logged in. If verifypend is 1, then redirect.
  16. New browsers don't support plug-ins. As a result, if you want to embed music on your page, you need to use the <audio> tag (HTML 5), or get a Flash-based music player.
  17. If you want the form to submit to the same page you can omit the action attribute altogether.
  18. You're not creating an element <div> with classname "box", what you're doing is creating an element <div.box>. If you want to add a class name to an element, change its className property: var newDiv = document.createElement("div");newDiv.className = "box";
  19. getElementsByClassName() returns a node list, not an HTML element. A node list is like an array. Use square brackets to access an element in the node list. You wouldn't use document.wrappers to access the wrappers variable, just use wrappers on its own since it's a variable referencing the node list.
  20. It only takes about a week to transfer your domain from one provider to another and you can set the DNS to point to your new nameservers immediately right before the transfer so everything works seamlessly.
  21. Some advertisers used to make an ad window pop up and then hid it behind the main window. It was called "pop under" and browsers probably changed to prevent that from happening.
  22. Do you understand what the problem was and how the solution works?
  23. Perhaps there's another element that has a fixed width that is a parent of the div. How do you know the body isn-t expanding? Is it because of a background or something?
  24. Some companies only give you the domain name while you have to buy hosting separately or from another company. Some services include the domain name free in your hosting package. Personally, I prefer to have the domain name included in the hosting package.
  25. If you set the body to 100%, then it will not get any larger than the size of the window. If you want it to be larger, then remove the width: 100% declaration from your CSS. By default, the body element already occupies a minimum of 100% of the width of the window.
×
×
  • Create New...