N
nsb_tsd
I am munging together a url from the following snippet of html. It
shows the button I want to click, except it's accessed thru Javascript.
The jscript opens a new window which makes the content inaccessible, so
that's why I want to munge the address myself, so I can open it in the
same window.
For munging I extract the key value, append it to the base url, and do
an IE->get().
Does IE->get() do url escaping? The key value below is already escaped,
and I don't know if IE is unescaping the character codes. How would I
ensure that IE escapes the slashes in the key?
Thanks!
nb
(form code follows)
<INPUT type=hidden value=%2FxxxD%2Fxxa%2FS%2FasdfF%2Fbsa%2FNI
L%2FNIL%2FXF%252 name=aname>
<INPUT
onclick="JavaScript: myWindow = window.open('Some.jsp?keyvalue=' +
this.form.aname.value, 'winname', 'width=40, height=10') "
type=button
value="Click Me">
(perl code follows)
$cnt=$ie->content;
#print $cnt;
$reg_str = 'INPUT type=hidden value=(.*) name=aname';
$cnt =~ qr/$reg_str/;
$urltogo = $1;
print "Found! \n==========\n$urltogo\n=========\n";
$navig_url = 'http://ninjasite:25/abc/';
#$urltogo =~ s#%2F#/#g;
$jscript_added = 'Some.jsp?keyvalue=' & $urltogo ;
$gotou = $navig_url & $jscript_added;
print "Going to ::$gotou::\n";
$ie->get($gotou);
# fails here -- goes to wrong address.
sleep(12);
die
shows the button I want to click, except it's accessed thru Javascript.
The jscript opens a new window which makes the content inaccessible, so
that's why I want to munge the address myself, so I can open it in the
same window.
For munging I extract the key value, append it to the base url, and do
an IE->get().
Does IE->get() do url escaping? The key value below is already escaped,
and I don't know if IE is unescaping the character codes. How would I
ensure that IE escapes the slashes in the key?
Thanks!
nb
(form code follows)
<INPUT type=hidden value=%2FxxxD%2Fxxa%2FS%2FasdfF%2Fbsa%2FNI
L%2FNIL%2FXF%252 name=aname>
<INPUT
onclick="JavaScript: myWindow = window.open('Some.jsp?keyvalue=' +
this.form.aname.value, 'winname', 'width=40, height=10') "
type=button
value="Click Me">
(perl code follows)
$cnt=$ie->content;
#print $cnt;
$reg_str = 'INPUT type=hidden value=(.*) name=aname';
$cnt =~ qr/$reg_str/;
$urltogo = $1;
print "Found! \n==========\n$urltogo\n=========\n";
$navig_url = 'http://ninjasite:25/abc/';
#$urltogo =~ s#%2F#/#g;
$jscript_added = 'Some.jsp?keyvalue=' & $urltogo ;
$gotou = $navig_url & $jscript_added;
print "Going to ::$gotou::\n";
$ie->get($gotou);
# fails here -- goes to wrong address.
sleep(12);
die