Search results

  1. M

    Javascript change style attribute of span

    Since you're already using Firefox, install Greasemonkey and write it as a Greasemonkey script. An additional advantage is it will get invoked automatically whenever you visit a facebook page.
  2. M

    Splitting a string and sql insert as array?

    The relational model for a sequence is to store the position within the sequence along with the items at that position. With multiple sequences stored in the same table, you'd also have an identifier for the sequence. Depending on your needs, it might make more sense to store the entire sequence...
  3. M

    PHP registration script - Username check does not work

    From this, we see that you're quoting the parameter (don't) and passing too many parameter values. One is defined, you pass eight. You should be able to figure this one out. You only want certain entries from the input array, those that are named parameters. Thus you intersect the input array...
  4. M

    serial port

    The serial ports (/dev/ttyS*) aren't world readable, so no. Besides, how do you plan on connecting your device to the servers? If you mean to connect your device to your computer rather than to the servers, then that you're using a serial port doesn't matter because serial ports are never...
  5. M

    Server side includes

    Server side includes were introduced by NCSA HTTPd sometime before 1997, the precursor to Apache's httpd. Actually, considering Apache has supported SSI since at least 1996, NCSA HTTPd must have had it before that. IIS includes support for SSI, but ASP is an entirely separate technology...
  6. M

    PHP registration script - Username check does not work

    Print the statement (with PDOStatement::debugDumpParams) and the parameter values. Try the query in phpMyAdmin. Also print the results of PDOStatement::errorInfo. PDOStatement::execute doesn't like getting more values than there are parameters. That's probably the source of this error. In this...
  7. M

    Zend optimizer

    I don't know how I can be much clearer, though if you were still confused you could always (as it says in my sig) follow the links.
  8. M

    Zend optimizer

    Yes. Remember, you can always search for answers
  9. M

    Why are other programming languages used when all I need is HTML please?

    Except that I've seen CGI apps written in C++ and C, and, until Flash came along, Java applets were once fairly common embedded in webpages. Perl, Ruby and C# are quite often used for both. JS, PHP and even RTML are very much programming languages. Granted, there is a difference in common usage...
  10. M

    PHP array help

    For our sake, use , [html] or [code] tags (as appropriate) to delineate code and make it readable. The error and source code comments tells you exactly what's wrong: $robots isn't an array, which can happen if no "robots.txt" file is found. If a value isn't what you expect, debug. Either use...
  11. M

    Why are other programming languages used when all I need is HTML please?

    HTML isn't a programming language, it defines the structure of a document. Programs are ordered instructions to be executed; they describe how to compute something.
  12. M

    Javascript onload

    Take a closer look at the document descalzo linked to. Setting some attributes on form input elements using setAttribute won't work in IE. Instead, use the attribute-mapped JS properties: element.type = 'hidden'; element.name = 'foo'; This is part of the larger problem IE has with...
  13. M

    Hover for information display. || CSS

    Not so much. And tables for layout? Honestly. As for the effect, pure CSS menus and Suckerfish menus are a better illustration.
  14. M

    OO JS Issue

    The first argument to bind is an object. The second is a function or name of an object property that's a method. var thing = { foo: function () { return this.value ='foo'; }, function bar() { return this.value = 'bar'; } }; function baz() { return this.value =...
  15. M

    Python - GET and POST?

    Indeed there is. #!/usr/bin/env python import cgi, cgitb cgitb.enable() print "Content-type: text/html" print print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">' print '<html><head><title>Python CGI</title></head><body>' form =...
  16. M

    Need to design a 'post comment page'

    Sensitive information such as user credentials shouldn't be scattered across multiple scripts; they should be isolated in a single script. There's an unnecessary array here. You can either use: $info = array( ":com"=>$_POST['comment'], ":name"=>$_POST['name'] ); [...] $sth =...
  17. M

    Unable to pull web page after server move.

    I can confirm your script works on Lotus, making a request to another page on Lotus (with minor alterations to support HTTP authentication). Make sure error reporting is set to the chattiest level (E_ALL). It's possible there's a warning that simply isn't displayed.
  18. M

    OO JS Issue

    That's pretty much it, though there are different forms. You need a closure to bind the object to the method. More generally, you can write a function to create this binding: function bind(self, meth) { if (typeof meth == 'string') { meth = self[meth]; } return function () {...
  19. M

    CSS position problems...

    It doesn't quite work in FF or Chrome; try resizing the window. The problem you see has the same cause as in IE: the window has a resize handler that calls NFFix that ... calls inputText.unload, which appends form inputs rather than placing them back in their original DOM position. There's...
  20. M

    PHP require... what is wrong?

    To have the PHP processor handle a file, it should have an extension of "php", not "html". If whatever tutorial or book you're studying doesn't mention this, find a new one. If you aren't learning from a tutorial or book, find one.
Top