Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

Everything posted by Alex

  1. I'm not sure what ajax auto search means. Can you clarify the behavior that you're trying to achieve?
  2. At a quick glance I noticed a few problems. Your main issue is that in your submit handler your if statement is messed up. if(validateName() & validatePhone() & validateEmail()) You want to be using the AND operator, &&. One other small thing I noticed is that inside of your validateName function you have a typo with one of the variable names: nameo.text("Enter Name"); That should be name, not nameo.
  3. Can you explain how you expect this commission system to work?
  4. 1+i Man, my math is rusty. Is that complex or imaginary? Complex, the "i" is the imaginary part. A complex number just consists of a real and imaginary number, the real part being 1 in this case, and the imaginary part being i. It's pretty simple, actually.
  5. Try: $myVar="friend_form.php?id_property=" . $row_properties_RS['id_property'];
  6. Do you have the function post_chat()? I've tried the example and it works. For example try this: $(function(){ $(document.documentElement).keydown(function(e){ if (e.keyCode == 13) { alert('it works!'); return false; } }); }); And press enter on the page.
  7. Buttons don't trigger key events like an input would. If you want to listen for the enter button being pressed for the whole page then listen on document.documentElement. $(function(){ $(document.documentElement).keydown(function(e){ if (e.keyCode == 13) { post_chat(); // function to run after enter is hit return false; } }); });
  8. This should work too: echo implode(' ', $pers['Steve']); Yeah, in that case that will work just as well, but you might want to be careful. In general associative arrays aren't required to have an associated order. With PHP order will be maintained in associative arrays since they're implemented as essentially being hash tables, but you shouldn't assume this in general. For example, if you want to achieve associative array functionality in JavaScript you're going to have to use objects (which aren't "real" associative arrays for other reasons but that's besides the point in this example) which are an unordered set of name/value pairs, so it's not guaranteed that order will be preserved. So imagine that this array was coming from JSON data, you have no real way of ensuring the order is going to be what you expect, so the output might not be in the order you were after.
  9. The file needs to have the permissions.
  10. If you don't know, Google it. A simple google for "windows file permissions" will yield you all you need. http://support.microsoft.com/kb/308419
  11. @ is used to for error suppression, so that would hide the error but not fix it. First I'd check to make sure your path is correct. Is it supposed to be "images/" and not "mages/" (just a guess ). After that I'd make sure that this file has proper permissions. This means the file must have write permissions to the directory you're trying to remove the file from.
  12. I'd suggest reading the comments on the php manual page for unlink(), there's a fair amount of discussion about this error and the various things that could cause it there. http://php.net/manual/en/function.unlink.php
  13. Well, it's a multidimensional array so $pers["Steve"] itself is an array, so to add one of the elements you'd do something like: $pers["Steve"]["eyes"] For the specific output you asked you'd do something like: echo $pers["Steve"]["eyes"] . " " . $pers["Steve"]["age"] . " " . $pers["Steve"]["race"];
  14. The OP wanted it to be 5-50 exclusive, so you'd need to do range(6, 49). But even then this would only work if $nr can only have integer values. For decimals it wouldn't work.
  15. Google's getting really good with this type of stuff. Here's a blog post from just a few days ago on this: http://swapped.tumblr.com/post/23133779276/google-bot-now-crawls-arbitrary-javascript-sites
  16. 170FPS is probably right. Browsers throttle timers to a minimum limit, so your setTimeout('Main()', 1) isn't being called every millisecond. Each browser is different, I think for chrome the minimum is 3ms and for FF it's 5ms or something like that, but don't quote me on it.
  17. Ever consider WebDrive? That's exactly what that's for.
  18. md5 or sha1 with a salt is enough.
  19. Sure, but I don't want to physically store the files on the computer like dropbox does Dropbox stores the files remotely. But it also stores them on the computer that installs the software, which I don't want. You can modify how dropbox syncs to achieve this functionality, though.
  20. In this case it would be 4, but you have to be careful because that's not necessarily the case just because there are two if/else statements. For example, consider the following code: // $x, $y, $z each given a true or false value if($x) { $y = true; } else { $z = true; } if($x || $z) { } else { } In that case it would be impossible for the else statement on the second if statement to ever be called. If $x had an initial value of true, then the if statement is true, but if $x was false to begin with then $z gets set to true, and as a result the statement, $x || $z is still true.
  21. The n(n+1)/2 is the value for the sum of numbers from 1 to n, so you're just looking for:
  22. Alex

    IE6 Countdown

    http://theie7countdown.com/ http://theie8countdown.com/ http://theie9countdown.com/ and... http://theie10countdown.com/
  23. Do you mean the web? Tim Berners-Lee invented the WWW, not the internet.
  24. Alex


    Well now you need to loop over data.offers, not just data. So change: $.each(data, function(i,offer){ to: $.each(data.offers, function(i,offer){
  25. In order to prevent any misconception, unless you only worded that badly, empty doesn't "empty the variable". It simply returns whether or not the variable is empty, as the manual states with more detail.
  • 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.