mscir wrote:
[color=blue]
> Is it possible to detect whether a protocol client-side on any given
> user's machine?
>
> Thanks,
> Mike[/color]
Pardon?
By "protocol" what do you mean? Do you mean is it possible to determine
if the user has IPX/SPX or NetBEUI installed and configured properly
using client-side JavaScript in a Web browser? No.
Do you mean you want to determine whether the user's browser supports a
particular protocol in URI's... I suppose that's possible... something
like:
<script type="text/javascript">
var cmd = new Image();
var rand = Math.floor((new Date()).getTime () * Math.random());
cmd.src = '/ftpConnectionCo ming.cgi?t=' + rand;
window.open('ft p://yourserver/' + rand);
</script>
Then on your server, you'd need some smarts to determine that the same
random number was reported to ftpConnectionCo ming.cgi and an attempt was
made to connect to your FTP server with a directory of the same name as
that random number (by checking the logs perhaps).
There may be other ways of doing this, since I have no idea what your
question was even asking, I didn't spend a lot of time trying to come up
with a solution.
--
Grant Wagner <gwagner@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
Grant Wagner wrote:[color=blue]
> mscir wrote:[color=green]
>>Is it possible to detect whether a protocol client-side on any given
>>user's machine?
>>[/color]
> By "protocol" what do you mean?[/color]
Sorry I wasn't clearer. I want to check to see if "mailto" will work or
not, before presenting the user with choices, by the site owner's request.
[snip]
[color=blue]
> Sorry I wasn't clearer. I want to check to see if "mailto" will work or
> not, before presenting the user with choices, by the site owner's
> request.[/color]
No, it's not possible. You can't determine whether a machine will have a
mail client from script, or whether that client is known by the browser
(the crucial bit).
Consider using a mail form in place of, or in addition to, an actual
e-mail address. If you or your client is interested, someone's started a
thread on alt.html that asks for comments on the merits of both.
Subject: Form Mail vs Mailto Links
Date: Mon, 27 Sep 2004 08:13:01 -0400
Author: DLSD@webtv.net (Davmagic .Com)
Message ID: <12624-415803CD-150@storefull-3157.bay.webtv. net>
There's bound to be plenty of these debates in the archives of alt.html
and comp.infosystem s.www.authoring.html if you'd rather not wait and see
what opinions this one will yield.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Michael Winter wrote:
[color=blue]
> mscir <mscir@access4l ess.net> wrote:[color=green]
>> I want to check to see if "mailto" will work or not[/color][/color]
<snip>
[color=blue]
> No, it's not possible. You can't determine whether a machine will have
> a mail client from script, or whether that client is known by the
> browser (the crucial bit).[/color]
OK, that's what I wanted to know. I'll recommend that he use form mail,
or at the very least provide that as a recommended option.
Comment