Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Error

  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error

    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.
    Attached Files Attached Files

  • #2
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    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.

    Basscyst
    Helping to build a bigger box. - Adam Matthews

  • #3
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Ok

    I'm a newbie and i don't know how you use to do.

    Tank you for the sugestion.

    Code:
    <HTML><HEAD>
    <style type="text/css">
    <!--
    .invisible {-moz-opacity: 0;  filter: alpha(opacity=0);}
    .invisible2 {-moz-opacity: 0%;  filter: alpha(opacity=0);}
    -->
    </style>
    
    <script>
    	var fi
    	function enviar(){
    		window.document.formup.action="insere_img1.asp"
    		window.document.formup.submit();
    	}
    
    	function search(){
    		fi.click();
    	}
    	
    	function Init(){
    		fi=document.getElementById("file_name");
    	}
    </script>
    <TITLE>Teste</TITLE>
    </HEAD>
    <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" >
    </form>
    </div>
    <br><br>
    <input type="button" name="bt2" size="1" value="Search" onclick="search();">
    <input type="button" name="bt1" size="1" value="Send" onclick="enviar();">
    
    </body>
    </HTML>

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

    ....Willy

  • #5
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ok.

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •