www.webdeveloper.com

Search:

Type: Posts; User: nathanwall

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,685

    Are you asking how it works internally? Because...

    Are you asking how it works internally? Because that's a little bit of a complicated question which has pieces on several different levels.

    Here's how the abstraction is set up, and the only...
  2. window.onload =...

    <script type="text/javascript">
    window.onload = function() {
    var aEls = document.getElementsByTagName('a');
    for (var i = 0, aEl; aEl = aEls[i]; i++) {
    aEl.href =...
  3. Quicksand 2 CSS4 Selector Engine for JavaScript

    I have developed a robust CSS selector engine for JavaScript with support for Selectors Level 4. It has a lot of options to make it highly customizable including custom pseudo-classes, custom...
  4. Replies
    1
    Views
    376

    Why do you want to close the old page? Could you...

    Why do you want to close the old page? Could you just use location.href = 'new location'; to change the location of the current page?

    If you insist on opening a new page and closing the old one,...
  5. I very rarely ever use innerHTML, and then it's...

    I very rarely ever use innerHTML, and then it's only to accomplish something that can't be done without other DOM methods. What you want is definitely doable.


    function test_function() {
    var...
  6. Replies
    6
    Views
    818

    <input type="text" size="10" name="ssn" onkeyup="chkHyphen( this, [3,5]);" maxlength="11"/>
  7. Replies
    6
    Views
    818

    Weird. The forum removed the backslash in the...

    Weird. The forum removed the backslash in the regular expression. Change

    reNonDigits = /[^d]/g

    to

    reNonDigits = /[^\d]/g
  8. Replies
    6
    Views
    818

    Try this: ...

    Try this:


    <script type= "text/javascript">
    function chkHyphen(fld, pos) {
    var s = fld.value, reNonDigits = /[^\d]/g, p;
    // Remove existing hyphens and non-digits
    s =...
  9. Replies
    7
    Views
    959

    A couple questions: Which browsers do you need...

    A couple questions:

    Which browsers do you need it to support? and/or How important is implementing properties instead of simple fields? Many older browsers don't support properties or support...
  10. Replies
    7
    Views
    959

    My suggestion to you is to learn prototypal...

    My suggestion to you is to learn prototypal inheritance. Javascript is strongly object oriented; it just doesn't use a class-based inheritance model. Prototypal inheritance is an alternate way to...
  11. <div id="second" onclick="document.getElementById('form').submit();">Second</div>
  12. Replies
    10
    Views
    1,551

    Hey, glad you found a solution. If I may offer a...

    Hey, glad you found a solution. If I may offer a "better" solution:



    <script type="text/javascript">

    function setActiveMenu() {
    var control =...
  13. Replies
    12
    Views
    1,685

    Assuming myElement is a joi Element object: ...

    Assuming myElement is a joi Element object:


    myElement.on('click', myFunction);

    or


    myElement.on({
    click: myFunction
  14. Replies
    12
    Views
    1,199

    You could do this to make sure the images stay...

    You could do this to make sure the images stay hidden even if there's a problem loading them:



    <img style="width:0; height:0;"...
  15. As the PHP documentation describes, the reason...

    As the PHP documentation describes, the reason for the two is just to give you the option to do whichever you want. Earlier versions of PHP/mysql functions only supported the procedural style. When...
  16. Part of that needs to be fixed. I didn't realize...

    Part of that needs to be fixed. I didn't realize the # was included in location.hash.



    var hash = location.hash;
    if(hash && hash.substring(0, 2) == '#!') {
    var hashInfo = hash.split('=');
    ...
  17. The reason for the second error is most likely...

    The reason for the second error is most likely because of the first. The Start function is never loaded because of the syntax error, so when Start is called onload it results in "Start is not...
  18. Assuming you are talking about leaving page...

    Assuming you are talking about leaving page a.html and going to c.html (and not using iframes or something similar), then you have 3 options:

    (1) Send the variable in a hash-style query string:
    ...
  19. Quicksand CSS3 Selector Engine for JavaScript

    I have recently developed a CSS3 selector engine for JavaScript called Quicksand. The primary reason was I wanted one to plug into my JavaScript library, and I needed it to be licence free. It was...
  20. Replies
    6
    Views
    643

    The problem here is there are no new variables...

    The problem here is there are no new variables defined inside the closure.. All are still external to the closure. Try this:



    for(var i = 1; i <= 34; i++)
    {
    (function() //Start of...
  21. Replies
    6
    Views
    643

    Here's a simpler example to demonstrate how the...

    Here's a simpler example to demonstrate how the above works:



    <!doctype html>
    <html>
    <head><title>example</title>
    <script type="text/javascript">
    window.onload = function() {
  22. Replies
    6
    Views
    643

    You can use a closure to have different values...

    You can use a closure to have different values for str for each call. That way, new variables are created for each iteration in the loop, rather than reusing the old ones.



    function...
  23. When you want to send someone a link to the file,...

    When you want to send someone a link to the file, store a code for that file in a database. Then send the links with a code in the query string, such as:
    ...
  24. Replies
    28
    Views
    3,739

    Although a couple of the posters are being a...

    Although a couple of the posters are being a little cruel in the tone of their jokes, I do agree that this is a good concept with the wrong approach.

    I, also, started down a similar road to this 7...
  25. Replies
    13
    Views
    20,543

    Did you uninstall XAMPP before installing WAMP?

    Did you uninstall XAMPP before installing WAMP?
Results 1 to 25 of 55
Page 1 of 3 1 2 3
HTML5 Development Center



Recent Articles