[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 02-04-2006, 12:02 PM   #1 (permalink)
NamePros Regular
 
hairyfreak's Avatar
 
Join Date: Dec 2005
Location: Derbyshire, UK
Posts: 887
164.35 NP$ (Donate)

hairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nice


Help with customising a form - a lot harder than you would think!

Hi,
I really need some help at the moment. I am in the process of writing an image upload script for an image hosting site I will be starting. However, I need to change the looks of the default input areas to fit in properly with the template. Now, I know that it is extremely easy for almost any type of input, but I am trying to do it for the 'file' type, and I am having some serious problems.
For example, if I use CSS to set the border style, with a width of one pixel, all that changes is the colour of the border, not its width. However, this only occurs in FireFox. In IE (surprisingly) it works fine. Does anyone know why this is happening?
Also, I could really use some tips for editing the looks of the 'file' input type. Please let me know anything you know about it
Thanks so much.
By the way, in case I wasn't clear about what I am trying to style, it is "<input type='file'>" that I am trying to edit.
hairyfreak is offline  
Old 02-04-2006, 12:17 PM   #2 (permalink)
NamePros Regular
 
moondog's Avatar
 
Join Date: Jun 2004
Posts: 476
3,677.00 NP$ (Donate)

moondog is a glorious beacon of lightmoondog is a glorious beacon of lightmoondog is a glorious beacon of lightmoondog is a glorious beacon of lightmoondog is a glorious beacon of lightmoondog is a glorious beacon of light


As far as I knew.. . You could NOT alter the look and feel of the file input type. I am surprised IE let you change it.

-Bob
__________________
The mass purge has begun.
moondog is offline  
Old 02-04-2006, 02:24 PM   #3 (permalink)
A Wealth of Knowledge
 
stscac's Avatar
 
Join Date: Aug 2004
Posts: 3,794
47.60 NP$ (Donate)

stscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud ofstscac has much to be proud of


http://www.thescripts.com/clientside...css/page1.html

-Steve
stscac is offline  
Old 02-05-2006, 01:22 AM   #4 (permalink)
NamePros Regular
 
hairyfreak's Avatar
 
Join Date: Dec 2005
Location: Derbyshire, UK
Posts: 887
164.35 NP$ (Donate)

hairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nice


Bob, I was very surprised as well, usually IE works with almost nothing
Steve, thanks, but that method only works with standard text inputs, not the file one.
hairyfreak is offline  
Old 02-05-2006, 03:18 AM   #5 (permalink)
NamePros Regular
 
Rowan W's Avatar
 
Join Date: Dec 2004
Location: QLD, Australia
Posts: 713
1,869.00 NP$ (Donate)

Rowan W will become famous soon enough


The file input field combines two different fields in itself, so styling will affect the button as well as the text area. It's simply best to leave it unstyled or find some javascript that allows you to not use the file input field.

Also, I don't think there's any definition of how a file input field should behave when it's styled, as a result they're handled completely differently in Firefox, IE and Opera. If you have a look at the way Opera handles it, you'll notice it makes more sense.

You might be able to find a JavaScript way around it by using a separate text and button input.
Rowan W is offline  
Old 02-05-2006, 03:34 AM   #6 (permalink)
NamePros Regular
 
hairyfreak's Avatar
 
Join Date: Dec 2005
Location: Derbyshire, UK
Posts: 887
164.35 NP$ (Donate)

hairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nicehairyfreak is just really nice


That's exactly what I've just done Rowan
I set it up so that the file input was invisible, then positioned a normal text input at the same position. Since the file input is invisible though, I had to write a simple Javascript bit to copy the text from the file input and place it in the input, so the user can see the location of the file they have chosen. It's not perfect, but it seems to be working fine for me so far
hairyfreak is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
form filling script needed Guzey Web Design Discussion 0 04-10-2005 10:05 AM
MS Access Sub Form ridesign1 Programming 0 04-03-2005 06:06 AM
We customize form for your website at very good price. shrekwarrior Web Development Wanted 0 03-25-2005 08:05 PM

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:50 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85