You are here: Re: HTML problem « PHP Programming Language « IT news, forums, messages
Re: HTML problem

Posted by Johnny on 10/01/06 06:53

"Tim Roberts" <timr@probo.com> wrote in message
news:n51uh2t80mi6s7oirbit39gcjbac6nclsm@4ax.com...
> "Johnny" <removethis.huuanito@hotmail.com> wrote:
> >
> >> :) I tried it before posting here :). The background of the
> >> browse button doesn't change.
> >> ...
> >> <input name="fileUpload" type="file" class="subtitle" title="GOGOGO" />
> >> </snip>
> >
> >he's referring to a file browse button so the type should be type="file"
> >just as was said.
> >unfortunately changing the background on a file browse input deosn't
change
> >the button color in most browsers.
> >as of right now a solution may be found in the 10th hit searching google
for
> >"html file browse button background-color" without the quotes.
>
> Well, its not really a "solution", but it does at least confirm that the
> OP's task is impossible in the general case.

You are so right, I guess I was suggesting that what solutions are available
can be found by googling. For instance look at this code snippet I found
which works in IE using javascript but it doesn't work in FF:

<html>
<head>
<style>
<!--
#button{
/* browse button styling... */
background-color: red;
}

#fileselect{
visibility:hidden; /* hides the input file tag from view */
} -->
</style>
<script type="text/javascript">
function transferfilename(sfilename) {
document.getElementById('fname').value = sfilename;
}
</script>
</head>
<body>
<form id="f1" method="post">
<input type="file" id="fileselect"
onchange="transferfilename(this.value);">
<input type="text" id="fname" value="">
<input type="button" id="button" value="Browse..."
onclick="fileselect.click()">
</form>
</body>
</html>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация