Thanks Jeff!  This mailing list rocks!

I was able to grab the url, but now '&' shows up in the url.  How do
I remove 'amp;' and just leave '&' in the string?

Getting this: 
http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId
=CBOD031&lob=ATR

Source has this:
http://fo-est-rhd-us/moveCandidate.jsp?profileId=1002266633&foUserId=CBO
D031&lob=ATR

-ben

------------------------------

Message: 8
Date: Sat, 19 Nov 2005 05:06:52 -0800
From: Jeff Wood 
Subject: Re: [Wtr-general] How do I get value from onclick
To: [email protected]
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

You can always find the input and then parse out the information for
yourself.

ie.input( :name, "add" ).html.scan( /main.location='(.*)';top.side/ )

should return just that portion of things you are interested in.
Remember that if your html is on multiple lines be sure to add a /m
suffix to the regex for #scan.

j.

On 11/18/05, Torres, Ben (HQP) <[EMAIL PROTECTED]> wrote:
>
> Is there anyway I can get the url specified in onclick?
> (http://fo-vap-rhe-us...)
>
> Here's a snip from the source code:
>
> <INPUT name="add" TYPE="button" value="Add to EDC"
> style="font-family:Helvetica;font-size:xx-small"
> onclick="top.main.location='http://fo-vap-rhe-us/moveCandidate.jsp?pro
> fi 
>
leId=10023852&foUserId=CYENBOR&lob=AT';top.side.document.actionForm.add.
> disabled=true;">
>
> What I would want to do is take this url and open it in a new browser 
> window.
>
> Thanks in advance,
> ben
>


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to