Forum Moderators: open

Message Too Old, No Replies

enabling javascript

enabling javascript

         

sunnny

1:04 am on Aug 23, 2005 (gmt 0)

10+ Year Member



Hello,

I was just wondering is there someway that we can forcefully enable javascript on a client's machine, because I developed a script and I am afraid that clients will have their javascript turned off. Just a thought I am not sure if we can do that.

Thanks,
Sunny

skizm

11:23 am on Aug 23, 2005 (gmt 0)

10+ Year Member



There are ways but force is very obtrusive, and it can't be done with javascript. You would have to invoke some seeminlgy potentially malicious stuff to accomplish this as far as I know...

sunnny

1:52 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



but wouldn't this be okay if we are doing this for an intranet site.

encyclo

2:01 pm on Aug 23, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't force Javascript as you can't be sure that the client has Javascript available. I assume that skizm is referring to ActiveX, but that would only work on IE and only with abnormally low security settings, if at all.

The best approach is simply to set a message for browsers with Javascript disables that JS is required to use the site. You can use a noscript tag for that:

<noscript>This site requires Javascript to be enabled.<br>
To enable Javascript in Internet Explorer, click "Tools" [i](... etc.)[/i]</noscript>