0

Does anybody here solved a similar problem?

I have a link that contains nothing but another link.

For example, given a URL lets say it is www.abc123proxy.info. And then that URL contains another URL on its page (yeah, just text) lets say the URL for this one is www.masked-url.com?token=231940812093810. I need go to the second URL but I only have the first URL.

This is what I want to happen:

$(document).ready(function() {window.location = 'www.abc123proxy.info';});
// But I wanted to go to the link inside the page of that URL.

Is this problem can be solve using javascript? I'm open for other better solution if you have.

Thanks!

1 Answers1

1
$.ajax({
        url:'first_url',
        type:'get',
        success:function(data){
          var _newUrl=$(data).find('a:first');
        }
})
Praveen Prasad
  • 31,561
  • 18
  • 73
  • 106