Answers
Aug 07, 2007 - 10:53 AM
Good question. I thought it was simple but after testing and searching it seems it is not possible to do this in a simple way.
First I thought - why not just fire the onclick instead of click?
But onclick is not a function either until it has been written explicitly in the html.
So what about setting true"?
This would normally activate the hyperlink (whereas false" would disable it...)
But it still doesn't do anything in Firefox.
Running out of ideas, the 'best' thing could be to add this to the A element:
and then firing the onclick event instead of click().
Problems with this method:
1. It wont work If the href starts with "javascript:..." or "mailto:..." etc.
2. It wont pay respect to any TARGET attribute
These things could of course be tackled by a clever script, which I am sure someone has already written, but actually I would prefer many other things before such a script - for instance to add a submit button or similar, which would work as expected when invoking the click event.
First I thought - why not just fire the onclick instead of click?
But onclick is not a function either until it has been written explicitly in the html.
So what about setting true"?
This would normally activate the hyperlink (whereas false" would disable it...)
But it still doesn't do anything in Firefox.
Running out of ideas, the 'best' thing could be to add this to the A element:
and then firing the onclick event instead of click().
Problems with this method:
1. It wont work If the href starts with "javascript:..." or "mailto:..." etc.
2. It wont pay respect to any TARGET attribute
These things could of course be tackled by a clever script, which I am sure someone has already written, but actually I would prefer many other things before such a script - for instance to add a submit button or similar, which would work as expected when invoking the click event.
Aug 27, 2007 - 02:38 AM
thanks, jgivoni for your response and sorry for not getting back quicker.
your proposed solution sounds like a good way to do it.
thanks for the help
your proposed solution sounds like a good way to do it.
thanks for the help
Jan 12, 2010 - 02:35 PM
great, 3 years after..
I'm using a hidden link to upload files
after selecting them from list
I'm using a hidden link to upload files
after selecting them from list
Dec 28, 2010 - 07:29 PM
Thanks the author, very useful advice. my pc's internet connection is very slow, which always drive me crazy, I want a program to solve my slow computer, several days ago my friend recommend me a software tuneup360, now I'm waiting for the result.
Add New Comment