dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: I was moved

  1. #1
    Join Date
    Mar 2004
    Posts
    14

    Wink I was moved

    how do I call a CGI or perl function or even a C function from JS? to open the file then pass the text parameter to it to write, and then close it?

    Also What is it like to insert text in the middle of the document?

  2. #2
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    Is this the ** CGI ** forum?
    I see you found it!

    how do I call a CGI or perl function
    This is pretty easy.
    Your HTML doc will need a <form> to enter the list item and submit it to the server.

    <form action="/cgi-bin/scriptname.cgi" method="post">
    <input type="text" name="listitem">
    <input type="submit" value="Upload list item">
    </form>

    This is all pretty self-explanitory. There are, of couse, other ways to submit the data, but this is the easiest.

    Your script must now read the form data, open a file, and save it.
    It should then return a new HTML doc with the updated list.

    How do you want to do this?
    I write in Perl, so if you want to have a go at writing a Perl script (basic Perl will be pretty simple with your knowledge of 'C'), then I can go though what you wrote and together we can get it up and running.

    Does your server allow you to post CGI scripts?

  3. #3
    Join Date
    Mar 2004
    Posts
    14
    Originally posted by nedals
    Is this the ** CGI ** forum?
    I see you found it!


    This is pretty easy.
    Your HTML doc will need a <form> to enter the list item and submit it to the server.

    <form action="/cgi-bin/scriptname.cgi" method="post">
    <input type="text" name="listitem">
    <input type="submit" value="Upload list item">
    </form>

    This is all pretty self-explanitory. There are, of couse, other ways to submit the data, but this is the easiest.

    Your script must now read the form data, open a file, and save it.
    It should then return a new HTML doc with the updated list.

    How do you want to do this?
    I write in Perl, so if you want to have a go at writing a Perl script (basic Perl will be pretty simple with your knowledge of 'C'), then I can go though what you wrote and together we can get it up and running.

    Does your server allow you to post CGI scripts?
    I don't know its ATT and I know they suse the scripts themselves i'll find out though.

    I know a smidge of perl like there is a #somethingcgi something or other that goes first

  4. #4
    Join Date
    Dec 2002
    Location
    Pleasanton, CA
    Posts
    2,132
    When you respond to a thread, you don't need to use the 'quote' button; it makes the thread awful long. Use the 'post reply' button instead.

    A Perl script starts with this on line 1.

    #!/usr/local/bin/perl
    #
    # Then maybe a comment about your script.

    Which is the path to the Perl Interpreter (Perl is not compiled)

  5. #5
    Join Date
    Mar 2004
    Posts
    14
    ok no quoteing

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