Jump to content


Photo

input type=file


  • Please log in to reply
3 replies to this topic

#1 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 16 October 2006 - 11:03 PM

I have this code shown below

<input type='file' OnClick="alert('Hello');">

Obviously when clicking they should be hit with an alert, apparently it doesnt work with FILE boxes

Is their

1: Anyway to set an alert when clicking browse
2: Find out whether any file location has been added to the file box after browsing

Thanks
I would love to change the world, but they won't give me the source code

SEO Agency

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 17 October 2006 - 04:12 PM

Why use an alert box? Browse will trigger an appropriate dialog automatically.  And you can probably use an onchage event.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 17 October 2006 - 06:10 PM

Because I want to display an alert box (warning) when clicking browse

I also need to check to see if a file dir has been inputted to the file field
I would love to change the world, but they won't give me the source code

SEO Agency

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 17 October 2006 - 10:19 PM

Maybe you could try an onmouseup handler; and you'd have to do any checks onblur, but that be complicated.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users