-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
If you make the "interval" variable global (i.e. declare it outside the jQuery ready function) you should be able to do it anywhere.
-
Does anyone know why this doesn't work in Firefox?
Adam replied to richrock's topic in Javascript Help
Reading back I kind of modified yours, you can actually remove the 'obj' parameter from in the function declaration and 'this' from the call. -
Yeah it shouldn't be difficult to write a bit of PHP to generate them for you. I'm guessing your links are stored within a database?
-
You cannot use ampersands in XML like that, you need to convert them to an entity: &
-
No. What you're asking for is development, not fixing a bug.
-
As in your last post, you're probably not receiving much help because you're not actually asking a question. You're stating what you want done and expecting somebody to go off and do it. To do that requires time and experience, which unfortunately for you costs money.
-
This may help you. Basically you need to use longitude and latitude to calculate which postcodes are within what distance of each other; that website actually gives you some of the mathematics behind it as well as downloadable SQL file to import them into a MySQL table. I've not used it myself but looks alright. The only advise I can offer though is that I can't imagine that being frequently updated (article dated from August 2005); meaning newer postcodes won't be in there. To get a regularly updated, dependable data source you'll most likely have to pay for the service.
-
Does anyone know why this doesn't work in Firefox?
Adam replied to richrock's topic in Javascript Help
As Omirion pointed out, value doesn't appear to be a valid value. The target and settingvalue definitions appear to be redundant code. Plus would it not be better to hide the element with display:none? Personally I'd rewrite your function, seems a little dodgey to me: function togglePaypal(obj) { var ppd = document.getElementById('paypal_details'); if (ppd.style.display == 'none') { ppd.style.display = 'block'; } else { ppd.style.display = 'none'; } } Then just call it with: onclick="togglePaypal(this);" -
Ha yup, but that's the British government for you.
-
Ah yes of course. Technically events aren't actually attributes; in HTML you're just able to assign them like that. Try this: el.onclick = function() { test(this); }
-
In that case then, during the installation I'd just use cURL to post the data to a URL on your web site. I don't know if there's any legal side to this though, for instance the user having to give consent for you to capture details about their server? People will of course try to add in stuff like that but with malicious intent. Perhaps like on certain installations you have a check box that says "allow us to capture details about your set-up (...)" kind of thing? See if anybody else with a more legal mind has an opinion.
-
I love the irony of this. Was looking for some information about data protection earlier, went to the government website to find this.. [attachment deleted by admin]
-
Looks like you just need to set the interval again: interval = setInterval(removeFirst, pause);
-
AbraCadaver's method is what you should go with, but if not possible for whatever reason here's an alternative that will advance the result pointer to the last row returned: $total = mysql_num_rows($query); mysql_data_seek($query, $total-1); Once you've "seeked" to the last row, mysql_fetch_*() will return the data.
-
Oookay... What's with the IP?
-
You're going to struggle, JavaScript (using AJAX technology) can only make requests to pages on the same server.
-
I posted a solution above; I've tested it with your code and it works.
-
Don't worry about it, everyone's been there. From within the onclick attribute of your link, call your confirmDelete() type function: echo '<a href="save.php?type=delete&item='.$item.'" onclick="return confirmDelete();">delete</a> '; Be sure to include the return part as this will prevent the page from redirecting if the return is false. Then your confirmDelete() function needs to be something like: function confirmDelete() { var c = confirm('Are you sure you want to delete this item?'); if (!c) return false; } Then that should be it. Although you should be aware not everybody has JS enabled, so that confirmation message won't appear for everyone.
-
We can't really help you without seeing how your login system works..
-
PHP and writing to the the user's HDD, possible ?
Adam replied to Chucksta's topic in PHP Coding Help
PHP has no access to the user's file system to be able to write to it as such, however you can force the download of a file on your server so that they're able to choose where to save it? Read this post for how to do it. -
Perhaps the simplest way would be to set a variable before the include: $page_title = 'Your title here'; require 'header.php'; Then check within the template file if the variable's been set: <title><?php if (!empty($page_title)) echo $page_title; else 'Default title here'; ?></title>
-
Ha yeah perhaps that one's a little err.... harsh.
-
Pure comedy.. http://www.27bslash6.com/chat.html
-
If you change the code to: if(ytState==0) { alert('foo'); window.location.reload(); } .. do you see the alert? Also do you see any errors in the error console?