#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    30
    Rep Power
    14

    write a file using javascript


    Hello....
    Is there way to open a new file ande write into it using the javascript at the client side.

    I would also like to know how a cgi perl script can
    accept a value returned from a javascript function at
    the client side.
    Please help!

    Thanks...
    Dups
    Last edited by Dups; May 28th, 2001 at 05:16 AM.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    chennai
    Posts
    18
    Rep Power
    0
    hi,
    as for as i know you cannot write to a file using javascript.

    i shall give you the php coding for ur second question .

    <script language="javascript">
    <!--
    function all()
    {
    art.all.value = 1;
    art.submit();
    }
    -->
    </script>
    <body>
    <form name ="art" method="post" action = .........>
    <input type="hidden" name= "all" value = <?php print "$all"; ?>">
    print "$all";
    <input type="text" name = tex onclick="all();">
    </body>

    when the script gets loaded $all will print 0 and if you click on the text field the form will get submitted and the php variable will have 1 as its value
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    30
    Rep Power
    14
    Thank u very much Prasanna.

    I haven't tried the code that u sent me.
    I was searching for this thing for a long time.
    I got no help. I was getting desperate.

    Lots of thanks to u.
    Dups

IMN logo majestic logo threadwatch logo seochat tools logo