Jump to content

mesh2005

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Posts posted by mesh2005

  1. I have a piece of javascript code that loads an XML, parses it and displays the result in a DIV element. This works perfectly in FF but in IE I'm getting the above error. The backend PHP has the following header:

    header('Content-Type: text/xml');
    header("Cache-Control: no-cache, must-revalidate");
    echo "<?xml version='1.0'?>";
    

    A sample of the XML:

    <response>
    <pages>1</pages>
    <current>0</current>
    <comment>
    <date>2008-07-15</date>
    <text>Test comment 1</text>
    <poster>mesh2005</poster>
    <link>http://www.yahoo.com</link>
    </comment>
    </response>

    I added a Javascript alert statement to print the responseText and I can see the whole XML file is displayed correctly.

    Please advice.

    Thank you

    Amir

  2. I setup a virtual host as follows:

    <VirtualHost 192.168.1.1>
            ServerAdmin webmaster@localhost
            ServerName frame
            DocumentRoot /home/username/Personal/framework
            <Directory />
                    Options FollowSymLinks
                    AllowOverride None
            </Directory>
            <Directory /home/username/Personal/framework>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride None
                    Order allow,deny
                    allow from all
            </Directory>
            ErrorLog /var/log/apache2/error.log
            LogLevel warn
            CustomLog /var/log/apache2/access.log combined
            ServerSignature On
    </VirtualHost>
    

     

    I put a header.php in the /home/username/Personal/framework; I created a subdirectory called test and I put a script index.php inside test that has the following code:

    include "/header.php";
    

     

    It fails and I get no such file or directory although the header.php is in the root of the virtual host. It seems that the / is not mapped to /home/username/Personal/framework, how can I fix this?

    Thank you

    AM

  3. Thank you very much for your replies and special thanks to ToonMariner. I need to force the links for some reason, actually the site owner wanna me to do so  ;)

    The Javascript code was not working correctly, I modified it. Here is the code:

    function checkExternalLinks()
    {
    var divs =document.getElementsByTagName('div');
    var links = Array();
    var i = 0;
    for(var x=0; x<divs.length; x++)
    {
    	if (divs[x].className == 'external-links')
    	{
    		links = divs[x].getElementsByTagName('a');  
    		for(i=0;i<links.length;i++)
    		{
    			links[i].target = '_blank';
    		}
    	}
    }
    }
    

     

    Thanks again

  4. Thanks guys for your replies. I wanna allow other symbols too like +/- and all possible symbols that won't cause a problem. I usually get errors when the filename is encoded in way that is not understood by Linux, for example the character (’), this character appears as unknown code in the filename, any help?

  5. I have a PHP script that takes an input from the user and writes a file with the same name as the input

    for example, if the user enters: this is a test a file name is created with the name this is a test.php

    The problem happens when the user enters a value that contains characters not allowed in filenames on Linux distributions, how do I convert the value to make sure that it contains only allowed chars?

     

    Thank you

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.