Web Analytics Made Easy -
StatCounter from combobox, displaying in iframe? supplementary script - CodingForum

Announcement

Collapse
No announcement yet.

from combobox, displaying in iframe? supplementary script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • from combobox, displaying in iframe? supplementary script

    hello
    in the code below i want that the chosen in combobox to be displayed in iframe and/or in new page. i will be very grateful for any help... thanx






    <html>

    <head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>NEWWS</title>


    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function jumpBox(form){
    var URL = document.form.site.options[document.form.site.selectedIndex].value;
    window.location.href= URL;

    }
    //-->
    </SCRIPT>


    <FORM NAME="form">
    <SELECT NAME="site" size=1 onChange="javascript:jumpBox()">
    <OPTION VALUE="">MENU
    <OPTION VALUE="http://www.faz.de">F.A.Z
    <OPTION VALUE="http://www.yahoo.com">YAHOO


    </SELECT>
    </FORM>

    </head>

    <body>

    <p align="center">
    <iframe name="sun" src="http://google.com/" width="855" height="218">
    </iframe></p>

    </body>

    </html>

  • #2
    Try one of these

    window.frames["sun"].location=URL

    window.open(URL)
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

    Comment


    • #3
      hi mr.J

      second line works... but not 1. line.
      So, it opens in new page, but not in iframe.
      thank you anyway... it helped much for the time being.

      Comment


      • #4
        Mr. J

        first line also works...
        thank you!

        Comment


        • #5
          The best and Works!!!!!!!

          <html>
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
          <title>Untitled Document</title>

          <script type="text/JavaScript">
          <!--
          function MM_jumpMenu(targ,selObj,restore){ //v3.0
          eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
          if (restore) selObj.selectedIndex=0;
          }
          //-->
          </script>
          </head>

          <body>
          <form id="form1" name="form1" method="post" action="">
          <label>
          <select name="link" onchange="MM_jumpMenu('sun',this,0)">
          <option value="http://www.google.com">Google</option>
          <option value="http://www.yahoo.com">Yahoo!</option>
          </select>
          <br />
          <br />
          </label>

          <iframe name="sun" src="return Link();" height="300" width="300"></iframe>
          </form>
          <br />
          <br />
          </body>
          </html>

          Comment


          • #6
            You may find that some sites will not load into the iframe because they will be running their own scripts to keep them out of frames such as the F.A.Z website
            The silent one.

            The most dangerous thing in the world is an idea.
            The most dangerous person in the world is the one with an idea.

            Comment


            • #7
              hello !

              To Mr.J :
              yes !, i found that some web-sites like faz.de, as you pointed out, can't load into frame. I was asking since yesterday, why? So thanks you i know the reason. Thanx!

              To Lallo:
              thank you for sending code. it works.

              Comment


              • #8
                Thanks!
                It is my pleasure to help you!

                Comment

                Working...
                X