Page 1 of 1

dumb Javascript ?

PostPosted: Thu Aug 16, 2012 7:11 pm
by David de Argentina
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

PostPosted: Thu Aug 16, 2012 8:25 pm
by David de Argentina
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

PostPosted: Fri Aug 17, 2012 11:15 am
by Neosoft Support
You definitely have to watch our for those square brackets.

PostPosted: Fri Aug 17, 2012 12:44 pm
by Gaev
Who you calling a square bracket, Willis ? :evil: