Jump to content

monkeysaurus

Member
  • Posts

    104
  • Joined

  • Last visited

Everything posted by monkeysaurus

  1. jhlaslip's solution (http://www.killersites.com/forums/post/5232/#p5232) should work perfectly, if you add it to the code that you already have.
  2. Just change the extension of the file to .php, that should do the trick if you have PHP on your server.
  3. Use an associative array, and asort instead of sort: <?php $options = array('http://google.com'=>'Google', 'http://www.yahoo.com'=>'Yahoo', 'http://www.hotmail.com'=>'Hotmail'); asort($options); ?> <?php foreach($options as $k=>$v){ ?> <?php echo $v?> <?php } ?>
  4. Or a server side language. For example... PHP: <?php $options = array('John', 'Eric', 'Thelma'); // and 97 others sort($options); ?> <?php foreach($options as $k=>$v){ ?> <?php echo $v?> <?php } ?> Python: options = ["John", "Eric", "Thelma"] options.sort() # Gives you a sorted list, then do your HTML thing as above This could be done in javascript, but I wouldn't recommend it. Javascript might be switched off, and if you're injecting 100 elements into the DOM, that would be awfully slow. The best way to do it would be to put all 100 elements into an array, sort it, build the HTML in a string, then inject the string into the select list's innerHTML. But really, server side is the way to go.
  5. Thank you. Oh, and I've just tested the solution above, and it seems to work.
  6. Would you mind posting the solution? It might be helpful for others searching.
  7. Yes, it should be possible to do this. What you'll want to do is something like this: Email Me! This should work, but I haven't tested it. If you could post what you've got so far, I might be able to help further.
  8. Hi Susie, this is done through the Google Maps API - you can add custom markers using the examples here: http://groups.google.com/group/Google-Maps-API/web/examples-tutorials-custom-icons-for-markers?pli=1 Alternatively, you could - ahem - 'learn from' the javascript they have used themselves, changing the co-ordinates and markers as appropriate.
  9. William, why don't you post what you've done here? Perhaps we can help?
  10. It looks like Dreamweaver is performing some black magic behind the scenes. This thread should really be in the Dreamweaver section of the forum, by the looks of it. (By the way, your database won't be PHP, it will likely be MySql. PHP is one programming language that can be used to connect to databases.)
  11. I'd look into Nusoap, there's a tutorial here.
  12. It will be hidden on a web server that supports ASP, but your's clearly doesn't since the code is showing. What you are trying to do is straightforward using straight PHP; I would recommend that's what you do.
  13. It looks like you have both ASP and PHP running in the same script. It isn't usually possible to do this without a lot of difficulty. Is your server Windows or Linux based? If it's Linux, you won't be able to use ASP. If it's windows based, you might be able to use either php or asp, but probably not both. Also, the code you're seeing in Firefox is being sent to the other browsers - view the source to see. Opera is also displaying the code. I would suggest that you need to look over the basics again - try Tizag or Killer PHP to start with, if you decide to go PHP.
  14. monkeysaurus

    stripos

    Stripos was only introduced in PHP5 - are you still using PHP4?
  15. monkeysaurus

    stripos

    stripos ? Returns the numeric position of the first occurrence of needle in the haystack string. Unlike strpos(), stripos() is case-insensitive.
  16. I'd thoroughly recommend Beginning PHP and MySql: From Novice to Professional.
  17. List 1 List 2 List 3 List 4 Add List Item Remove List Item List 1 List 2 List 3 List 4
  18. monkeysaurus

    php help

    Hi Andre, You need to remove the following line: $result = mysql_fetch_array($result); There's no need for it to be there with the second while($row = mysql_fetch_array($result)). Let me know if that works for you.
  19. Also, have you seen the tablesorter plugin?
  20. What are you using to sort the table? Without seeing any code it's a little difficult to guess why your table is being hidden on sort. If you're hoping to track the open/closed status of the table across page refreshes etc, you'll need to track persistence somehow - cookies would probably be the way to go.
  21. According to the W3C Spec, the only officially supported elements are a, area, button, input, object, select, and textarea; navigation and form elements. Unfortunately, support for this attribute on other elements is at the discretion of browser manufacturers. The more I think about this, why would you want the user to be able to tab to a piece of inanimate text anyway?
  22. I'm afraid I can't install Safari to check...anyone else?
  23. Tabindex is actually an accessibility thing first and foremost; if you're tabbing through a document, you can set the order in which the focus will be set. Hope that makes sense.
  24. Hmm, this isn't working as I would expect it to - I'll do some tinkering and see if I can get it working. For starters though, I would remove that erroneous tag after the first meta tag.
×
×
  • Create New...