Source language: Translate to:

dumb Javascript ?

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

dumb Javascript ?

Postby David de Argentina » Thu Aug 16, 2012 7:11 pm

Hi all,

Please test this:

1.- Download this PUB:
http://specialapps.software-zone.com/fi ... script.pub

2.- Run the pub as is.

3.- Click on Button "Step 1". A webpage will be loaded. wait for a while..

4.- Click on Button "Step 2". I receive as response "undefined". Perhaps you will receive another text.

5.- If you received "undefined", Click on Button "Step 1" again. you will receive the previous webpage.

6.- on this state, you could get the webpage source with right click on the webpage and select source code.

7.- Click on Button "Go from InputBox". Button executes the javascript located on the inputbox. you will receive another webpage. Check the source code.

8.- Click on Button "Go from InputBox" AGAIN. Button executes the same javascript located on the inputbox. you will receive another webpage. Check the source code.

Curiosity: The javascript located on the InputBox is exactly the same of the executed on the Button "Step 2".

If the javascript is executed from the InputBox, works fine.
If the javascript is executed from the Button "Step 2" does not work properly.

Any ideas ?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby David de Argentina » Thu Aug 16, 2012 8:25 pm

Interesting,

when NeoBook executes the script:

var i2 = document.getElementsByTagName([#34]iframe[#34])[0];

asumes that the subscript [0] is a NeoBook variable. this variable is empty.

then, NeoBook really executes this script:

var i2 = document.getElementsByTagName([#34]iframe[#34]);

This change produces the error.

If i replace the correct javascript:

var i2 = document.getElementsByTagName([#34]iframe[#34])[0];

with:

var i2 = document.getElementsByTagName([#34]iframe[#34])[#91]0[#93];

Process works fine.

Thanks !
David de Argentina
User avatar
David de Argentina
 
Posts: 1562
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby Neosoft Support » Fri Aug 17, 2012 11:15 am

You definitely have to watch our for those square brackets.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Gaev » Fri Aug 17, 2012 12:44 pm

Who you calling a square bracket, Willis ? :evil:
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Action Commands

Who is online

Users browsing this forum: Bing [Bot] and 1 guest