-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
The time it takes to build a CMS is not free, if you're a freelancer. I've actually got a bit of a background project I keep coming back to that's building my own CMS; it's no simple task, if it's done properly.
-
That screenshot doesn't explain at all what's not working.
-
firefox error! ajax and normal php posts on same page
Adam replied to russthebarber's topic in Javascript Help
Sounds like you're using history.back(), in which case the browser will always ask if the user wants to resubmit the form, for security. You should form a completely new request to the previous page, and pass along whatever data is needed. -
Your selector is an <li> tag, which will match each of the items in the list. You need to provide them with something unique to use within the selector, or access the 'nth child' if it's all dynamic.
-
You also can't make use of the modifiers with the shorthand notation. You need to manually create a new RegExp object and pass them in as the second argument, then use that within your condition. Edit Actually, I'm completely wrong here! Ignore that, I always thought it was the case.
-
Variables within single quotes are not parsed, so you're literally trying to delete '$code'. You could use double quotes (which are parsed), but there's no reason to wrap just a variable in quotes anyway. Drop the quotes..
-
As thorpe was getting at, you're not handling errors. "Overwriting" issues are not the problem. Please add in some error handling and then report what's actually going wrong.
-
I'm not ruling out that it's real people wasting their lives spamming, but it's also possible the captcha system you're using at registration has been cracked. While the letters are a little sketchy looking, they're still pretty clear. I would switch to something like reCAPTCHA and see if the problem persists.
-
.. Why?
-
Yes that's what I mean. An if #content holds the login form, then you're already clearing it.
-
I can't see how it wouldn't. Can you show the whole code for each situation as it is when it's working / not working?
-
Well that's what you get in-effect, but really you're just setting the HTML of #content to "Retrieving..." Essentially to: <div id="content">Retrieving...</div> So forms, inputs and all other elements are lost. To make it work you can simply capture the data before you set the HTML (i.e. switch around the lines). Although it may make more sense from a usability perspective just to move the form out of #content.
-
The moment you click the #clickme button, this line is fired: $("#content").html('Retrieving...'); That removes all the content within #content, and replaces it with a text node. That means the form and buttons cease to exist any more, which is why you can't access them.
-
Show me the proof? I don't believe you M$.
-
Look into event.preventDefault().
-
S1 was funny and entertaining. S2 was just depressing. S3 tried to recreate the S1 but was just over the top and got far too deep. S4 I didn't watch.
-
Unlike a lot of programmes, they decided not to ruin it and quit while they were ahead
-
Google told me it's characters from The Office... the US one. The UK one was much better.
-
That's a Unix timestamp. Check out the second parameter for date.
-
jQuery provides a simplified method for making GET requests; jQuery.get(). Have a look through the documentation. I would personally wrap the functionality inside an object or a couple of functions, and re-use it for every link. With a simple selector you can match each anchor and hijack the normal behaviour.
-
What a waste of bandwidth. If you've got users with limited and/or slow connections, I'm sure they'd be thrilled that you're trying to perform miniature stress tests on their connection. Why not save that bandwidth and waiting time for actually loading content they want? Just lazy load the images. Problem solved. Edit Not to mention as someone else has said, the results you'd get wouldn't be realistic at all; intermittent connections, going under a bridge, network lags, etc. I dare say devices are also smart enough to realise when something is trying to hammer the connection, and so will throttle it.
-
People are just guessing what you want, netpumber. What exactly do you expect to happen?
-
Do you have any white-space before the opening PHP tag? The error should tell you where output was started.
-
Session Storage fallback for when cookies are turned off
Adam replied to johnsmith153's topic in Javascript Help
You can't do it. Cookies are sent in the request headers so PHP has access. localStorage though is purely client-side, PHP cannot read from it. Not to mention you're never going to be in a position where the user's browser supports localStorage but not cookies.