Jump to content

mesh2005

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Everything 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. I checked the PHP configuration and I can see the session timeout is set to never expire, however; sometimes my application fails to read the Session variables. I keep a logged-in flag in the Session but it is empty after a while. I have to logout and re-login, please advice. Thank you AM
  4. 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
  5. Thanks guys. I found a very useful regex to strip out all non-ASCII chars and this saved the day. Here is it in case anyone needs it: $string = preg_replace('/[^(\x20-\x7F)]*/','', $string);
  6. 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?
  7. 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
  8. I dragged a combbox component from ctrl+F7 to my stage. It has rounded border and I wanna change this to rectangle borders. Also, I wanna reduce the height of each item. Could you please help? I'm using Flash CS3
  9. Is it possible to convert a PDF file to HTML using PHP? or to TEXT? If so how? Thank you
  10. then what should I do after I record the IP?
  11. I'm building an Ad system and I would like to ask how can I detect click-fraud? After the search result is displayed, each click on an ad reduces the user's balance and click-fraud is a real problem that I wanna avoid. Any help?
  12. I found a rewrite rule that some people claim to be working but unfortunately it is not on my machine: RewriteEngine On RewriteRule art/(.*) art.php?name=$1 This goes to art.php but the GET variable is always empty Any idea?
  13. Thank you, I found a rewrite rule that some people claim to be working but unfortunately it is not on my machine: RewriteEngine On RewriteRule art/(.+) art.php?name=$1 This goes to art.php but the GET variable is always empty Any idea?
  14. I'm building a website, currently I have a web page www.domain.com/view.php?id=id, I'm asked to replace this with a page on the form www.domain.com/name , is this something I can do with PHP? or does it need some mod_rewrite rules? or both?
  15. It redirects again to the login form and I get no errors
  16. I've a login form that posts the username & password to a secure link https://mydomain/login_work.php, I wanna redirect back to non-secure version if the login is successful, i.e. redirect to http://mydomain/home.php I added header ("Location: http://mydomain/home.php"); to do the redirection and it works correctly in IE but not in Firefox, please help. Thank you
  17. I built a login form that posts data back to the server using AJAX. The form has a button not a submit button. Browsers don't display the save password dialog box when I click the login button. Is there anyway to instruct the browser to save the password? It works correctly if I change the login from AJAX to the usual POST.
  18. I'm writing a PHP script to query a database table and return the result as XML. If the result contain the letter '&', the XML is corrupted. How can I fix this problem? <xml> <record id='2' text='jjjj&kkkk'>any</record> </xml>
  19. mmm, I'm a bit confused. Now I'm building an ecommerce website for a company based in Australia. They have a merchant bank number and they want to save the payer details (e.g. credit card number) in their database. Which payment gateway should I use? Authorize.net is available in USA only. Please help.
  20. I'm using sessions to track logged in users (I set a variable $_SESSION['v'] to a value after login). I wanna add a "Remember Me" check box on the login page, how can I preserve sessions for logged in users?
  21. I have been having a trouble adding the following rule: RewriteRule ^/dir/.*$ http://mydomain.com/index.html full path to directory dir is: /var/www/dir full path to index: /var/www/index.html I want to redirect all requests of any pages under "dir" to index.html but it seems not to be working. Please help.
  22. I need help to integrate BPay payment into my website. Is there any guide or something?
×
×
  • 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.