OK, not strictly a PHP problem I guess but it occurred in my PHP project and
I could not find a suitable Javascript NG (under pressure, already extended
deadline.
I user a "file" input type on a form. Therefore when the user presses browse
a select file dialog appears.
I wanted to have a javascript message reminding the user to press "Add
Attachment" after selecting the file.
Therefore:
<input name="userfile" type="file" id="filetouploa d1"
onMouseUp="aler t('Remember to press \'Add Attachment\' after selecting the
file.'); return true;" />
However, If I have this the file dialog does not appear. I tried playing
around with the return value to no avail.
I tried a different event onChange, and everything seemed fine. Until I
tried manually typing into the text box and then the alert message just kept
on popping up whatever I done on the form unless I pressed browse again and
selected a different file.
Any idea what is going on here?
For now I have taken out the javascript but it will be very handy to put
back.
Kind regards
Dave
I could not find a suitable Javascript NG (under pressure, already extended
deadline.
I user a "file" input type on a form. Therefore when the user presses browse
a select file dialog appears.
I wanted to have a javascript message reminding the user to press "Add
Attachment" after selecting the file.
Therefore:
<input name="userfile" type="file" id="filetouploa d1"
onMouseUp="aler t('Remember to press \'Add Attachment\' after selecting the
file.'); return true;" />
However, If I have this the file dialog does not appear. I tried playing
around with the return value to no avail.
I tried a different event onChange, and everything seemed fine. Until I
tried manually typing into the text box and then the alert message just kept
on popping up whatever I done on the form unless I pressed browse again and
selected a different file.
Any idea what is going on here?
For now I have taken out the javascript but it will be very handy to put
back.
Kind regards
Dave
Comment