Link to home
Start Free TrialLog in
Avatar of astonishin
astonishin

asked on

How do i click link inside iframe

Ok so i load a website using <iframe> how do i click a link inside of that iframe? I was reading around that i can use javascript but i dont fully understand what i need to do.

The id of link im trying to click is #sayhi
ASKER CERTIFIED SOLUTION
Avatar of IanTh
IanTh
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of astonishin
astonishin

ASKER

You said use divs? divs can loads website like iframes?
did you read the depreciated url there are multiple issues with iframes these days you can use a div instead as all a did is is a place holder  

see
http://www.codingforums.com/archive/index.php/t-94273.html
Avatar of leakim971
What do you call a link?
<a href="path/to/my/page.php" id="sayhi">THIS IS A LINK</a>
Or :
<img src="path/to/my/onepixel.php?param=1234" id="sayhi" />

I don't want to propose a NEW USELESS answer again
https://www.experts-exchange.com/questions/28008937/Simiulate-User-Click-On-Link-With-PHP.html

How do i click link inside iframe

You move your mouse over the link and depress the top of the mouse.

If the subtext of this question is, "How do I cause an event to occur when the client did not initiate the event," then I think you need to explain why you would be doing something like that (something the client did not expect, maybe?) and exactly what event you're trying to trigger.

You can do a lot of interesting stuff along these lines with jQuery.  The jQuery library is very powerful if you use it wisely.