Suppose i have an URL example.com
, i want read the source of that page and get a particular link like example1.com and make a clickable event on it ,means that represents user had click the link from that URL example.com
to example1.com
.
Asked
Active
Viewed 34 times
0

Marco Bonelli
- 63,369
- 21
- 118
- 128

sankar gowri
- 3
- 4
-
1Your question is not very clear. Do you want to change example,com after reading the source? – Jeroen Heier May 06 '17 at 05:08
-
suppose i have link example.com, it contains link example1.com, i want to make clickable event example1.com is clicked automatically from example.com – sankar gowri May 06 '17 at 05:12
-
The question is still not very clear: Are you saying that you have a site Site.com which has a hyperlink on a page which links to AnotherSite.com and what you want to do is attach an event to that hyperlink so that you can react to the click event? – Jacques May 09 '17 at 07:40
1 Answers
0
You will need to first make an ajax call to that page to get the content to parse, then parse the webpage content with the link in your case example.com then go to the page (with or without click event).
Requesting Webpage
You will need some sort of ajax call to get the contents of the webpage for parsing.
Parsing
Get the #id
or .class
where the link you need is located (within the parsing function).
Redirecting
Click event isn't necessarly needed if you can just redirect to that link when you get it but this answer here has both information you need about click/redirecting with JS.
Good luck.