Source language: Translate to:

Javascript enabled?

Questions and information about creating Internet aware NeoBook applications. Including PHP, HTML, FTP, HTTP, Email, etc.

Moderator: Neosoft Support

Javascript enabled?

Postby andybrock » Thu Mar 07, 2013 8:18 am

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
What I do and How I do it. - http://andybrocklehurst.com
User avatar
andybrock
 
Posts: 181
Joined: Mon Apr 20, 2009 1:38 pm
Location: Somerset, UK

Re: Javascript enabled?

Postby dec » Thu Mar 07, 2013 8:30 am

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?
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Javascript enabled?

Postby andybrock » Thu Mar 07, 2013 9:45 am

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
What I do and How I do it. - http://andybrocklehurst.com
User avatar
andybrock
 
Posts: 181
Joined: Mon Apr 20, 2009 1:38 pm
Location: Somerset, UK

Re: Javascript enabled?

Postby dec » Thu Mar 07, 2013 9:49 am

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?
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Javascript enabled?

Postby dec » Thu Mar 07, 2013 10:11 am

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.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: Javascript enabled?

Postby andybrock » Fri Mar 08, 2013 4:24 pm

Thanks Dec - good thinking!

Andy
What I do and How I do it. - http://andybrocklehurst.com
User avatar
andybrock
 
Posts: 181
Joined: Mon Apr 20, 2009 1:38 pm
Location: Somerset, UK

Re: Javascript enabled?

Postby dec » Fri Mar 08, 2013 8:38 pm

You're welcome! ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain


Return to NeoBook and the Internet

Who is online

Users browsing this forum: No registered users and 2 guests