When users clicked a unkown mime type link such as Zip on my website, a
"Save/Open/Cancel" dialog box pops up. Is there a way to detect which button
users clicked by using ASP? actually I only what to record the "valid"
click -- when Open/Save was clicked.

Thanks ahead.

Quinn

Re: How do I detect which button was clicked on "save/open/cancel" by Curt_C

Curt_C
Thu Jul 07 10:29:10 CDT 2005

Quinn wrote:
> When users clicked a unkown mime type link such as Zip on my website, a
> "Save/Open/Cancel" dialog box pops up. Is there a way to detect which button
> users clicked by using ASP? actually I only what to record the "valid"
> click -- when Open/Save was clicked.
>
> Thanks ahead.
>
> Quinn
>
>

Look in the Request.Form collection, I believe you will get a hit on the
one that was clicked and the other two will not be in there.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

Re: How do I detect which button was clicked on "save/open/cancel" dialog? by Patrice

Patrice
Thu Jul 07 10:40:25 CDT 2005

You can't. The site just streams the file to the browser. What the user does
with the file is not known by the website as there is no more server side
interaction...

Denpending on what you are after you could perhaps let a userdo 3 attemps
wihtin a quite short period before blocking the download or something
similar...

Patrice

--

"Quinn" <qjia@yahoo.com> a écrit dans le message de
news:OvHCEfwgFHA.1044@tk2msftngp13.phx.gbl...
> When users clicked a unkown mime type link such as Zip on my website, a
> "Save/Open/Cancel" dialog box pops up. Is there a way to detect which
button
> users clicked by using ASP? actually I only what to record the "valid"
> click -- when Open/Save was clicked.
>
> Thanks ahead.
>
> Quinn
>
>



Re: How do I detect which button was clicked on "save/open/cancel" dialog? by Aaron

Aaron
Thu Jul 07 10:48:53 CDT 2005

You cannot. You can't even tell whether or not they clicked on anything at
all...


> When users clicked a unkown mime type link such as Zip on my website, a
> "Save/Open/Cancel" dialog box pops up. Is there a way to detect which
> button users clicked by using ASP? actually I only what to record the
> "valid" click -- when Open/Save was clicked.
>
> Thanks ahead.
>
> Quinn
>



Re: How do I detect which button was clicked on "save/open/cancel" dialog? by Quinn

Quinn
Thu Jul 07 11:04:40 CDT 2005

Thanks guys.But it's too bad we cannot detect.




"Quinn" <qjia@yahoo.com> wrote in message
news:OvHCEfwgFHA.1044@tk2msftngp13.phx.gbl...
> When users clicked a unkown mime type link such as Zip on my website, a
> "Save/Open/Cancel" dialog box pops up. Is there a way to detect which
> button users clicked by using ASP? actually I only what to record the
> "valid" click -- when Open/Save was clicked.
>
> Thanks ahead.
>
> Quinn
>



Re: How do I detect which button was clicked on "save/open/cancel" dialog? by Griff

Griff
Fri Jul 08 07:09:37 CDT 2005

But maybe you can...?

I'm guessing here as I've not tried this, but you could try something like
this:

1 - in your form, create a hidden field <input type="hidden"
id="buttonClicked" name="buttonClicked" value="">

2 - in each button, have an onclick event to run some javascript which
passes the id/name of the button, e.g. "buttonA" <input
onclick="fnClicked(buttonA)"

3 - have a JavaScript function that selects the hidden field by ID and sets
the value of this to be the parameter received. Not that familiar with
JavaScript so the following undoubtably won't work without
editing/re-writing...

function fnClicked(IDSelected)
{
hiddenElement = document.getElementById('buttonClicked');
hiddenElement.value = IDSelected;
}

Then, when the form submits, you'll have a new input element that has the
value of the button selected.

Of course, if the punter has disabled JavaScript then it obviously won't
work.

HTH

Griff