Welcome Guest Search | Active Topics | Members | Log In | Register

changing text Options · View
Vinnie
Posted: Sunday, October 07, 2007 10:05:11 PM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 07/10/2007 22:05:11
Date: Sun, 07 Oct 2007 22:05:11 -0000

having an "upload file" control on my page, how can i change the text
on the button from "browse" into something else?

Thanks

Vinnie

Göran Andersson
Posted: Monday, October 08, 2007 2:40:50 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 08/10/2007 02:40:50
Date: Mon, 08 Oct 2007 00:40:50 +0200

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
John Timney (MVP)
Posted: Monday, October 08, 2007 10:54:09 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 08/10/2007 10:54:09
Date: Mon, 8 Oct 2007 09:54:09 +0100

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" <centro.gamma@gmail.com> wrote in message
news:1191794711.305663.59460@y42g2000hsy.googlegroups.com...
> having an "upload file" control on my page, how can i change the text
> on the button from "browse" into something else?
>
> Thanks
>
> Vinnie
>


Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.044 seconds.