form questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rotkiv

    form questions

    I would, first, like to know, when someone hits a submit button and a form
    is sent, how could you get that form sent as text instead of an attachment?
    And second, how do you get the user to be able to browse for an image on
    his/her computer and load it to a form?


  • HikksNotAtHome

    #2
    Re: form questions

    In article <vmkkomshrp4u8b @corp.supernews .com>, "Rotkiv"
    <guyinbluepants 2@hotmail.com> writes:
    [color=blue]
    >I would, first, like to know, when someone hits a submit button and a form
    >is sent, how could you get that form sent as text instead of an attachment?
    >And second, how do you get the user to be able to browse for an image on
    >his/her computer and load it to a form?[/color]

    And this has what to do with javascript?

    alt.html comp.info.www.authoring.html

    <input type="file" value="Click Me to find the file">

    Can't answer the first question because its too vague.
    --
    Randy

    Comment

    • David Dorward

      #3
      Re: form questions

      Rotkiv wrote:
      [color=blue]
      > I would, first, like to know, when someone hits a submit button and a form
      > is sent, how could you get that form sent as text instead of an
      > attachment?[/color]

      Not with JavaScript. This is a problem introduced when using mailto: as a
      form action (not the big problem though). Don't use mailto:


      [color=blue]
      > And second, how do you get the user to be able to browse for
      > an image on his/her computer and load it to a form?[/color]

      Again, not with JavaScript.



      --
      David Dorward http://dorward.me.uk/

      Comment

      • GIMME

        #4
        Re: form questions

        this example shows how to hide rows ...

        <html>
        <head>
        <title></title>
        <script language="JavaS cript">
        <!--

        function getCompany(ob){
        if ( navigator.appNa me == "Netscape" ) return ;
        var rt = document.employ eeForm.emp_type ;
        var selValue = rt.options[ rt.selectedInde x ].value;
        if ( selValue == "Permanent" ) HideCompany();
        if ( selValue == "Contractor " ) ShowCompany();
        }

        function ShowCompany() {
        document.all.co mpany_tbody.sty le.display ='';
        }

        function HideCompany() {
        document.all.co mpany_tbody.sty le.display ='none';
        }
        //-->
        </SCRIPT>

        </head>


        <body bgcolor="#efefe f" leftmargin="0" topmargin="0" marginwidth="0"
        marginheight="0 ">
        <form name="employeeF orm" method="POST" action="/whatever">

        <table border="1" cellpadding="0" cellspacing="5" class="body"
        width="700" bgcolor="#efefe f">
        <tr>
        <td valign="top" width=50% >Employee Type:</td>
        <td valign="top" width=50% >
        <select name="emp_type" size="1" onChange="getCo mpany(this);">
        <option value="" selected >Select One</option>
        <option value="Contract or">Contracto r</option>
        <option value="Permanen t" >Permanent</option>
        </select>
        </td>
        </tr>
        <tbody id="company_tbo dy">
        <tr>
        <td valign="top" width=50% >Company:</td>
        <td valign="top" width=50% >
        <input type="text" name="company" size="40" maxlength="100"
        value=""></td>
        </tr>
        </tbody>
        </table>

        </form>
        </body>
        </html>

        Comment

        • Hywel Jenkins

          #5
          Re: form questions

          In article <vmkkomshrp4u8b @corp.supernews .com>, guyinbluepants2
          @hotmail.com says...[color=blue]
          > I would, first, like to know, when someone hits a submit button and a form
          > is sent, how could you get that form sent as text instead of an attachment?[/color]

          Don't use "mailto:" as for your form's action.
          [color=blue]
          > And second, how do you get the user to be able to browse for an image on
          > his/her computer and load it to a form?[/color]

          <input type="file">

          --
          Hywel I do not eat quiche


          Comment

          Working...