M
Mark Anderson
I've a problem where users dragging web pages images, whose 'src' is a
*query* to a web app and not a path to an image, as they end up with the
dropped image having the name of the script page (server.np' from a GET
URL '../server.np?find&field=etc....' or in some cases a POST URL
'../server.np?'). I do see why this effect occurs ('server.np' is
effectively the src's filename) but I wonder if there is anything I can
do client-side to set the correct name of the file - or at least
something more appropriate that the queries base page.
The web app I'm interacting uses JavaScript for it's server-side
scripting but I don't have access to change the way the app itself
functions, thought I can retrieve a filename to client-side via the
server's API, e.g. 'mypic.jpg', and would like the drag/dropped image to
take this name rather than 'server.np'.
Ideally want to support IE6+ / Safari / Firefox but it seems these have
inconsistent support for drag/drop events (or terminology/events for
this). One additional factor is the images may also be inside an <a
href> link so I can't just ignore mouse clicks on the image and I do
want to allow the user drag/drop if possible.
I hope this makes sense and this is an appropriate forum (please
re-direct me if not). Any thoughts?
Regards
Mark
*query* to a web app and not a path to an image, as they end up with the
dropped image having the name of the script page (server.np' from a GET
URL '../server.np?find&field=etc....' or in some cases a POST URL
'../server.np?'). I do see why this effect occurs ('server.np' is
effectively the src's filename) but I wonder if there is anything I can
do client-side to set the correct name of the file - or at least
something more appropriate that the queries base page.
The web app I'm interacting uses JavaScript for it's server-side
scripting but I don't have access to change the way the app itself
functions, thought I can retrieve a filename to client-side via the
server's API, e.g. 'mypic.jpg', and would like the drag/dropped image to
take this name rather than 'server.np'.
Ideally want to support IE6+ / Safari / Firefox but it seems these have
inconsistent support for drag/drop events (or terminology/events for
this). One additional factor is the images may also be inside an <a
href> link so I can't just ignore mouse clicks on the image and I do
want to allow the user drag/drop if possible.
I hope this makes sense and this is an appropriate forum (please
re-direct me if not). Any thoughts?
Regards
Mark