Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
L

Lea Hayes

@Lea Hayes
About
Posts
96
Topics
42
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    The error log doesn't show any related errors. The access log shows the following (I called the test file t404.php): [05/Feb/2011:00:59:51 +0000] 92.232.71.252 - - "GET /t404.php HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.84 Safari/534.13" This indicates that the header status is being changed, but for some reason the content is not being presented to end-user. The following code is still producing blank output in Chrome, but it IS creating the "test.txt" file with the contents 'Hello World!'. So this indicates that the script is in fact being executed.

    This doesn't make any sense at all to me...

    Linux, Apache, MySQL, PHP help linux php apache database

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    The following works (even though invalid HTML):

    The following doesn't work:

    Thanks,

    Linux, Apache, MySQL, PHP help linux php apache database

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    The working server is using PHP 5.2.17 / The non-working is using PHP 5.2.6. They are both running CGI/FastCGI. Apart from that, phpinfo() shows basically the same thing for both. Many thanks,

    Linux, Apache, MySQL, PHP help linux php apache database

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    It seems to be the very first call to header that fails. It fails even if I stick an echo before it (and echoed text is not displayed). If I used echo 'x'; die; it displays x, but obviously doesn't attempt to change headers. Do you know if there are required permissions to use header function? Thanks again

    Linux, Apache, MySQL, PHP help linux php apache database

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    Hi Peter, Thank you for your response. I have double-checked and there is no output (not even whitespace) above. The test script is working fine on other web servers, but is failing on just this one. I cannot make any sense of it. And there are no errors being logged on the server. It is a shared hosting Linux package with FastHosts (if this makes any difference). Many thanks, Lea

    Linux, Apache, MySQL, PHP help linux php apache database

  • Problem with PHP - FastCGI - Headers
    L Lea Hayes

    Hey guys! I am working on a dynamic website which fetches content from its database. When the content for a specific request cannot be found I would like to display a custom 404 page. I have added the following lines at the top of my 404 script for SEO purposes:

    if (substr(php_sapi_name(), 0, 3) == 'cgi')
    header("Status: 404 Not Found");
    else
    header("HTTP/1.1 404 Not Found");

    This has been working fine for me, but the website that I am working on at the moment is causing me problems. It is an Apache server running PHP 5.2 (FastCGI) on Linux CentOS. Instead of showing the error page I get Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. In an attempt to isolate the problem I have created the following standalone page for testing this. This very simple script is failing:

    Any help would be greatly appreciated! Kind regards,

    Linux, Apache, MySQL, PHP help linux php apache database

  • XSLT and the xml:base-uri attribute
    L Lea Hayes

    Hey all, Are the following three XPath expression equivalent?

    resolve-uri(@url)

    resolve-uri(@url, base-uri(.))

    resolve-uri(@url, static-base-uri())

    Cheers! Lea Hayes

    XML / XSL

  • RelaxNG Attribute Override
    L Lea Hayes

    Hi guys! I have a RelaxNG schema which defines a group of attributes called "common-attrs". Amongst these common attributes is the "xml:id" attribute which can be optionally applied to all elements within the schema. Somehow, I need to make an exception to this rule. There is one element where all of the common attributes apply, but the "xml:id" attribute is required. How can I make an exception to this rule without having to manage to near identical common attribute groups? Many thanks, Lea Hayes

    XML / XSL

  • Render Vista Style ComboBox
    L Lea Hayes

    Hi, I am afraid that I was unable to find a solution to this problem. So I resorted to just having two styles of combo box in my program, doesn't look as good as it could have, but nevertheless, functional. If you do manage to find a fix, it would be great if you could post it here as this is something that I too am still interested in. Many thanks, Lea Hayes

    C# question regex tutorial

  • Request - Ability to attach images to message board threads
    L Lea Hayes

    What if the use of images was restricted to the more serious areas of the forums. For example, no image upload support in the general discussions area.

    Site Bugs / Suggestions

  • Request - Ability to attach images to message board threads
    L Lea Hayes

    There are lots of useful reasons to allow image posts: - Diagrams and/or sketches to describe an idea or problem. - If you have some form of visual defect in your program, it is much easier to show a picture of the problem than to write endless posts just describing it. I am sure that there would be a way to limit the file size to something reasonable. Perhaps there could be other limitations as well, images can only be posted by the person who started the thread. Content of images could be a problem to those who abuse the forums. Perhaps images should be blocked by default until they are approved by a moderator? And once a person has been approved once or twice, in the future their images are no longer blocked by default?

    Site Bugs / Suggestions

  • Request - Ability to attach images to message board threads
    L Lea Hayes

    It would be fantastic if it were possible to attach images to message board threads; even if the maximum size was limited.

    Site Bugs / Suggestions

  • Minor Bug in Forums
    L Lea Hayes

    I am going to attempt to reproduce the error on this thread. When topic is posted with ignore HTML tags, and it is modified, the modified HTML tag is plain as well Okay...it does not appear to have presented itself in this thread. Take a look at this one: http://www.codeproject.com/script/Forums/View.aspx?fid=1640&select=2778712&tid=2778712

    Site Bugs / Suggestions help html com tools question

  • JavaScript Selection/Range Problem [modified]
    L Lea Hayes

    Hi, I am working on a custom rich-text editor using contentEditable. When the return key is pressed I am preventing the default action, and inserting a line break tag to ensure that the browser doesn't create a paragraph element. In IE I have this working great, but in Chrome, Safari, and FF the selection doesn't appear to update correctly. The break tag is inserted, but the input caret does not move. For test purposes I have replaced the break with a horizontal rule. Upon pressing enter, the caret should move after the HR element, but it doesn't. window.onload = function(event) { document.observe('keydown', doc_keydown.bindAsEventListener(document)); } function charCode(event) { return typeof event.which !== 'undefined' ? event.which : event.keyCode; } function doc_keydown(event) { var range; var code = charCode(event); switch (code) { case 13: // return if (document.selection) { // IE range = document.selection.createRange(); range.pasteHTML("<hr />"); range.moveEnd("character", 1); range.moveStart("character", 1); range.collapse(false); } else { // FF, Google Chrome range = window.getSelection().getRangeAt(0); range.deleteContents(); var newNode = new Element("hr"); range.insertNode(newNode); range.setStartAfter(newNode); // Doesn't work from here down. range.setEndAfter(newNode); range.collapse(false); } break; default: return true; } event.stop(); return false; }

    Some initial text - Edit Me!

    Many thanks, Lea Hayes

    modified on Friday, October 24, 2008 6:39 AM

    Web Development javascript help question announcement

  • contentEditable FireFox
    L Lea Hayes

    Hi everyone! I am experimenting with a rich text editor by using the contentEditable feature of HTML. I have the basic editor working, but I have run into a serious issue in FireFox. When you hit the return key, a second element of the same type is created...which is good. BUT If the element which was being typed in had an ID attribute, that ID gets duplicated into the new element. In fact, all attributes get duplicated into the new element. Does anybody know how I can disable this default behavior? Or at least with regards to custom attributes? If only there were some way to manually determine how elements are created... Many thanks, Lea Hayes

    Web Development html help question

  • Generate missing XML
    L Lea Hayes

    Hi, Thanks for your advice! This has helped me to solve the problem! Best regards, Lea Hayes :-D

    XML / XSL xml html question

  • XML + XSL in a Client Browser
    L Lea Hayes

    Hi, That's fantastic! I am working on Ajax stuff at the moment, I didn't realize you could do XSL transforms with JavaScript. Thanks for that! :-D Lea Hayes

    XML / XSL xml csharp asp-net sysadmin beta-testing

  • C# Code Help
    L Lea Hayes

    Okay... Personally I would create some sort of a class which contains the data I want to access.

        public class MyDataTag
        {
            public MyDataTag(DataRowView dataRow)
            {
                itemID = dataRow\["NodeId"\];
                text = dataRow\["EnNode"\].ToString();
                otherInfo = dataRow\["OtherInfo"\].ToString();
            }
    
            public object itemID;
            public string text;
            public string otherInfo;
        }
    

    Then I would replace the tree node creation code with:

            TreeNode node = new TreeNode();
            MyDataTag dataTag = new MyDataTag(dv\[i\]);
            node.Text = dataTag.text;
            node.Tag = dataTag;
    

    And your AfterSelect event handler:

            MyDataNode itemData = e.Node.Tag as MyDataNode;
            if (itemData != null)
            {
                string test = string.Format("ID: {0}  Other Info: {1}", itemData.itemID.ToString(), itemData.otherInfo);
                ListViewItem newItem = listView1.Items.Add(test);
                newItem.Tag = itemData;
            }
    

    :) Lea Hayes

    C# csharp database linq graphics help

  • Generate missing XML
    L Lea Hayes

    Hi, I am using an XSL file to format a document for display on my website. A content block has a title, and contains HTML content. The references section always appears at the bottom of the rendered document (regardless of its location within the XML file). ... ... In the XSL I want to create a contents for the document. I have managed to get the content sections listed in the contents. But I find myself duplicating a large chunk of XSL just to add the references section to the contents. Is there a way to do something along the lines of the following? concatenate ?? Get list of content nodes "/mydoc/content" ?? with ... so that I can: and also: Many thanks, Lea Hayes

    XML / XSL xml html question

  • C# Help
    L Lea Hayes

    How have you attached the database to your tree view control? You can add an event handler to the tree view to intercept when the currently selected node has changed. Then, depending on how you've got things set up, you could possibly: #1 - Look up the required data from the database by the ID associated with a tree view node. #2 - Extract the information from the selected tree view node. Don't forget that you can use the 'Tag' property of tree view nodes, so you could associate your data using the Tag property. Then it is very easy to access your information. In your selected node changed event handler you can simply populate your list view from the associated 'Tag' property, or even acquire additional information from your data source using the information provided by the 'Tag' property. I hope that I have understood you correctly, and that this is of some use. :) Best regards, Lea Hayes

    C# question csharp database help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups