0

i hav cod to redirect to two different pages
but one cod is working and one not
one form enctype is urlencoded which is default is working
and other with enctype=multipart is not working
plz help
i googled about this but nothng works
so i came here 4 d sol
can u help me

<html>
  <head>
      <style type="text/css">
#mydiv
{
visibility:hidden;
background-color:green;
position:absolute;top:100px;left:200px;
}
</style>
<script type="text/javascript">
function toggle(obj)
{
var item = document.getElementById(obj);
if(item.style.visibility == 'visible') 
{ item.style.visibility='hidden'; }
	else { item.style.visibility = 'visible'; }
}

</script>
      
    <title>upload</title>
  </head>
  <body>
      
          <form name="forfield" method="POST" action="NewServlet">
          
          <table width="400px" align="center" border=0 >
              <tr>
        <td align="center" colspan=2 >
           Image Details</td>
      </tr>    
<TR>
<TD>Name</TD>
<TD><INPUT TYPE=text NAME="name1"></TD>
</TR>
<TR>
<TD>List Price</TD>
<TD><INPUT TYPE=text NAME="listPrice"></TD>
</TR>
<TR>
<TD>Our Price</TD>
<TD><INPUT TYPE=text NAME="ourPrice"></TD>
</TR>
<TR>
<TD>Discount</TD>
<TD><INPUT TYPE=text NAME="discount"></TD>
</TR>
<TR>
<TD>Total Stock</TD>
<TD><INPUT TYPE=text NAME="totalStock"></TD>
</TR>
<TR>
<TD>Description</TD>
    <TD><textarea name="description"></textarea></TD>
</TR>
<TR>
<TD>Details</TD>
    <TD><textarea name="details"></textarea></TD>
</TR>
<TR>
<TD>Author</TD>
<TD><INPUT TYPE=text NAME="author"></TD>
</TR>
<TR>
<TD>ISBN</TD>
<TD><INPUT TYPE=text NAME="isbn"></TD>
</TR>
<TD>IMAGE NAME</TD>
<TD><INPUT TYPE=text NAME="img"></TD>
</TR>
<tr>
        <td></td>
        <td><input type="submit" name="Submit" value="Submit"></td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
      </form>
      <form name="ind" action="try.jsp" method="POST" enctype="multipart/form-data">
          <TR>
              <div onclick="toggle('mydiv');"><input type="button" 
                                                     value="INSERT IMAGE"/></div>
              <div id='mydiv'><input type="file" name="fil"/><br><br><input 
          type="button" value="ok"/><input type="button" value="cancel"/></div></TR></form>
  </body>
</html>
2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by jwenting
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.