PC Review


Reply
Thread Tools Rate Thread

changing text

 
 
Vinnie
Guest
Posts: n/a
 
      7th Oct 2007
having an "upload file" control on my page, how can i change the text
on the button from "browse" into something else?

Thanks

Vinnie

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      7th Oct 2007
Vinnie wrote:
> having an "upload file" control on my page, how can i change the text
> on the button from "browse" into something else?


You can't. The browser decides how the upload control should look, and
there are no properties to control how the browse button should appear.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      8th Oct 2007
I had this example sitting in a code archive I keep.

Never tried it but it might work.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog

<html>
<head>
<title>Browser Button Fix</title>

<!-- By: Matt McHugh //-->

<style type="text/css">
input.hide
{
position:absolute;
left:-137px;
-moz-opacity:0 ;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
}

input.red
{
background-color:#cc0000;
font-weight:bold;
color:#ffffff;
z-index:1;
width:75px;
height:20px;
font-size:10px;
}
</style>

<!--[if IE]>
<style type="text/css">
input.hide
{
position:absolute;
left:10px;
-moz-opacity:0;
filter:alpha(opacity: 0);
opacity: 0;
z-index: 2;
width:0px;
border-width:0px;
}
</style>
<![endif]-->

<script type="text/javascript">

function buttonPush (buttonStatus)
{
if (buttonStatus == "depressed")
document.getElementById("pseudobutton").style.borderStyle = "inset";

else
document.getElementById("pseudobutton").style.borderStyle = "outset";
}

</script>
</head>



<body>

<input type="button" class="red" id="pseudobutton" value="Open File">
<input type="file" class="hide" id="openssme"
onmousedown="buttonPush('depressed');" onmouseup="buttonPush('normal');"
onmouseout="buttonPush('phased');">

</body>
</html>



"Vinnie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> having an "upload file" control on my page, how can i change the text
> on the button from "browse" into something else?
>
> Thanks
>
> Vinnie
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the font of text in richtextbox without affecting thepresent colour of text Gouri.Mahajan7@gmail.com Microsoft Dot NET Framework 1 6th Jun 2008 09:52 AM
Changing the font of text in richtextbox without affecting thepresent colour of text Gouri.Mahajan7@gmail.com Microsoft ASP .NET 0 5th Jun 2008 09:16 AM
Changing Font / Rich Text Formatting / Merging / Text Fileds =?Utf-8?B?RXJpbkpveQ==?= Microsoft Word Document Management 1 23rd Feb 2007 08:53 PM
Changing a text boxes value (from code) of a data bound text box does not work Joshua Ellul Microsoft ADO .NET 2 17th Oct 2003 01:03 AM
Changing a text boxes value (from code) of a data bound text box does not work Joshua Ellul Microsoft Dot NET 0 15th Oct 2003 06:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:50 AM.