Home › Forums › JavaScript › Navigate from my page to another website page and manipulate it with jquery
- This topic is empty.
-
AuthorPosts
-
November 12, 2015 at 5:30 am #234849triplebitParticipant
I have a WordPress site. I need to implement the following feature:
I want to navigate from one of my pages to another website page and add functionality with jquery to the displayed page(I don’t want to alter the original website or its content at all).
Is that possible and how?
Regards
I.SherNovember 12, 2015 at 11:31 am #234864nkriscParticipantNot really, no. If it were possible, it would be a massive security hole. If you really need to do something on top of another site, you could create a browser plugin, or even a bookmarklet, perhaps.
November 17, 2015 at 11:40 pm #234995triplebitParticipantThanks
Let me give an example. The site http://responsivetest.net/ enables you to navigate to another site and check its responsiveness.
Can I implement it in my Wordpres site with ajax?
If yes, How?
Regards
TriplebitNovember 18, 2015 at 1:16 am #234997BeverleyhParticipantLooks like the responsive test site is just displaying a website within an iframe so the layout of the website being viewed is just responding to available space/size of the iframe at any given time.
November 18, 2015 at 12:32 pm #235011nkriscParticipantOk, that’s preeeeetty different from what you asked :)
Is it possible to put an iframe on your site and load a page in it? Sure (if the site allows it).
How to do it? Well, what have you tried?There are some restrictions browsers implement around this because of clickjacking, where malicious sites use might use another site loaded in an iframe to trick the user.
November 19, 2015 at 12:50 am #235018triplebitParticipantIs it possible to put an iframe on your site and load a page in it? Sure (if the site allows it).
I do I know if the other site allows it? Must I try or can I use Inspect Element for that?I’d look to access the elements inside the iframe with JQuer. Is it possible?
ThxNovember 19, 2015 at 1:58 am #235021ShikkedielParticipantPutting it in an iframe and showing it is likely no issue but you can’t access it with JavaScript, other than through your browser console. That would be a huge security hazard. Unless it’s YouTube for example, they provide an API to interact with.
November 19, 2015 at 7:02 am #235023nkriscParticipantI’m not sure what you want to do, but it sounds like you won’t be able to because the techniques you’re describing are not allowed by browsers because it’s exactly how someone would steal passwords or other information. I’m not saying that’s what you’re trying to do, but you’re trying to use the same method for something else.
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.