![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Oct 2005
Posts: 54
Rep Power: 3
![]() |
Browse button???
Hi all
I have been having problems regarding styling input areas, submit buttons etc. I followed some people's advice in other forums and I managed to get it going. Now, everything is working EXCEPT 1 : The "browse-for-a-file" button I thought that this button, since it is coded as <input type="file" ...> would be treated like the other input elements ,such as the buttons. BUT THIS IS NOT HAPPENING!!!!! Even if I change, for instance, font-size = 500px, the "Browse" button and the fonts inside the input area remain the same as without styling at all... What am I missing here? Sorry for asking so silly staff ![]() |
|
|
|
|
|
#2 |
|
Professional Programmer
|
Browse buttons can't be styled. It is a woe of many a web programmer. There are plenty of workarounds, such as using images instead, or making use of heavy javascript, but there is no direct way to 'skin' it like a normal button.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Iignotus hits it on the head. Woe it is (for 'compliance' with your style), unless you want to write some code. I've thought of making my own object, but haven't got around to it. If you look at the code,
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="20000" />
<!-- Name of input element determines name in $_FILES array -->
Avatar file: <input id="avatar" name="avatar" type="file" value=""/>
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Oct 2005
Posts: 54
Rep Power: 3
![]() |
Yes, I guess you're right.
Thanx for your time! |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
There's another aspect to it. When you're working client side, you're supposed to be in a "sandbox", no unmediated access to the user's machine. This is an example of implementing that.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Well, you can change the button text, border and background colours using CSS, but that's about it:
[html]<input type="submit" class="funkybutton" id="button" name="button" value="click0rz" />[/html] .funkybutton
{
border-color: #000000;
background-color: #202020;
color: #FFFFFF;
} |
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
'Scuse me, Ooble, but that's a "submit" button widget, not the file-upload widget....
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|