Search results

  1. M

    mod_rewrite helo

    Any solution will rely heavily on RewriteCond. You check %{HTTP_HOST} for a leading "www.", and you can use the "-d" and "-f" to test for directories and files, respectively. Try this: RewriteEngine on # external redirect; we want the visitor to see that "www." is removed RewriteCond...
  2. M

    Hide spread firefox in firefox but show in IE

    References: Quirksmode MSDN Wikipeda Valid downlevel-revealed conditional comments To Be Clear (on Conditional Comments and Resets) (for another point of view)
  3. M

    [JS] Javascript/jQuery fadetoblack-fadetowhite help

    Here's a basic example. I'll set up a live test page and post a link later. <div> <div id="content">...</div> <div id="loading"><div class="vcenter"><img src="/images/loading" alt="loading..."/></div></div> </div> <script type="text/javascript"> $('#loading')[0].fadeSpeed=500; function...
  4. M

    Positioning help

    To get #panel to contain floats, use #panel { overflow: auto; }. Explicitly altering the height is brittle and will break if the font size changes or if the text ever takes up more than one line. To get more prompt help, include a link to a live version of your minimal test case.
  5. M

    php help restrictions to the file upload

    When asking about code, be explicit about the behavior you expect and the behavior you get. "It doesn't work" tells us nothing. If you can, use something like Fileinfo to identify file type. An associative array is more efficient and (IMO) easier to read than a series of string...
  6. M

    Delete break spaces php

    file() doesn't have problems with newlines. It doesn't read any content, it only opens the connection.
  7. M

    Javascript Random qoute

    The JS solution you posted has 3 disadvantages: higher network utilization, requires the browser to support JS and requires editing the source to add or change quotes. You could pick the quote server side. Advantages: works if JS is disabled or not supported by the browser and uses less...
  8. M

    homemade comments feature

    Single quotes delineate string literals, so this query is comparing the string 'thread' to (e.g.) 'test', which will always fail and thus return no rows. The only time it would succeed is if $thread == 'thread', in which case every row from `comments` would be returned. Use either back quotes...
  9. M

    Does Anyone Know SQL

    When posting code, use the [code], [html] or [php] tags as appropriate. If you're generating an SQL query that isn't working, check the generated statement. If you don't have a PHP debugger (e.g. Eclipse+PDT+XDebug), add some scaffolding to the script to print the statement . You'll see...
  10. M

    Virtual Folders with mod_rewrite

    Make sure you include a "RewriteEngine on" directive in your .htaccess file before any other mod_rewrite directives.
  11. M

    a:active long URL problem

    There is no ":current" pseudo-class in CSS1, 2.1 or 3. Are you using jQuery?
  12. M

    Login Secure Pages

    It's still unclear exactly what you need. Do you want to know how to handle login? How to store user data? How to ensure only a user (or admin) can view the user's data (i.e. authorization)? Something else? If you don't know what help you need, no one else can tell you.
  13. M

    Login Secure Pages

    There are some issues with cookies: they're blocked or disabled on some browsers, they shouldn't store sensitive information and they can be set client side, so they can't be trusted. Better use sessions (assuming you're using PHP; you should always state the software environment). Note that...
  14. M

    Cross Broswer Help?

    Take a look at my take (and the style that achieves the effect). It works for IE >= 7, but not IE6. It relies rather more on absolute positioning than I usually like, but it's fairly clean.
  15. M

    Cross Broswer Help?

    Browser detection and serving different content for different browsers is a bad route. If you can't get the same CSS to work on IE, the least evil route is to use conditional comments in the web page to give IE a different style sheet. At least that way, the content is (essentially) the same...
  16. M

    Need help about javascript

    It's amazing how many bugs are caused by typos. Even with modern IDEs' code colorers, auto-indentation, auto-completion and name checkers, they still happen. For instance, no IDE I know of could have caught your typo. Firebug is frickin' awesome.
  17. M

    Need help about javascript

    Use Firebug (2) with Firefox, Safari 4's built-in debugger or Visual Web Developer Express with IE (Opera's dragonfly is still in development) to debug JS. After viewing and clicking the links, the test page will log two errors in the browser's error console. For Safari: ReferenceError: Can't...
  18. M

    Cron on Lotus

    I tried my cron test script, but it didn't appear to run. The job was scheduled in crontab.
  19. M

    Cross Broswer Help?

    What version(s) of IE? Always describe the software environment. Also, always explicitly describe what you want and what you get so we don't have to intuit what's "proper". The fragmentary conditional comment: [if IE 6]> <style type="text/css"> html { overflow-y: hidden; } body {...
  20. M

    Suggestions for best way to build a MySQL table from raw data?

    From the form source, the message should be stored in "notebody", not "body". As for the other fields, they might be dynamically generated when the page is, in which case the above probably won't work. What your applet would need to do is request the page, parse it and extract the field names...
Top