View Full Version : Error

12-17-2004, 05:15 PM
I try do do a select file box and i want it hidden. to do this i hidden the form and insert 2 buttons the button Search is to select the file and the second button is to send information to another page.

When the user click in the second button i try to send the form but happen a erro, can somebody help me please.

I attach my file if someone can see them and talk me how is wrong i will be gratefully.

12-17-2004, 05:37 PM
Most people are not going to want to open a zip file from a one time poster, myself included (no offense it's just commen sense) Put your code directly in the post inside [ code ] tags [ /code ] and you will be more likely to recieve a response.


12-17-2004, 05:49 PM
I'm a newbie and i don't know how you use to do.

Tank you for the sugestion. :thumbsup:

<style type="text/css">
.invisible {-moz-opacity: 0; filter: alpha(opacity=0);}
.invisible2 {-moz-opacity: 0%; filter: alpha(opacity=0);}

var fi
function enviar(){

function search(){

function Init(){
<BODY leftMargin=0 topMargin=0 marginwidth="0" marginheight="0" onload="Init();">

<div class="invisible" id="browseLayer" style="position:absolute; width:100px; height:10px; z-index:15; left: 0px; top: 0px; visibility:hidden;">
<form name="formup" method="post" enctype="multipart/form-data" target="_blank">
<input id="file" name="file_name" type="file" size="1" >
<input type="button" name="bt2" size="1" value="Search" onclick="search();">
<input type="button" name="bt1" size="1" value="Send" onclick="enviar();">


Willy Duitt
12-17-2004, 08:16 PM
What you are doing is trying to circumvent all of the browsers security policies...

Firstly, Other than input type=hidden, you can not hide inputs and expect them to be submitted when the form submits... Because, they won't!!

Secondly, You can not nor do you have access rights to manipulate input type=file... Trying to use another button to assign on onclick event to this element only serves to temporarily assign a value but that value is not registered and will be removed prior to submitting the form...

Thirdly, Why are you doing this?? Other than an excercise in futility, this seriously borders on exploiting a user by changing expected and inherent browser behaviors...

Anyways, this can not be done... Use the form elements as they are intended...


12-20-2004, 12:59 PM

I Hidden because i use a flash movie and in some time the user in flash movie can upload a file but flash hasn't the select file box and i call a method in htm file the user select the file and after i want to submit the form when the user claick upload image in flash movie.

Anyone cans suggest me something to solve my problem.