FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How to change text in file field?





shamil
I need to change text in file field <input type=file name=browse>. But it is not possible unless we hide it using style and putting text field instead.
But then below problem arises.

I have found same problem from internet. There is solution. But i have to have credit card to subscribe and so on.
Do you know solution to below problem.

It says
I am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice.

Any ideas on why this is happening or a workaround? I'm testing on IE 5+. Thanks!

Code:
<html>
<head></head>
<body>
<form name="test_form" method="post" action="test.jsp">
<input type=file name=browse style="display: none;">
<input type=text name=file>
<input type=button
       style="font-style:veranda; font-size:12px; font-weight:bold;text-transform:lowercase;color:white;background-color:#A2C382;height:22px;border-style:ridge;text-align:center;"
       onClick="browse.click();file.value=browse.value;"
       value="Select a File...">       
<br><br>
<!-- must be clicked twice for the form to submit! -->
<input type=submit
       value="Submit The Form Now!"
       style="font-style:veranda; font-size:12px;">     
</form>
</body>
</html>
virtualpointer
Hi, mate,

I have tested your code in my server with browsers Firefox and Mozilla, it works fine.

I doubt if there is anything wrong with jsp code or not.

Also I deleted the style in your code, tested, found working well.

I think you can try it on another server, if your problem is still there, might be caused by your jsp code.

cheers
shamil
virtualpointer wrote:
Hi, mate,

I have tested your code in my server with browsers Firefox and Mozilla, it works fine.

I doubt if there is anything wrong with jsp code or not.

Also I deleted the style in your code, tested, found working well.

I think you can try it on another server, if your problem is still there, might be caused by your jsp code.

cheers


He is testing on IE 5+.
Related topics
users online, using php and text file
Looking for easy FormMail Script
Visual Basic Tutorial - File I/O in VB: Text Files
styling text string read from plain text file
Change text in phpBB?
Reading from text file into Flash
Deleting certain lines from text file
HELP, reading text file from USB drive in visual basic
download a text-file daily
how to add a text file in mp3 data using java ?
English Dictionary in text file or sql database
Perl how to encrypt your text file contents with Perl
edit option not available for a text file
want to delete first 5 lines in a text file
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.