Jump to content

monkeysaurus

Member
  • Posts

    104
  • Joined

  • Last visited

Everything posted by monkeysaurus

  1. Hi Susie, tweeted this a moment ago, but I'll post here for posterity too. One solution is here: http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery Option two is what I think you're looking for.
  2. Hi Eric, (yeah, it's John ) The li.myLi part refers to a Li with a class of 'myLi'. In your markup above, you would simply do something like: $(document).ready(function(){ $("li").focus(function () { $(this).css('color','red'); }); }); Of course, this would affect all li elements on the page. I've also added extra closing brackets, they were missing. Firebug generally catches these things, or using a good IDE like Komodo Edit can help too.
  3. Ideally, you'd be looking to remove onClick entirely and use unobtrusive techniques, but this should work: print Note that onclick is in lower case and the javascript: part is removed.
  4. Yep, agreed. The css part was just as a little example, but adding classes would probably be better.
  5. JQuery: $("li.myLi").focus(function () { $(this).css('color','red'); }); For example.
  6. I don't have time to knock out a full solution right now, but if you're using jQuery, this is trivial. Look into addclass and removeclass. http://docs.jquery.com/Attributes/addClass http://docs.jquery.com/Attributes/removeClass Let me know if you're still having trouble and I'll knock up an example later.
  7. twitter.com/johnmcc - I am proper addicted.
  8. I'd recommend Mediawiki, which is what Wikipedia uses.
  9. You can use a while loop instead; this is explained here.
  10. monkeysaurus

    Files in php

    I'd actually go further than Ben; these days, almost every site more complex than a 6-page static html site will be using some type of framework that will allow 'pretty' URLs. (Or more properly in a technical context, URIs.) For example; Joomla, Wordpress, Ruby on Rails, Django, CakePHP, Codeigniter, ASP.NET MVC - they all allow URL manipulation out of the box. Heck, you can even take a look at the URI of this page for an example! URIs these days bear almost no relation to files on a computer, as they might have done in the past.
  11. monkeysaurus

    Files in php

    Just to be absolutely clear, an address like http://myblog.blogspot.com is usually a subdomain, rather than a subdirectory. I say usually because it is possible to use mod_rewrite and other rewriting scripts to rewrite sub-domain URIs to subdirectories (although it isn't very common in my experience.) And yes, the information about each blog will be held in the database. A templating system will be used and the blogger's posts and other information will be inserted at appropriate points. Hope that makes sense.
  12. The title attribute can also be useful for SEO purposes, and for describing content pulled in by a element: Reference manual -- Page 5 type="text/html" href="http://someplace.com/manual/start.html"> It's the swiss army knife of HTML, does a little bit of everything, depending on the context.
  13. "Values of the title attribute may be rendered by user agents in a variety of ways. For instance, visual browsers frequently display the title as a "tool tip" (a short message that appears when the pointing device pauses over an object). Audio user agents may speak the title information in a similar context. For example, setting the attribute on a link allows user agents (visual and non-visual) to tell users about the nature of the linked resource" http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.3
  14. Alternatively, you could look at ReCaptcha - accessible to vision-impaired users (if not necessarily those with mental disabilities), secure, and easy to add to your site. You pays your money and makes your choice, I suppose.
  15. There are easier, more accessible and more usable alternatives to captchas. I posted this on the old forum, but this is such a good read that I'm going to post it again. It will change your thinking on captchas completely. http://www.landauer.at/preventing-spam-in-form-submissions-without-using-a-captcha.php
  16. This is where I got a bit confused - LAMPP is also the former name of a port of XAMPP for Linux, which I think theAdmiral was using. He seems to have got it all working now though.
  17. And if you want to be really thorough, you can use the longdesc attribute: http://www.w3.org/TR/REC-html40/struct/objects.html#adef-longdesc-IMG
  18. Good news, congrats! I just googled for LAMPP - I'd never heard of it before, but apparently it's a port of XAMPP for Linux. (Now renamed..err...XAMPP for Linux!) Hence the confusion - I've learned something too! I've always just used Apache, PHP and MySql seperately in Linux.
  19. I'm not quite sure what you mean by the 'lampp' directory, but it should be from your root directory.
  20. Hi, You'll probably get better advice over at the Ubuntu forums, but here's my tuppence for what it's worth. In Adept or Synaptic, the keywords you should be searching for are Apache, PHP, and MySql. It goes without saying, if you have any databases or sites under your web root, back them up.
  21. You're calling the set_pinn_number method on the $number instance, which you haven't instantiated. You should do this instead: $jimmy->set_pinn_number("345678"); Then, later on: echo "Tell me private stuff: " . $jimmy->get_pinn_number; See how you get on with that.
  22. This is a common issue - it happened to me too. I solved this by completely uninstalling and reinstalling Apache. There is a thread about this issue here. And yes, you can delete the file saying 'it works!'
  23. /var/www is generally the root folder for apache in Linux, do you have that one? And chmodding everything to 0777 is a bad practice to get into; it's not such a big deal on a local machine, but if you do that on a public webserver, you're asking to get hacked.
  24. Simply that the OO way of dealing with exceptions only came in at version 5; I still don't consider it safe to use that method because my code may be used on servers where PHP5 isn't available. Also, performance wise, try/catch isn't particularly quick. Full tutorial on the subject here: http://www.w3schools.com/php/php_exception.asp
×
×
  • Create New...