Jump to content

nogray

Members
  • Content Count

    930
  • Joined

  • Last visited

Community Reputation

9 Neutral

About nogray

  • Rank
    Prolific Member
  • Birthday 02/01/1981

Contact Methods

  • Website URL
    http://www.nogray.com

Profile Information

  • Gender
    Male
  • Location
    San Francisco CA
  1. nogray

    complicated form validation

    Just go to the jQuery url I posted earlier. It has very clear and easy to follow examples. Also, I wouldn't recommend using name="submit" or id="submit" in a form element because it will cause a conflict in some browsers.
  2. nogray

    complicated form validation

    You have a few errors, first you are adding the validation function to your button click using the id selector #submit, but you don't have an button with the id submit. You should add the validation function to the form submit event (e.g. $('.myform').submit(function(evt) {...}) Second part, you need to use preventDefault() to stop the submit event if it fails validation. You can find examples here http://api.jquery.com/submit/
  3. Instead of rotating every single element, rotate the parent UL (and make sure to set the correct width).
  4. nogray

    jquery changes css property

    You can't use a variable as an object key directly in JavaScript. You need to use brackets [] instead e.g. var obj = {}; var element_prop = $(this).val(); obj[element_prop] = 'black'; $("#main_div").css(obj);
  5. nogray

    can't use php array in javascript

    Your PHP array will be a JavaScript object, so you can use a for (property in object) loop e.g. for (p in arr) { if (arr.hasOwnProperty(p)) { // do something } } Also, you have to remove the quotes from the "<?php json_encode($visits) ?>";
×

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.