Search results

  1. M

    Server Error in '/' Application

    Read "Basic Problem with ASP.Net". Searching is good.
  2. M

    Make this type of 404 page

    As mentioned in a previous post and the linked documentation for ErrorDocument (there's a reason I wrote my sig; note the bits about reading links and answering questions), use a local URL path to keep from redirecting. By prefixing the error document URL with "http://bit.ly", you're causing a...
  3. M

    javascript alert help

    Another alternative is to use a widget provided by a JS library, such as jQuery's UI/Dialog or Prototype's Window and Dialog classes.
  4. M

    Make this type of 404 page

    When the ErrorDocument directive is given a local URL path, it shouldn't redirect (see the ErrorDocument documentation for details). What are the configuration lines from your .htaccess that mention the error documents by URLs? For example, list all ErrorDocument and any applicable RewriteRule...
  5. M

    Any news on SOAP support?

    Check out the SOAP poll thread and vote if you haven't already done so. Adding PHP extensions on the free hosts is a low priority. Whether it will happen depends on how much other work the admins have.
  6. M

    PHP and DOM

    Sanitizing $service isn't necessary, but better safe than sorry, as we say (looks like there's something similar in French: "prudence est mère de sûreté"). Injection attacks can only happen when a user has control over data. If only site administrators and developers can set the value of the...
  7. M

    C++ ncurses help

    That's better. You still have a few magic fives, but they're easily taken care of by adding a "Die::sides" field and using that instead. Class Control seems a needless indirection, and Die::set() should throw an exception rather than calling exit(). Better yet, make Die::set() protected so you...
  8. M

    Ajax Login ajaxForm() issues

    Where's the fun if I give away all the answers? In truth, your code was advanced enough that I figured you only needed a nudge to work out a solution, and you did. Besides, I was curious to see what you'd come up with. It is an issue if content doesn't exist when the page is loaded, such as...
  9. M

    Ajax Login ajaxForm() issues

    The string format was a matter of readability. Did you work on the problem with #logOut not existing when the argument to $(document).ready(...) is invoked?
  10. M

    Ajax Login ajaxForm() issues

    When the page loads, #logOut doesn't exist, so the call to $('#logOut').ajaxForm() fails. Why use double quoted strings when you're not using variable interpolation? Why use double quotes for HTML attributes in a double quoted string, which requires escaping the quotes, when you can use single...
  11. M

    Php directory help

    The issue isn't file type, it's the path. The values returned by readdir() are file names, not paths... so when you pass a value from $dirArray to filetype and filesize, you're passing just the name of the file. If there happens to be a file in the current directory with the same name, the...
  12. M

    C++ ncurses help

    Learn to use whatever debugger you have available. Break on Die::draw() and you'll see that wins[win] is NULL. Keep reading for an explanation. Initializing globals happens before main() is invoked, which means the createNewWin calls happen before initscr() is called. Either move the...
  13. M

    Need php help for registering

    "INSERT INTO table SET column=value, ..." is valid syntax, though I personally prefer the INSERT INTO table (columns) VALUES ... form.
  14. M

    Need php help for registering

    Protip: use the and [HTML] tags (when appropriate) rather than plain tags. Use strings for indices rather than bare words. Note this doesn't apply when you're interpolating variables into a string, unless you're using complex syntax ("{$...}"), in which case it does apply. Your code is...
  15. M

    PHP and DOM

    This is susceptible to SQL Injection via $_POST['utilisateur'] (and thus $ut and $_SESSION['util']). Either sanitize the user input or (better yet) use prepared statements. In the code you posted, $service should be safe because it's not user input. Of course, should a user find a way to set the...
  16. M

    Getting text out of a textarea

    You mean an input/text field/form control? A textarea is a different form control than what you're using. To change the text in another kind of element, you can get a text node child of the element and assign to the text node's nodeValue property: <span id="display">0xDEADBEEF</span> <script...
  17. M

    Simple java script help

    The other way is to define solely the structure of the document using HTML, then apply layout using a style sheet. What follows is an alternative implementation of both the script and document style. You can reuse it on any number of pages. For the script to work, you start an input's name...
  18. M

    Simple java script help

    Instead of a giant "if" sequence, try mask-and-shift (or shift-and-mask). For one thing, octal literals won't bite you on the ass (011 is 9 decimal). <input type="radio" name="bit410" value="7" onclick="count()">111 = ... <input type="radio" name="bit410" value="6" onclick="count()">110 = ...
  19. M

    CSS Formatting issue

    Did you notice the conditional comments to target <= IE 7? No mussing up presentation in FF, Safari, Chrome, Opera or what-have-you.
  20. M

    CSS Formatting issue

    You can use the empty-cells CSS property to put a border around empty cells. <= IE 7 don't support it, but it sounds like that isn't an issue. What doctype are you using? A hackish way of doing it is to set a right padding that's the width of the scrollbar along with the overflow-x property...
Top