-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
Depends what the file is going to be used for..?
-
PEAR::isError() is checking if the ->data property is a PEAR_Error object. You need to trap the error in a variable so you can access it again to get the error: if (PEAR::isError($error = Database::get()->data)) { die('Error: ' . $error->getMessage()); } That should explain the problem. I would recommend you make the move to exceptions sooner rather than later though, PEAR error objects are far too easy to loose. You can tell PEAR how to handle errors with the setErrorHandling() method.
-
I think what he's saying is that the 3 items should be part of a single drop down menu, but instead they are displaying horizontally in IE9. Ah yes. I don't know how I didn't realise that
-
getting position of a div or <li> to set the position of a image
Adam replied to friedice's topic in Javascript Help
This should be done with CSS. JavaScript should never be used to control the position of a static element. Do you have an example online we can look at? Or perhaps able to give us some mark-up to recreate it? -
This topic has been moved to Miscellaneous. http://forums.phpfreaks.com/index.php?topic=365380.0
-
Oh by the way, in the next version of FF it will update automatically in the background
-
Do you use Windows? Ever seen those pop-ups after an automatic update saying "you've got x minutes to click cancel or we're going to reboot your computer"? .. Then after you click cancel it pops back up again 4 hours later, and every 4 hours until it catches you AFK. I'm aware you can disable auto updates and the auto reboot (though that's not exactly straight-forward), but it's the default behaviour.
-
Companies do cater for their users, but given it makes the developer's job harder, they have that urge to complain amongst fellow sufferers. I agree that IE9 has largely over come a lot of the old issues and I don't think it's a bad browser, but as others have said, the old issues haven't suddenly disappeared. People are still dealing with them daily, which is why people still get munk on about it.
-
Sync Data Btwn Website, Desktop App & Mobile App?
Adam replied to doni49's topic in Application Design
It would be better if you explained the kind of data and transactions you're dealing with. You mentioned each subscriber may have a few thousand rows; that's not a massive amount to keep synced on a phone if needs be. Of course though that's if they only need access to their own data, and not all of it. Personally, I don't understand why it needs to be supported offline anyway? I doubt most of the apps on my phone would even start up without an internet connection. To me it just sounds like you need to have a central API that each device can request/push data from/to. If you're worried about two devices updating the same row in a short period of time, just add in a checksum. The last person to save will be alerted the data has been updated, shown the new data in comparison, and can then decide what to do. -
<center> is deprecated, and alone wouldn't achieve what the OP is after. You're much better off using display: inline-block on each of the .container08 elements, with a parent element containing text-align: center. Unfortunately this isn't supported in older browsers, so there's a few little hacks you need to include. Created this to demonstrate: http://jsfiddle.net/EcPcw/ Ensure the last four properties remain in that order.
-
This topic has been moved to CSS Help. http://forums.phpfreaks.com/index.php?topic=365334.0
-
Your JS is within a script tag that includes external code. You need separate script tags: <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script type="text/javascript"> function SubmitThisForm() { location.href = 'statuses.php'; } </script>
-
Not just the better you get, but the more you begin to customise it. That's the real beauty of vim. They say you should learn/add a new feature every week, and in time you basically build up the perfect IDE for yourself. I find it hard moving to a different editor/IDE though, I'm forever writing ":wq". Even in Word documents.
-
Just looked like a vim colour scheme to me, but it's obviously doing something. What's output if you run this in the terminal: echo $LS_COLORS
-
I don't know exactly what that .reg files does to your PuTTy session, but after a quick look on the website I didn't spot any screen shots of ls output. Are you sure it's actually for that? By default I believe the --colour option for ls is disabled. You might want to add an alias in your .bashrc file to ensure it's using them: alias ls='ls --color=auto' You can go a step further and define the colours you want to use yourself (this guy explains how). Although I guess the .reg file could be trying to do that and failing. I'm not sure with PuTTy. We'll see how the alias goes first. I always work within vim. The bog standard set-up isn't great, but the whole purpose of vim is you progressively customise it exactly how you like it. Once you learn the commands and define your own, set-up your colour scheme, add tags, etc. You'd be surprised how fast you can work with it. I've even got a PHP debugger configured so I can step through the code as it executes, add in break points, etc.
-
Bit odd, but okay. In the anonymous function then you will need to manually trigger the form submit (if needed): document.formName.submit();
-
The result of the AJAX request should not determine whether the handleLogin() function returns true or false. The return statement is simply to stop propagation. Even if the request fails, we don't want the form to then go on and submit. Yeah, although nothing will be waiting for the return values of the anonymous function, so you may as well remove them.
-
Well technically when it comes to arrays, PHP is actually the black sheep amongst languages. JS is pretty standard, in that you can only have sequential, integer indexed arrays. If you want the equivalent of an 'associative' PHP array, just use a standard object.
-
May I recommend the freelance board? Seriously, we're not sat here waiting for you to give us something to do.
-
Glad it's sorted. I don't think you can blame it on the while loop being 'bugged' though. They work exactly as they do in PHP, or any other language.
-
What exactly are you trying to do? You've just provided a load of random code and said 'I need to another d(v4)' ..
-
You're only returning from the anonymous function assigned to the state change event, not the actual handleLogin() function. You need to always return false from handleLogin(), regardless of what happens with the request. Remember that the callback you assign to the XHR object isn't called for a relatively long time; handleLogin() has long since returned by that point.
-
Fair enough it's valid, but your question was what 'lines MUST end with a semi-colon'. Semi-colons aren't required there, and shouldn't be used there.
-
Are the return statements within a callback? Can you show the whole code please.