Search Results

Search found 4 results on 1 pages for 'jcoc611'.

Page 1/1 | 1 

  • Telling between a "natural" HTTP 404 and a PHP Generated one

    - by JCOC611
    So I have a file that should never be accessed by a user directly, but included in another PHP file. If the file is called directly, it generates a HTTP Status 404 Not Found to trick a possible attacker that such file doesn't exist. However, if the hacker could tell that the 404 was generated by PHP or is not "natural" then the whole point of the header would be lost. So is it possible to tell whether the 404 was generated by the server naturally (because the file really doesn't exist) or by a PHP code? PS: I know this question might seem pretty weird lol

    Read the article

  • A depth (z-index) nightmare.

    - by JCOC611
    The best way to illustrate this question is with...a Fiddle! Before you visit the fiddle, notice there is text behind the grayest element, which is on top of a light gray element that has a border. There is a main wrapping div (root), and two wrapping divs inside (wrap1 and wrap2). The problem here is that I need the content of wrap2 (highlight) to be behind the content of wrap1 (text), but in front of the background of the root. This, however, must not change: The HTML, the elements and wraps should be left untouched. Excluding the order of wrap1 and wrap2 inside root. The highlight div must keep the absolute positioning. Styling highlight with background-color is not an option, the existence of highlight is a must. PS: the italics reference the id's of <div>s in the fiddle example, for whomever was too lazy to visit it.

    Read the article

  • How to get the innerHTML of a XML document (AJAX)?

    - by JCOC611
    After an AJAX query, a XML file is returned. I'm able to "parse" that file, but when it comes to getting the "innerHTML" (or in this case "innerXML" lol) of an element, I fail. If the XML element, let's say "content", only contained text I could do: content.childNodes[0].nodeValue (assuming that content references the XML element "content"). But that element contains other elements: <stackoverflow reason="tribute to this page"> <content> <div><span><p>Some more HTML elements</p></span></div> </content> </stackoverflow> I need to copy the content of <content> to an existing <div> in the page, how could I do that? Ex. myDiv.innerHTML = content.innerHTML;

    Read the article

  • Browser Detection, do's and don'ts. Is this ok?

    - by JCOC611
    So, I understand that browser detection (ie. navigator.userAgent) shouldn't be used to decide which object method/property to use; yet, I want to set some simple CSS with JavaScript depending on the browser. However, it's not enough to justify a completely new StyleSheet. So is it OK if I use Browser Detection to decide what CSS to apply to an element? EDIT Ok, let's be SPECIFIC. I'm talking about a text-shadow inside a button (<input type="button"/>) The text inside the button isn't vertically centered in all browsers, so I tweak this with JS depending on the browser.

    Read the article

1