how to do cross-site scripting?

Discussion in 'JavaScript' started by frankcow, Jan 4, 2007.

  1. #1
    I know cross-site scripting is disabled in browsers to prevent phishing.

    But this is preventing me from using it in a good application. I'm trying to set content in form input fields in an iFrame. It works if the page within the iFrame is on my domain, but I get 'Permission denied to get property HTMLDocument.forms' errors if the page in the iFrame is on another domain.

    Is there any possible way around this? Would GreaseMonkey work?
     
    frankcow, Jan 4, 2007 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Hmm, so you trying to modify the attributes of an IFramed element that is loaded from a different site? If this was possible, all people would beautifully styled AdSense Ads. Their might be a way... but you might need to install an activex or an app (called a trojan) on another persons box :)
     
    ccoonen, Jan 4, 2007 IP
  3. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #3
    Actually, can you tell me why lots of people have SevenSeek Web Directory Avatars? I run http://www.SmashingDir.com - are you affiliated with seven seek? or did the owner run some kind of promotion?

    Thanks :)
     
    ccoonen, Jan 4, 2007 IP
  4. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Not only SevenSeek, also SiteSift, and others.
    There are volunteer users and paid users (more posts = more money).
    You can read several threads for this Avatar craziness
     
    ajsa52, Jan 5, 2007 IP
  5. amnezia

    amnezia Peon

    Messages:
    990
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you can't do it in pure javascript, you can if you use a bit of php as well though.
     
    amnezia, Jan 5, 2007 IP
  6. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #6
    Yeah, looks like I'm going the PHP route, thanks
     
    frankcow, Jan 5, 2007 IP