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)
Old
maddogandnoriko's Avatar
maddogandnoriko maddogandnoriko is offline
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
(#2)
Old
lobrc's Avatar
lobrc lobrc is offline
Administrator
lobrc will become famous soon enough
 
Posts: 5,112
Join Date: Jan 2010
Default 08-08-2011, 03:33 PM

Txt files aren't supported on free hosting


If you're having problems with your account, please submit a ticket from your members area.

--

Free Script Installation Service
Reply With Quote
(#3)
Old
zokuchan zokuchan is offline
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)
Old
maddogandnoriko's Avatar
maddogandnoriko maddogandnoriko is offline
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

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com