Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    164

    * Javascript needed , Masking Domain

    I want a JS, which can OPEN a Website in a MASKED Frame in a Web page

    For Example -


    If i place that JS code in index.htm file of www.mydomain.com , and when anyone accesses www.mydomain.com he should be redirect to www.masked-site.com ,

    But this should not open a pop up to www.masked-site.com, but it should open it inside www.mydomain.com only, liked a masked website.

    If i use this JS -

    Code:
    <script type="text/javascript">
    <!--
    parent.location.href="http://masked-site.com";
    //-->
    </script>
    It does works, but it does not masks ( masked-site.com ) , and opens masked-site.com in its own window...
    Last edited by VpsHosting; 02-26-2008 at 07:31 AM.

  2. #2
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    It sounds to me like you just want to put masked-site.com into a big frame (100%x100%). Have you tried going this route?
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  3. #3
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    164
    Quote Originally Posted by the_pm View Post
    It sounds to me like you just want to put masked-site.com into a big frame (100%x100%). Have you tried going this route?

    No , give me the code to do it

  4. #4
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    Lifted more or less directly from W3C
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    	<head>
    		<title>A simple frameset document</title>
    	</head>
    
    	<frameset rows="100%,*" border="0">
    		<frame src="http://www.masked-site.com">
    		<frame frameborder="0" noresize />
    	</frameset>
    </html>
    You should have a <noframes> option available whenever you serve up frames, but in this case, there's probably little benefit.
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  5. #5
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    164
    Quote Originally Posted by the_pm View Post
    Lifted more or less directly from W3C
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    	<head>
    		<title>A simple frameset document</title>
    	</head>
    
    	<frameset rows="100%,*" border="0">
    		<frame src="http://www.masked-site.com">
    		<frame frameborder="0" noresize>
    	</frameset>
    </html>
    You should have a <noframes> option available whenever you serve up frames, but in this case, there's probably little benefit.


    ^ it worked for me
    Thank You
    Last edited by the_pm; 02-29-2008 at 11:45 AM.

  6. #6
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    You're welcome
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  7. #7
    Join Date
    Feb 2008
    Posts
    38
    qry_string = 'http://www.masked-site.com';
    xmlHttp=GetXmlHttpObject();
    xmlHttp.onreadystatechange=scStateChanged;
    xmlHttp.open("GET",qry_string,true);
    xmlHttp.send(null);

    function scStateChanged(){
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == "complete"){
    var acResponse = xmlHttp.responseText;
    document.write(acResponse);
    }
    }

    function GetXmlHttpObject(handler){
    var objXMLHttp = null;
    if (window.XMLHttpRequest){
    objXMLHttp = new XMLHttpRequest();
    }
    else if (window.ActiveXObject){
    objXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    return objXMLHttp;
    }
    Another way works without frames

    PS. Sorry there was some misunderstanding
    Last edited by Andrew_I; 02-29-2008 at 11:54 AM.
    Smart Power Asia - Electronics - Mobile Electronics Store. Sell i-mobile, Oppo, Samsung. Worldwide shipping.

  8. #8
    Join Date
    May 2004
    Location
    Pflugerville, TX
    Posts
    11,222
    Quote Originally Posted by Andrew_I View Post
    One more way to open a web-site in a hidden frame.
    Hmm, wouldn't that make the site unviewable, if placed in a 1x1 pixel iframe?
    Studio1337___̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡ ̡͌l̡̡̡̡.__Web Design

  9. #9
    Join Date
    Jan 2008
    Location
    Earth
    Posts
    164
    Quote Originally Posted by the_pm View Post
    Hmm, wouldn't that make the site unviewable, if placed in a 1x1 pixel iframe?
    The code you gave me works, well

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •