Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. The browser has a "Save As..." feature. If you actually need to download the entire website perhaps you should consider buying a book instead.
  2. W3Schools.com has some basic information. There's a whole lot of information on other sites. http://alistapart.com http://quirksmode.org I've been ten years with web development, I can't remember where or when I learnt everything. Search Google for HTML best practices and CSS best practices.
  3. That's actually not HTML 5, it's probably a browser feature. Which browser are you using? Firefox doesn't do it for me.
  4. Frames are deprecated, meaning that browsers could drop support for them whenevr they want without notice. The kind of thing you want to do would likely be done with Javascript using block level elements to lay things out. Table-based layouts are a bad habit from the 90s, it's been over 10 years since we moved along from those in favor of CSS.
  5. Don't use backslashes in URLs, that's just a Windows filesystem thing. The URL standard uses forward slashes.
  6. Don't make them hyperlinks. Just remove the <a href="#">.
  7. You can use the browser's developer tools to see what rule is overriding it. Press F12 to open developer tools, go to the DOM Inspector and click on the element you expected to be styled. On the right panel there will be a list of all the selectors and styles that are being applied to it. There is no "index" property in CSS.
  8. All results received from the database in PHP are strings. INT just tells the database how to handle and store the data.
  9. The array needs to be declared first before you can use it. This won't work: alert(a[0]);var a = new Array();a[0] = "A";a[1] = "B"; This will work: var a = new Array();a[0] = "A";a[1] = "B";alert(a[0]); The second thing you need to know is how to use the Date object. You can read about it in the W3Schoole tutorial: http://www.w3schools.com/js/js_date_methods.asp Weekdays are numbered from 0 to 6 when returned by the Date() object. The name of the weekday is not used. For the conditions, what you have to do is compare the values given by the date object to the values you want them to be compared to.
  10. What you change the text to "Call me" you're also removing the link that was inside. Your code does the following: When the width is greater than 1024: <button id="phone" class="button"><a href="tel:6144788011" title="Call Advanced Systems">614-478-8011</a></button> When the width is less than 1024: <button id="phone" class="button">Call me</button> It's not a good idea to put a link inside a button, try styling the link with CSS to make it look like a button instead.
  11. It's not just "unsafe", it provides absolutely zero security, honestly. For what it's worth you might as well have a list of links to each corresponding page and ask them politely not to visit pages that don't correspond to them.
  12. You need to put a .html or .htm extension on your file. If you save the file as red2.html you can access the file using <a href="red2.html">Page 2</a> The content between the tags is what's visible. You should read the tutorial page: http://www.w3schools.com/html/html_links.asp
  13. You probably should start off by reading the Javascript tutorial. Once you understand Javascript you can begin to make something.
  14. Do you have any knowledge of Javascript?
  15. It's not always a requirement to post code. On many occasions it's possible to solve a problem without it. I only ever ask to see code if there's no other way I can solve the problem.
  16. The arrow could easily be represented using a background image positioned to the right and vertically in the middle. The border can be added with the CSS border property. You probably should not be expecting anything to be pixel-perfect on the web. There are far too many browsers and operating systems and they all behave differently. As a web developer what's important is to make the experience equally functional and useable for all the users.
  17. Ingolme

    Position

    I don't understand what you want to do but I can take a guess. When an element is invisible, if you want it to continue occupying its space you can use the visibility property rather than changing the display property.
  18. There is a children property but Internet Explorer only implemented it properly in versions 9 and up. The difference between children and childNodes is that children only contains element nodes. Most of us long-time Javascript programmers were used to using the childNodes property because it's one thing you can be sure will work on all browsers.
  19. The page I linked you to has the proper syntax. You use the union between two different select queries. Copied from the page I just linked you to: SELECT City, Country FROM CustomersWHERE Country='Germany'UNION ALLSELECT City, Country FROM SuppliersWHERE Country='Germany'ORDER BY City;
  20. I think the UNION ALL operator is what you're after: http://www.w3schools.com/sql/sql_union.asp
  21. You need to think your problem through. Set your objective and then determine the steps required to achieve it. You're receiving a string from the server with data. Rather than separating values with "S_E_C_R_E_T__S_I_G_N__!_|_!_|" (which takes up a lo tof bandwidth if the list is long) try encoding it as a JSON array. You could return an empty array if you want to determing there are no suggestions. 1. Decode the array received from the server. 2a. If the array is empty then put "No suggestions" into the output element. 2b. If the array is not empty then begin looping through array values 2b.1. Create an element to contain the value 2b.2. Add an event handler to the element. 2b.3. Add the value to the element. 2b.4. Add the element to the output element. <br> elements won't be needed if the list elements are blocks. CSS can set any element to a block by writing "display: block". Blocks are also easier to click on than inline elements because they're rectangular meanwhile inline elements can only be clicked if the mouse is over the letters.
  22. Don't use the HTML event attributes. they're only there for backwards compatibility for old pages. The table needs a <tr> element around the <th> element. First you need a way to access the element, for example an ID: <th id="button"> Then you can access the element. I'll use jQuery syntax because that's what you're currently using: $("#button").on("click", somefunction); // Parentheses () should not be used on the function name here Inside somefunction you can remove the other event listener and add a new one: function somefunction() { // Do something // ... // Remove listener and add a new one $("#buton").off("click", somefunction); $("#buton").on("click", someotherfunction);}
  23. <br> can go inside a span if you want, but it makes more sense to put it between the spans A 500 error means the server has a problem, it has nothing to do with your code. When I get a 500 error it's usually because I used an invalid expression in a .htaccess file.
  24. The reason it doesn't work is because #selectable table looks for tables inside the #selectable element. To look for tables with selectable as an id you can use the table#selectable selector. To look for any element with selectable as an id #selectable is good enough. Read the W3schools tutorial for more information about CSS selectors.
  25. There's no click-and-drag type editor for HTML pages that will produce valid code that works correctly in all browsers because browsers are all different and you have to code taking all kinds of details into account. There are many text editors that help with syntax highlighting, code completion, indentation and other things. I use an editor called Notepad++, but there's also SublimeText, conTEXT and many others. Dreamweaver is Adobe's solution to web page creation but it's very expensive and a lot of amateurs make the mistake of using its visual editor and internal preview engine which might look right in the editor but then doesn't work in real browsers.
×
×
  • Create New...