Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. You can use JS' location.hash or window.location.hash to modify that part of the URL. Edit: Just to add, the surrounding anchor really should be reserved for non-JS functionality.
  2. Believe they alter after the hash don't they? Don't have FB accessible at the moment so can't check for sure.
  3. Create the function(s) to validate each form, and as the "click" event is called on the tabs menu just call the correct validation function. If it returns true display the next form, else handle the error and and stay on the current tab. Can't really give you much more help though without seeing the code.
  4. Click the examples tab, second example... http://docs.jquery.com/Ajax/jQuery.get
  5. It's probs easier than you think.. <?php $mins = date("i"); if ($mins >= 0 && $mins < 30) { $timestr = date("H").':30'; } else { $hour = (date("H") == 23) ? 00 : date("H")+1; $timestr = $hour.':00'; } $timeleft = strtotime($timestr) - time(); ?> <script type="text/javascript"> var timeleft = <?php print $timeleft; ?>; window.onload = function() { timer = setInterval(function() { timeleft = (timeleft == 0) ? 1800 : timeleft-1; document.getElementById('timeleft').innerHTML = Math.floor(timeleft / 60) + ':' + Math.floor(timeleft % 60); }, 1000); } </script> <span id="timeleft"><?php echo floor($timeleft / 60) . ':' . floor($timeleft % 60); ?></span>
  6. Yeah, exactly the same..
  7. What's your problem first?
  8. I actually had this laying around (minus a few modifications to fit your needs). It's really simply (and a bit hacky to be honest), but you should be able to use it as a starting point... <?php $mins = date("i"); if ($mins >= 0 && $mins < 30) { $timestr = date("H").':30'; } else { $hour = (date("H") == 23) ? 00 : date("H")+1; $timestr = $hour.':00'; } $timeleft = strtotime($timestr) - time(); ?> <script type="text/javascript"> var timeleft = <?php print $timeleft; ?>; window.onload = function() { timer = setInterval(function() { timeleft = (timeleft == 0) ? 1800 : timeleft-1; document.getElementById('timeleft').innerHTML = timeleft; }, 1000); } </script> <span id="timeleft"><?php echo $timeleft; ?></span> seconds left Edit: corrected a bug in the code.
  9. He's validating the extension too.
  10. You may have some success with COM, but being as DLLs are *Windows* library files it may be a bit tricky.
  11. Actually it does need to use 'AND' / '&&'. Puzzled my brain for a minute two but if you think about it in English; "if it doesn't equal this, and it doesn't equal this.." it makes more sense. Using OR would always cause it to fail because it would always not match one or the other; "if it doesn't equal this, or it doesn't equal this". Also you could use a simple regular expression to reduce the amount of conditions: !preg_match('/audio\/mpe?g/', $mimetype)
  12. Nadeem has actually tried to make love to drupal y'know? He knows his stuff.
  13. Well without actually seeing the site can only guess as to what's happening. As I said though, it's quite possible the "onsubmit" event is attached to the form else where in the JS.
  14. Haha I first spotted Saddam! .. near to Hitler.
  15. Could only take wild guesses that wouldn't really get us anywhere. As JAY6390 says, post the relevant code.
  16. Perhaps an installation issue there, for me it spits out an error.
  17. I've been using CVS for over a year now and can only really think of 1 -perhaps- bug. It's just pretty limited I think.
  18. Ey?
  19. Plenty of version control software out there.. CVS, Git, Subversion.. We've recently started using Git at work over CVS and I definitely see the benefits, perhaps not worth the hassle of setting it up though if it would only be used minimally (Git over CVS / Subversion that is).
  20. Heh better than me, I can only name about 20 or so. I recognize a lot of them but can't seem to put a name to the face.
  21. I agree that the outer glows on the logo do look odd and are a bit awkward on the eyes. Also the navigation I didn't actually see until jcombs_31 commented on it; kinda looks like you'd ran out of inspiration when you came to that part. Not bad overall though, quite vibrant and fresh looking.
  22. nadeemshafi9 strikes again..
  23. Ah okay, fair enough. Well then to be honest I'd look at either using the <marquee> tag or finding another script; with the way this one works it'd basically need completely re-writing to support left to right scrolling.
  24. I think I kinda get what you mean. My guess would be that there are 'submit' events attached to the forms else where in the code base which is triggering the AJAX functionality and suppressing the form actually submitting to another page. Can't obviously speculate how or where though.
  25. You can't pass a date string to the Date() object like that. You can just remove all the date object stuff though and compare between the startdate and enddate variables: var startdate = "2009-11-01"; var enddate = "2009-11-04" ; if (startdate > enddate) { alert ("Error !") ; } (...) If you have a good read up on the Date() object you'll understand how/when to use it better. There was also a missing quote after: "Error !
×
×
  • 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.