Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Navigate from my page to another website page and manipulate it with jquery

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #234849
    triplebit
    Participant

    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.Sher

    #234864
    nkrisc
    Participant

    Not 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.

    #234995
    triplebit
    Participant

    Thanks
    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
    Triplebit

    #234997
    Beverleyh
    Participant

    Looks 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.

    #235011
    nkrisc
    Participant

    Ok, 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.

    #235018
    triplebit
    Participant

    Is 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?
    Thx

    #235021
    Shikkediel
    Participant

    Putting 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.

    #235023
    nkrisc
    Participant

    I’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.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.