Jump to content

Fmdpa

Members
  • Posts

    1,035
  • Joined

  • Last visited

Everything posted by Fmdpa

  1. The library computer is probably not setup to allow you to install programs. That's how most public computers are.
  2. Going back to the original question, you may find this article on quirksmode helpful, too: http://www.quirksmode.org/js/events_properties.htmlAs stated in the article, you can convert the event code to the actual key with this: String.fromCharCode(code); However, it would be better to use the key codes in conditional statements.
  3. It's great that you have a good, solid base in HTML and CSS. One of the best websites I can name for web design is this one: http://webdesign.tutsplus.com/There are debates whether web designers should learn JavaScript. IMO, it would be one thing that could help you rise above the competition. JS is very connected to the presentation and interactivity of web pages. Once (if) you learn JS, I'd recommend that you also learn jQuery, a very popular JS library that simplifies tricky tasks in plain JS such as animation and cross-browser compatibility.Also, it would be excellent if you had experience with Photoshop, if you don't already. If you don't want to pay for Ps, GIMP is a capable open-source free graphics editor. It lacks some convenient features that Photoshop has, but in general, it is a very capable graphics editor.
  4. HTML5 will change that: http://www.w3schools.com/html5/tag_textarea.aspCurrently, you could do the same thing with JS though (untested):<textarea rows="5" cols="30" id="ta"></textarea><script>ta = document.getElementById('ta');max_characters = 250;ta.onkeypress = function(evt) { evt = evt ? evt : window.event; if (evt.keyCode) code = evt.keyCode; else if (evt.which) code = evt.which; else return false; // if the textarea is at its maximum length limit then only allow the delete, enter and backspace keys (In other words, nothing can be added); if ((code != 8 && code != 13 && code != 46) && ta.value.length > max_characters) { return false; // prevent the default action (printing the character); }}</script> This can be bypassed by disabling Javascript, so it is purely an enhancement for the majority of users.
  5. Opera 11 and Firefox 4 support it, but it is currently disabled in those browsers because of security concerns. However, you can read more on the WebSocket API here: http://davidwalsh.name/websocket
  6. Boen_robot made a good point above. First off, the HTML generated by ASML is not standards compliant (as thescientist mentioned). As indicated on this page, the <font> tag is deprecated. If you would like to allow the user to enter any color, then it would be best to use inline styles and <span> tags. <span style="color:{color here}">{text}</span> Also, the <font> tag is unclosed. There is really no way to tell when you want the formatting to end unless you wrap it in tags (or use a newline character as an ending delimiter, which would be inconvenient). At that point, you're just going back to the HTML syntax...
  7. Fmdpa

    padding='0px' !?

    ...like I just saw JSG using the "Language" attribute in a <script> tag. I'm not sure what was up with that!
  8. Fmdpa

    padding='0px' !?

    What's up with the assignment operator? Shouldn't it be: * { padding: 0; margin: 0;}
  9. Fmdpa

    Gradient

    What a coincidence; I just posted an article on CSS3 gradients on my blog: http://www.cyberstream.us/post/2011/03/usi...inear-gradients
  10. Tip: layout your email like it is 1997. Yup: layout the page with tables. Although the email would look fine with CSS in newer clients (webmail, Thunderbird, Opera Mail, etc.), older Outlook versions might be a nightmare. http://net.tutsplus.com/tutorials/html-css...-for-beginners/
  11. I think most email clients will disable javascript for security reasons. Emails aren't made to be dynamic.
  12. Did you check your server error_log?
  13. Yeah, basically htmlspecialchars and mysql_real_escape_string would be fine.
  14. Treat them like any other inputted text ($_POST). The HTTP_USER_AGENT and HTTP_REFERER $_SERVER variables can be easily manipulated, but I'm not sure if the IP address can...
  15. Fmdpa

    Table?

    Learning can be a lot of trial and error at the beginning. There was a lot of trial and error when I was learning PHP. I've learned to appreciate errors (sometimes I actually wish my code produced errors so I could figure out problems).
  16. Ok, I looked more into the event and found this page: https://developer.mozilla.org/en/dom/window.onhashchangeIs there no way to make a hashbang navigation degrade gracefully? I really like the concept since it is smoother (you only have to reload relevant areas of the page) and it is "bookmarkable AJAX".
  17. Very interesting, thanks for that link. How is it possible to an AJAX request when the URL fragment is modified?
  18. And some editors' bad sides outweigh their good sides. The key to choosing a good editor for yourself is to find an editor thats advantages outweigh its disadvantages and where the advantages are strongest in the areas you use most.
  19. I've come across several websites lately, twitter for one, that navigate asynchronously. In those websites the url looks something like this:http://mywebsite.com/#/pageWhat's the trick they are using, and how does it work?
  20. Fmdpa

    Table?

    Basically that means that PHP is seeing an else keyword before it should be. Usually that means that the previous line is missing a semi-colon. Also, don't put semi-colons after a curly brace: else { die('Could not create table: ' . mysql_error());};//should be:else { die('Could not create table: ' . mysql_error());}
  21. Fmdpa

    jquery

    Looking on the about us page...Firstly, I noticed that you have an improper HTML comment:<!...container end...> should be <!--...container end...--> <b><img src="images/newbull.jpg" alt="newbull" width="300px" height="200px"></b> ...<b> is not the proper tag in which to wrap your images. It is for formatting text. Use something like <div id="fade-in"> ...images... </div> Your JS is confusing to me, as simple as it is. Are you trying to display larger images when the user clicks on a thumbnail...? $(document).ready(function(){ $("b").fadeIn(6000, function() { }); return false;});
  22. You could extract the section of jQuery that does the animation...unless the function is dependent upon other parts of the library.
  23. Why are you doubting that IE Tester doesn't show the right version? The pages look bad enough to me. In recent version of IE (at least 8 and 9) you can open the developer console (F12), and you can view pages in different versions of IE. Go to the far right of the toolbar in the developer tools window and select the browser mode you want. Just make sure the browser mode is the same as the quirks mode or else you can get some wild results.
  24. Congratulations! It's nice to hear how others are benefiting from W3Schools.If you don't appreciate the tutorials, just try to read the W3C specs and you'll be immediately grateful for W3Schools!
×
×
  • Create New...