Page 1 of 1

Javascript enabled?

PostPosted: Thu Mar 07, 2013 8:18 am
by andybrock
I have a project that logs into a members area on my site in a browser to check customers details. But I have one case where its not working and my best guess is because they have javascript disabled and to login I need to fill in a short form and submit it by using a browserexecscript to "click the submit button".

So I am using:

BrowserExecScript "WebBrowser2" "document.getElementById([#34]submit[#34]).click()" "JavaScript"

Is there a way of checking if javascript is enabled before hand and if not enabling it?

Andy

Re: Javascript enabled?

PostPosted: Thu Mar 07, 2013 8:30 am
by dec
Hello,

So finally you need a way to determine if Internet Explorer Javascript is enabled and, if not, enable it? Maybe can be possible, but not sound very good to me. So a program can modify my browser settings? I think a better aproach is to detect if Javascript is disabled using the "noscript" tag or some "hack", and then advise the user that we need Javascript to be enabled.

What do you thing about Andrew?

Re: Javascript enabled?

PostPosted: Thu Mar 07, 2013 9:45 am
by andybrock
Yeah I agree that enabling it without permission would be bad... I suppose ideally I'd detect if its not enabled and just show a message telling them to enable it.

Andy

Re: Javascript enabled?

PostPosted: Thu Mar 07, 2013 9:49 am
by dec
andybrock wrote:Yeah I agree that enabling it without permission would be bad... I suppose ideally I'd detect if its not enabled and just show a message telling them to enable it.

Andy


I can imagine the use of "noscript" tag so the same web page can tell the user that javascript is needed. What if also the same page enable the appropiate NeoBook button if Javascript is ready? I think this can be done, since you can execute a NeoBook subroutine from Javascript when available. Maybe can be a good solution?

Re: Javascript enabled?

PostPosted: Thu Mar 07, 2013 10:11 am
by dec
Hello,

Take a look at this very simple publication sample:

http://neoplugins.com/?download/noscript.zip

The point is to enable a NeoBook button from the HTML page only if JavaScript is enabled.

Re: Javascript enabled?

PostPosted: Fri Mar 08, 2013 4:24 pm
by andybrock
Thanks Dec - good thinking!

Andy

Re: Javascript enabled?

PostPosted: Fri Mar 08, 2013 8:38 pm
by dec
You're welcome! ;)