Free Web Hosting Forum
Go Back   Free Web Hosting Forum > 000WebHost Services > Customer Assistance
Reload this Page JS/jQuery script fails to load .txt file
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
maddogandnoriko's Avatar
Junior Member
maddogandnoriko is on a distinguished road
 
Posts: 6
Join Date: Jan 2011
Default JS/jQuery script fails to load .txt file - 08-08-2011, 03:09 PM

I am writing a word/name generator. On my local computer the script works fine but when uploaded, the jQuery is not able to load the text file and I get a 404 not found error. The text file is there, I have checked a number of times. Here is the simplified code: http://namepicker.site11.com/test.html


The file does exist: http://namepicker.site11.com/names and there is text in it.
Thank you for any advise,
Todd

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>JQuery-Load Text File</title>
        <script type="text/javascript" src="./js/jquery-1.4.3.min.js"></script>
            <script type="text/javascript">
            function loadXML()
            {
                var file= './names/names.txt';
                $.get(file, function(data) {
                    alert(data);
                });
            }
            </script>
    </head>

    <body onload="loadXML();">
    </body>
</html>
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
lobrc's Avatar
Administrator
lobrc is on a distinguished road
 
Posts: 5,037
Join Date: Jan 2010
Location: http://www.lobrc.net
Default 08-08-2011, 03:33 PM

Txt files aren't supported on free hosting


FREE SCRIPT INSTALLATION SERVICE | PREMIUM HOSTING* | LOBRC.NET

*All packages include Quality Support, Website Builder, Free Site Migration, 30 Day Money Back Guarantee, Official cPanel and Fantastico Autoinstaller.

Plus get 20% off with promo code 000WH20. Contact sales for more information.
Reply With Quote
(#3 (permalink))
Old
Junior Member
zokuchan is on a distinguished road
 
Posts: 7
Join Date: Jun 2011
Default 08-08-2011, 03:36 PM

rename it with a different extension and it will work fine
Reply With Quote
(#4 (permalink))
Old
maddogandnoriko's Avatar
Junior Member
maddogandnoriko is on a distinguished road
 
Posts: 6
Join Date: Jan 2011
Default 08-08-2011, 04:00 PM

So it does...thank you very much.

Have a GREAT day...
Reply With Quote
Reply

Tags
jquery javascript text

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com