www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] load html file into textarea with <select>

  1. #1
    Join Date
    Jan 2008
    Posts
    26

    resolved [RESOLVED] load html file into textarea with <select>

    Hi there,

    Basicly I have a form, that contains a textarea and a select list. All the items in the select list should have an associated html file. What I want to do is that when a select option is selected the html code from the assosiated html file is pasted into the textarea.

    Anyone can help me construct a code like this?

    Thanks alot,
    AzaraT

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,653
    i know how to do this using 2 files (html and php):

    PHP Code:
    <?php
    $link 
    $_GET['url'];
    $output '';
    $output .= file_get_contents($link);
    echo 
    $output;
    ?>
    the html-file you can see here

    both files must be in the same directory

  3. #3
    Join Date
    Jan 2008
    Posts
    26
    Thanks! Works perfectly

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles