Results 1 to 3 of 3

Thread: .txt --> html

  1. #1
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool .txt --> html

    I'm a intermediate web designer skilled in html and css. I've been trying to learn as much java script as possible and am doing good so far. Currently I'm working on a project for my school. I'm attempting to make some what of a CMS by using .txt files that the administrators can edit themselves.

    I found a script on here : http://www.dynamicdrive.com/dynamici...ajaxticker.htm

    This takes the html content of a .txt file into a ticker. I've been trying to pick it apart to the bare necessities of importing the content. aka: with out the ticker functions.

    Any help?

    Many thanks, J5.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    I'm not very clear here what you want. Do you want to know everything that's going on with the JavaScript file or do you want to be able to output data from a text file or something else? If it's javascript I'd try it in the javascript forum. Outputting data from a textfile can be down with php with this code and with a number of other ways.

    PHP Code:
    <?php  
    $textfile 
    "textfilename.txt"
    $read fopen($textfile'r');
    $rad fread($read99999999999);
    echo 
    $rad;
    fclose($read); 
    ?>

  3. #3
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,627
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    They have used ajax for getting the content from the server and put the same in a container. This is a straightforward part as far as the ajax is concerned. Need not be always .txt files but you can even download a .htm/.html file for that matter.

    You'll get a fairly good idea about the ajax from the following links:

    https://developer.mozilla.org/En/AJAX:Getting_Started
    http://www-128.ibm.com/developerwork...jaxintro1.html
    http://www-128.ibm.com/developerwork...wa-ajaxintro2/

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •