Coosa Aa wrote:
> Coosa Aa wrote:
>> What didn't work is that it's not displaying the results based on the
>> query as if it didn't submit the id for the hidden field in the input
>> form!
> 
> It's not displaying the results; there is a button in the page and when 
> clicked, a JavaScript function "submitted()" is called. Now the response 
> is OK, but I get no results as expected; I appreciate you try going to 
> the link I provided.
> Simply I don't know how to call the Javascript function within my Ruby 
> code.
> 
> regards

Inside the form (Though it would be helpful):
<INPUT name="txtIC" maxlength="12"><Input type=hidden name="txtSub">
<INPUT type="button" name="Check" value="Check" onclick="submitted()">

I called once in my Ruby Code:
URI.parse('http://daftarj.spr.gov.my/daftarbi.asp'),{"txtSub" => 
"0000059"}
and once:
URI.parse('http://daftarj.spr.gov.my/daftarbi.asp'),{"txtIC" => 
"0000059"}
but it never showed the results either way.

-- 
Posted via http://www.ruby-forum.com/.