Show Pages from two different Domains

Discussion in 'ASP .Net' started by bharath_r, Apr 3, 2009.

  1. bharath_r

    bharath_r Guest

    Hi All,

    I am faced with a strange situation. I need to show pages from two
    different domains in a single web page. I have a activex control
    embedded on a webpage. Now the requirement is that i need to show the
    activex page as well as a CRM Web in a single window. Currently i'm
    using frames for that, but i am facing a lot of problems with frames.
    I need to get rid of that. Is there a way i can show two web pages
    from two different domains in a single window? Any help is highly
    appreciated.

    Thanks
    Bharath
     
    bharath_r, Apr 3, 2009
    #1
    1. Advertising

  2. On Apr 3, 8:09 am, bharath_r <> wrote:
    > Hi All,
    >
    > I am faced with a strange situation. I need to show pages from two
    > different domains in a single web page. I have a activex control
    > embedded on a webpage. Now the requirement is that i need to show the
    > activex page as well as a CRM Web in a single window. Currently i'm
    > using frames for that, but i am facing a lot of problems with frames.
    > I need to get rid of that. Is there a way i can show two web pages
    > from two different domains in a single window? Any help is highly
    > appreciated.
    >
    > Thanks
    > Bharath


    Frames are the only way to show several web pages in one browser
    window. What kind of problems do you have?
     
    Alexey Smirnov, Apr 3, 2009
    #2
    1. Advertising

  3. bharath_r

    bharath_r Guest


    > Frames are the only way to show several web pages in one browser
    > window. What kind of problems do you have?


    The problem is that when i click on a tab in the CRM web page the page
    opens in a new window.
    I don't want that to happen. Also i need a way to be able to refresh
    the CRM Web page.
    I tried putting a button in the other frame and onclick i tried to
    refresh, but i'm getting permission denied error in javascript.

    Thanks
    Bharath
     
    bharath_r, Apr 3, 2009
    #3
  4. On Apr 3, 9:42 am, bharath_r <> wrote:
    > > Frames are the only way to show several web pages in one browser
    > > window. What kind of problems do you have?

    >
    > The problem is that when i click on a tab in the CRM web page the page
    > opens in a new window.
    > I don't want that to happen. Also i need a way to be able to refresh
    > the CRM Web page.
    > I tried putting a button in the other frame and onclick i tried to
    > refresh, but i'm getting permission denied error in javascript.
    >
    > Thanks
    > Bharath


    How does this related to frames and your own webpage? If other site is
    designed to open a new window on click then it cannot be modified from
    your site (except the sitescraping ;)

    Regarding refreshing, please try this example

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
    TR/html4/strict.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>iframe refresher</title>
    <script type="text/javascript">
    function refreshIframe(el) {
    var f = document.getElementById(el)
    var rsrc = f.src
    f.src="about:blank"
    f.src=rsrc
    }
    </script>
    </head>

    <body>
    <iframe name="test" src="http://www.google.com.au/" width="200"
    height="200" id="test"></iframe>
    <a href="#" onclick="refreshIframe('test'); return false">click</a>
    </body>
    </html>

    Hope this helps
     
    Alexey Smirnov, Apr 3, 2009
    #4
  5. bharath_r

    bharath_r Guest

    On Apr 3, 1:07 pm, Alexey Smirnov <> wrote:
    > On Apr 3, 9:42 am, bharath_r <> wrote:
    >
    > > > Frames are the only way to show several web pages in one browser
    > > > window. What kind of problems do you have?

    >
    > > The problem is that when i click on a tab in the CRM web page the page
    > > opens in a new window.
    > > I don't want that to happen. Also i need a way to be able to refresh
    > > the CRM Web page.
    > > I tried putting a button in the other frame and onclick i tried to
    > > refresh, but i'm getting permission denied error in javascript.

    >
    > > Thanks
    > > Bharath

    >
    > How does this related to frames and your own webpage? If other site is
    > designed to open a new window on click then it cannot be modified from
    > your site (except the sitescraping ;)
    >
    > Regarding refreshing, please try this example
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
    > TR/html4/strict.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1">
    > <title>iframe refresher</title>
    > <script type="text/javascript">
    > function refreshIframe(el) {
    > var f = document.getElementById(el)
    > var rsrc = f.src
    > f.src="about:blank"
    > f.src=rsrc}
    >
    > </script>
    > </head>
    >
    > <body>
    > <iframe name="test" src="http://www.google.com.au/" width="200"
    > height="200" id="test"></iframe>
    > <a href="#" onclick="refreshIframe('test'); return false">click</a>
    > </body>
    > </html>
    >
    > Hope this helps


    Many thanks for the reply Alexey,

    The problem is that when i open the CRM Web in IE the tab clicks do
    not pop up new window. But when i put it inside the frame i'm having
    that problem.
    The refresh code works great, the only thing is that if i search for
    something in google.com.au and navigate to that page and i try to
    refresh, it comes back to google.com.au.
    I want to be able to refresh the page i'm currently in.

    Thanks
    Bharath
     
    bharath_r, Apr 3, 2009
    #5
  6. On Apr 3, 11:03 am, bharath_r <> wrote:
    > On Apr 3, 1:07 pm, Alexey Smirnov <> wrote:
    >
    >
    >
    > > On Apr 3, 9:42 am, bharath_r <> wrote:

    >
    > > > > Frames are the only way to show several web pages in one browser
    > > > > window. What kind of problems do you have?

    >
    > > > The problem is that when i click on a tab in the CRM web page the page
    > > > opens in a new window.
    > > > I don't want that to happen. Also i need a way to be able to refresh
    > > > the CRM Web page.
    > > > I tried putting a button in the other frame and onclick i tried to
    > > > refresh, but i'm getting permission denied error in javascript.

    >
    > > > Thanks
    > > > Bharath

    >
    > > How does this related to frames and your own webpage? If other site is
    > > designed to open a new window on click then it cannot be modified from
    > > your site (except the sitescraping ;)

    >
    > > Regarding refreshing, please try this example

    >
    > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
    > > TR/html4/strict.dtd">
    > > <html>
    > > <head>
    > > <meta http-equiv="Content-Type" content="text/html;
    > > charset=iso-8859-1">
    > > <title>iframe refresher</title>
    > > <script type="text/javascript">
    > > function refreshIframe(el) {
    > > var f = document.getElementById(el)
    > > var rsrc = f.src
    > > f.src="about:blank"
    > > f.src=rsrc}

    >
    > > </script>
    > > </head>

    >
    > > <body>
    > > <iframe name="test" src="http://www.google.com.au/" width="200"
    > > height="200" id="test"></iframe>
    > > <a href="#" onclick="refreshIframe('test'); return false">click</a>
    > > </body>
    > > </html>

    >
    > > Hope this helps

    >
    > Many thanks for the reply Alexey,
    >
    > The problem is that when i open the CRM Web in IE the tab clicks do
    > not pop up new window. But when i put it inside the frame i'm having
    > that problem.
    > The refresh code works great, the only thing is that if i search for
    > something in google.com.au and navigate to that page and i try to
    > refresh, it comes back to google.com.au.
    > I want to be able to refresh the page i'm currently in.
    >
    > Thanks
    > Bharath


    okay, I got it now. You can't do this because of a cross-frame
    security. A frame running on one server is not able to access another
    frame's document running on another server. Because of this you will
    get the "permission denied" message. It's most likely you can't use
    frames because of two reasons: popup and refresh. Maybe you have to
    check if you can implement something using a sitescraping tricks.
    Note, this is a matter of copyright.

    http://www.google.com/search?hl=en&q=sitescraping asp.net
     
    Alexey Smirnov, Apr 3, 2009
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nfirtaps
    Replies:
    13
    Views:
    1,239
    nfirtaps
    Dec 1, 2006
  2. SHC
    Replies:
    0
    Views:
    407
  3. WeAreGoing!
    Replies:
    1
    Views:
    170
    Lasse Reichstein Nielsen
    Dec 1, 2003
  4. SHC
    Replies:
    6
    Views:
    199
    -Lost
    Mar 29, 2007
  5. François Guillet
    Replies:
    0
    Views:
    104
    François Guillet
    Oct 16, 2009
Loading...

Share This Page