Jump to content

nogray

Members
  • Posts

    930
  • Joined

  • Last visited

Posts posted by nogray

  1. Just use a standard function syntax, after all, this is just JavaScript.

     

    myFunc( $("#foo").css("height") );

     

    If you want to go with chaining style, you would need to extend the prototype of String and Number (since that's the return of the jquery css function)

    e.g.

    String.prototype.myFunc = function(){// this will be the value...};
    Number.prototype.myFunc = function(){// this will be the value...};
    

  2. If the form submits to the same page, it won't be disabled because after it submits it's like a new page. You would need to check if the form was submitted using php and than disable the select menu.

     

    Good luck

  3. I copied your code as is and it works fine. It disables and submit the form without any problem. If you are submitting to the same page, the select menu will be disabled for a second or two while the page reloads.

     

    If you still having a hard time, just make one function that disables and submit the form and call that function from the onchange event.

     

    Just a couple of hints, always use a semicolon to terminate each line (e.g. x.disabled=true;)

  4. Instead of using echo in your php, you would create an array with all the outpust - e.g. array('email'=>'my_email@domain.com', 'address'=>'my_adddress');

     

    When you finish collecting the data, use json_encode to transfer the array into json and echo the json result.

     

    In your javascript function, you would parse the json object (I think jquery has a parse function) and use that javascript object in the function.

  5. You would create a div around the image with the height and width of the image and set the background of that div to be the loading div (set it to no-repeat center center). In your image tag, set the style="display:none;" and add onload="this.style.display='';" That sould hide the images until they are loaded.

  6. Use an alert on MyInc to check the text value. if parseFloat can't find a number it will return a NaN. You can check for it by using the isNaN(value) function.

    e.g.

    var my_parse_float = parseFloat(MyInc);
    if (isNaN(my_parse_float)) my_parse_float = 0;
    

  7. In Aykay solution, the object.onmouseout = timeout; (timeout is an integer returned by setTimeout). You can replace that line with

    object.onmouseout = nextslide;
    

     

    Or set a global variable called pause and when the mouse over set "pause" to true and when mouse out set it to false and call the next slide. In your function, simply check the status of "pause"

×
×
  • 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.