Execute script within a received page. - WeOnlyDo Discussion board

Execute script within a received page. (General questions)

by dirk, Wednesday, October 31, 2012, 17:07 (4202 days ago)

I have a webpage that I should be able to GET , however the page implements some logic in JavaScript and uses this to see if JavaScript is enabled or not. If enabled then I get the real page (the one I want to have), if not then I get a page saying that JavaScript is not enabled (not realy what I want).

It it possible using the wodHTTPDlx component to GET this type of script enabled page (and have it execute the script)?
If so how? (using vb6)

Re: Execute script within a received page.

by woddrazen, Wednesday, October 31, 2012, 17:22 (4202 days ago) @ dirk

Hi Dirk,


Unfortunately wodHttpDLX doesn't process JavaScript. It only does HTTP protocol related communication.

So in case of any javascript code, you would need to process it manually.


Regards,
Drazen

Re: Execute script within a received page.

by dirk, Wednesday, October 31, 2012, 17:29 (4202 days ago) @ woddrazen

Hi Drazen,


what do you mean with manually , any tips on this?

Hi Dirk,


Unfortunately wodHttpDLX doesn't process JavaScript. It only does HTTP protocol related communication.

So in case of any javascript code, you would need to process it manually.


Regards,
Drazen

Re: Execute script within a received page.

by woddrazen, Wednesday, October 31, 2012, 17:58 (4202 days ago) @ dirk

Dirk,


Unofrtunately you cannot execute JavaScript inside wodHttpDLX.

However using UserAgent header you can introduce yourself to server as some other browser. Maybe that will help.

You can change UserAgent value inside wodHttpDLX using UserAgent Property.

More help for UserAgent Property you can find here:
http://www.weonlydo.com/HttpDLX/Help/wodHttpDLX-HttpRequest-UserAgent.html
[code]Http1.Request.Headers.Add UserAgent , Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 [/code]
Drazen

Re: Execute script within a received page.

by dirk, Wednesday, October 31, 2012, 18:02 (4202 days ago) @ woddrazen

We already tried that...but that isn't working.
It seems that a common way to see if the browser is JavaScript enabled or not, is to have a very small bit of JavaScript within the called page and if that executes correctly redirect to another page (with again JavaScript on it).


dirk

Dirk,


Unofrtunately you cannot execute JavaScript inside wodHttpDLX.

However using UserAgent header you can introduce yourself to server as some other browser. Maybe that will help.

You can change UserAgent value inside wodHttpDLX using UserAgent Property.

More help for UserAgent Property you can find here:
http://www.weonlydo.com/HttpDLX/Help/wodHttpDLX-HttpRequest-UserAgent.html
[code]Http1.Request.Headers.Add UserAgent , Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 [/code]
Drazen

Re: Execute script within a received page.

by woddrazen, Wednesday, October 31, 2012, 19:55 (4202 days ago) @ dirk

Dirk,


wodHttpDLX cannot run Javascript code. So I'm not sure that you can get this to work.


Drazen

Re: Execute script within a received page.

by M., Thursday, November 01, 2012, 10:50 (4201 days ago) @ woddrazen

Hi,

I wonder if you may be able to run your script inside Httpdlx comp.
using Shell() function to run your script.
It is just an Idea ! I don't know if it works or not .. try it if
possible.

Hope .. that it may work.

Regards,
M.