[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

post_form

Coosa Aa

3/8/2007 7:14:00 AM

Dear all,

I'm a newbie and have been looking for a solution regarding the
following issue:
I'm trying to get the results from the page
http://daftarj.spr.gov.my/da... and looking at the source of the
page I have the following information:

<form method="post" name="def" action="daftarbi.asp">
11 Answers

Coosa Aa

3/8/2007 7:25:00 AM

0

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!

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

Coosa Aa

3/8/2007 9:46:00 PM

0

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


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

Austin Ziegler

3/8/2007 9:48:00 PM

0

On 3/8/07, Coosa Aa <coosa76@gmail.com> 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.

You probably want to ask this on the Rails forum. This is the general
Ruby mailing list, mirrored to ruby-forum.com.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Coosa Aa

3/8/2007 9:49:00 PM

0

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/daftarb...),{"txtSub" =>
"0000059"}
and once:
URI.parse('http://daftarj.spr.gov.my/daftarb...),{"txtIC" =>
"0000059"}
but it never showed the results either way.

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

Austin Ziegler

3/8/2007 9:52:00 PM

0

On 3/8/07, Austin Ziegler <halostatue@gmail.com> wrote:
> You probably want to ask this on the Rails forum. This is the general
> Ruby mailing list, mirrored to ruby-forum.com.

I was wrong. This is the right place; I just don't know the answer and
I shouldn't post when I'm too busy to read in detail. Sorry, Coosa.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Coosa Aa

3/8/2007 9:53:00 PM

0

Austin Ziegler wrote:
> On 3/8/07, Coosa Aa <coosa76@gmail.com> 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.
>
> You probably want to ask this on the Rails forum. This is the general
> Ruby mailing list, mirrored to ruby-forum.com.
>
> -austin

I'm not using Rails at all,
The Net::HTTP.post_form is a core Ruby library and i'm just using a
simple Ruby code in a *.rb file

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

Pit Capitain

3/9/2007 8:37:00 AM

0

Coosa Aa schrieb:
>> (...) I appreciate you try going to the link I provided.

The page says "ELECTION COMISSION OF MALAYSIA, ELECTORS ROLL CHECKING".
Can you tell me what this page is about and what you are trying to do?

Regards,
Pit

Coosa Aa

3/10/2007 12:21:00 AM

0

Pit Capitain wrote:
> Coosa Aa schrieb:
>>> (...) I appreciate you try going to the link I provided.
>
> The page says "ELECTION COMISSION OF MALAYSIA, ELECTORS ROLL CHECKING".
> Can you tell me what this page is about and what you are trying to do?
>
> Regards,
> Pit
The problem is solved by modifing the line into:
URI.parse('http://daftarj.spr.gov.my/daftarb...),{"txtIC" =>
"0000059", "txtSub" => "Submitted"}
The JavaScript function already cleared but I overlooked it!
But for your comment, watch what you write and don't judge and forget
that the page is publically accessible; so I don't post here to get such
comments and I that question of yours doesn't deserve a response!

Regards

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

Pit Capitain

3/10/2007 7:27:00 PM

0

Coosa Aa schrieb:
> Pit Capitain wrote:
>> The page says "ELECTION COMISSION OF MALAYSIA, ELECTORS ROLL CHECKING".
>> Can you tell me what this page is about and what you are trying to do?
>>
> But for your comment, watch what you write and don't judge and forget
> that the page is publically accessible; so I don't post here to get such
> comments and I that question of yours doesn't deserve a response!

Hi Coosa Aa. Yes, it's a public site. But when I entered the data you've
mentioned, the response looked like personal data to me. Since I don't
know the language spoken in Malaysia, I wasn't sure about that. That's
why I asked you my question. Now, interpreting your answer, I think I
was right that it's possible to get at personal data by entering the
right numbers. If this is not what you're after, I apologize. It seems
you found at least one part of the answer to your question, so I guess I
don't have to show you my solution.

Regards,
Pit

Coosa Aa

3/11/2007 2:18:00 AM

0

Pit Capitain wrote:
> Coosa Aa schrieb:
>> Pit Capitain wrote:
>>> The page says "ELECTION COMISSION OF MALAYSIA, ELECTORS ROLL CHECKING".
>>> Can you tell me what this page is about and what you are trying to do?
>>>
>> But for your comment, watch what you write and don't judge and forget
>> that the page is publically accessible; so I don't post here to get such
>> comments and I that question of yours doesn't deserve a response!
>
> Hi Coosa Aa. Yes, it's a public site. But when I entered the data you've
> mentioned, the response looked like personal data to me. Since I don't
> know the language spoken in Malaysia, I wasn't sure about that. That's
> why I asked you my question. Now, interpreting your answer, I think I
> was right that it's possible to get at personal data by entering the
> right numbers. If this is not what you're after, I apologize. It seems
> you found at least one part of the answer to your question, so I guess I
> don't have to show you my solution.
>
> Regards,
> Pit

Such childish plays; we're here in a professional forum, so be one. I
even mentioned that I solved it, so don't even try to impress by
mentioning that you have an answer; I don't need it, I have it -
"txtSub" => "Submitted".

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