inserting htm

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • j van c

    inserting htm

    I have a menubar on my main page.
    when clicking on a menu item I want to open an existing htm page at a
    certain position in my main page
    I use no frames. It should be replacing a div-section.
    Below is the script for opening in a new window
    mainMenuItem("x yz",".gif",27,1 18,"javascript: var newwin=window.o pen
    (another.htm',n ull,'height=200 ,width=400,stat us=yes,toolbar= no,menubar=no,
    location=no')", "","tag-name",2,2,"oude rcomitx_hnavbar _plain");

    thanks


  • Robert

    #2
    Re: inserting htm

    In article <kA4Id.761$8P.2 07929@phobos.te lenet-ops.be>,
    "j van c" <jvancxyz@pando ra.be> wrote:
    [color=blue]
    > I have a menubar on my main page.
    > when clicking on a menu item I want to open an existing htm page at a
    > certain position in my main page
    > I use no frames. It should be replacing a div-section.
    > Below is the script for opening in a new window
    > mainMenuItem("x yz",".gif",27,1 18,"javascript: var newwin=window.o pen
    > (another.htm',n ull,'height=200 ,width=400,stat us=yes,toolbar= no,menubar=no,
    > location=no')", "","tag-name",2,2,"oude rcomitx_hnavbar _plain");[/color]


    You are calling the user written function mainMenuItem to open the
    window. To look further into what is going on we need:

    a copy of the function mainMenuItem and a copy of the referenced html.

    Robert

    Comment

    • j van c

      #3
      Re: inserting htm

      > To look further into what is going on we need:[color=blue]
      > a copy of the function mainMenuItem and a copy of the referenced html.[/color]
      Thanks Robert for helping me out of this
      please see inside the code for further comments; The code was generated by
      webstyle4

      this is the content of oudercomitx_hna vbar.js (dealing with a horizontal
      navigation bar)

      if(typeof(loc)= ="undefined"||l oc==""){var
      loc="";if(docum ent.body&&docum ent.body.innerH TML){var
      tt=document.bod y.innerHTML;var
      ml=tt.match(/["']([^'"]*)oudercomitx_h navbar.js["']/i);if(ml && ml.length >
      1) loc=ml[1];}}

      var bd=0
      document.write( "<style type=\"text/css\">");
      document.write( "\n<!--\n");
      document.write( ".oudercomitx_h navbar_menu
      {z-index:999;borde r-color:#000000;b order-style:solid;bor der-width:"+bd+"px
      0px "+bd+"px
      0px;background-color:#aaaaaa;p osition:absolut e;left:0px;top: 0px;visibility: hidden;}");
      document.write( ".oudercomitx_h navbar_plain,
      a.oudercomitx_h navbar_plain:li nk,
      a.oudercomitx_h navbar_plain:vi sited{text-align:left;back ground-color:#aaaaaa;c olor:#000000;te xt-decoration:none ;border-color:#000000;b order-style:solid;bor der-width:0px
      "+bd+"px 0px "+bd+"px;paddin g:2px 0px 2px
      0px;cursor:hand ;display:block; font-size:8pt;font-family:Arial, Helvetica,
      sans-serif;font-weight:bold;}") ;
      document.write( "a.oudercomitx_ hnavbar_plain:h over,
      a.oudercomitx_h navbar_plain:ac tive{background-color:#0000aa;c olor:#ffffff;te xt-decoration:none ;border-color:#000000;b order-style:solid;bor der-width:0px
      "+bd+"px 0px "+bd+"px;paddin g:2px 0px 2px
      0px;cursor:hand ;display:block; font-size:8pt;font-family:Arial, Helvetica,
      sans-serif;font-weight:bold;}") ;
      document.write( "\n-->\n");
      document.write( "</style>");

      var fc=0xffffff;
      var bc=0x0000aa;
      if(typeof(frame s)=="undefined" ){var frames=0;}

      startMainMenu(" ",0,0,2,0,0 )
      mainMenuItem("o udercomitx_hnav bar_b1",".gif", 27,118,loc+"ocd oel.htm","","do el",2,2,"ouderc omitx_hnavbar_p lain");

      <!-- the ocdoel.htm is opening but a the upperleft corner. My heading and
      navigation bar are overwritten -->
      mainMenuItem("o udercomitx_hnav bar_b2",".gif", 27,118,"javascr ipt:;????",""," activiteiten",2 ,2,"oudercomitx _hnavbar_plain" );

      <!-- If replacing ???? in the previous line by the javascipt below the htm
      opens in a new window. this works
      "javascript :var newwin=window.o pen
      (another.htm',n ull,'height=200 ,width=400,stat us=yes,toolbar= no,menubar=no,
      location=no')"-->
      mainMenuItem("o udercomitx_hnav bar_b3",".gif", 27,118,"javascr ipt:;","","foto 's",2,2,"ouderc omitx_hnavbar_p lain");
      mainMenuItem("o udercomitx_hnav bar_b4",".gif", 27,118,"javascr ipt:;","","Link s",2,2,"ouderco mitx_hnavbar_pl ain");
      mainMenuItem("o udercomitx_hnav bar_b5",".gif", 27,118,"javascr ipt:;","","cont acteer
      ons",2,2,"ouder comitx_hnavbar_ plain");
      mainMenuItem("o udercomitx_hnav bar_b6",".gif", 27,118,"javascr ipt:;","","best uur
      en leden",2,2,"oud ercomitx_hnavba r_plain");
      endMainMenu("", 0,0);

      startSubmenu("o udercomitx_hnav bar_b4","ouderc omitx_hnavbar_m enu",118);
      submenuItem("vc ov","javascript :;","","ouderco mitx_hnavbar_pl ain");
      endSubmenu("oud ercomitx_hnavba r_b4");

      startSubmenu("o udercomitx_hnav bar_b3","ouderc omitx_hnavbar_m enu",119);
      submenuItem("ok tobertreffen"," javascript:;"," ","oudercomitx_ hnavbar_plain") ;
      submenuItem("gl ühwein","javasc ript:;","","oud ercomitx_hnavba r_plain");
      submenuItem("ni euwjaarsrecepti e","javascript: ;","","oudercom itx_hnavbar_pla in");
      endSubmenu("oud ercomitx_hnavba r_b3");

      loc="";

      This is the html page. The div section "content" should be replaced with the
      htm-pages to be loaded by clicking on the navigationbar.
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <head>
      <!-- Information generated and read by Xara Webstyle. Do not edit this line.
      [Elements (Theme);ouderco mité;Theme Colour 1;16227132;them ecolour1;Bullet
      highlight;32765 44;themecolour2 ;Sub-Heading
      Text;10635008;t hemecolour5;Bac kground Color;16777215; themecolour6;Bu tton
      Text(over);0;th emecolour7;Butt on Text;0;themecol our8;Heading & Logo
      Text;0;themecol our9] -->
      <!-- Template design (c) Xara Ltd 2003 -->
      <title>Elemen ts Themeset</title>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <meta name="generator " content="Xara Webstyle 4. See xara.com/webstyle"/>
      <style type="text/css">
      <!--
      table {
      font: 9pt "trebuchet ms", arial, sans-serif
      }
      body {
      color: #333333;/*themecolour6%0 ;*/
      background-color: #FFFFFF;/*themecolour6;*/
      background-image: url(oudercomité _files/oudercomité_top strip.gif);
      background-repeat: repeat-x;
      font-family: "trebuchet ms", Arial, sans-serif;
      font-size: 9pt;
      }
      p {
      margin-top: 0px;
      margin-bottom: 0px;
      }

      #content ul {
      color: #333333;/*themecolour6%0 ;*/
      margin-top: 0px;
      margin-bottom: 0px;
      list-style-image: url(oudercomité _files/oudercomité_bul let.gif);
      }

      #content blockquote {
      margin-top: 0px;
      margin-bottom: 0px;
      color: #333333
      margin-right: 0px;
      }

      #content ol {
      margin-top: 0px;
      margin-bottom: 0px;
      color: #333333
      }
      #header {
      position: absolute;
      height: auto;
      width: auto;
      left: 0px;
      top: 0px;
      visibility: visible;
      }

      #logo {
      position: absolute;
      height: auto;
      width: auto;
      left:10px;
      top: 165px;
      }

      #hnavigation {
      position: absolute;
      height: auto;
      left: 20px;
      top: 129px;
      z-index: 5;
      background-color: #3c9bf7;/*themecolour1;*/
      }

      #vnavigation {
      position: absolute;
      height: auto;
      width: auto;
      left: 20px;
      top: 320px;
      }

      ..imageborder {
      border-left-width: 1px;
      border-left-style: solid;
      border-left-color: #FFFFFF;
      }

      #imagebar {
      position: absolute;
      height: auto;
      width: auto;
      right: 60px;
      top: 25px;
      z-index: 6;
      }
      ..imagebox {
      border: 1px solid #FFFFFF;
      }

      #content {
      position: absolute;
      height: auto;
      width: auto;
      left: 20px;
      top: 180px;
      right: 60px;
      }

      h1 {
      font-size: 16px;
      color: #005db6;/*themecolour5;*/
      margin-top: 0px;
      margin-bottom: 3px;
      }
      h2 {
      font-size: 16px;
      color: #000000;/*themecolour6%0 ;*/
      margin-top: 0px;
      margin-bottom: 3px;
      }
      #content a:link {
      color: #005db6;/*themecolour5;*/
      }
      #content a:visited {
      color: #999999;
      }
      #content a:link:hover {
      color: #3c9bf7;/*themecolour1;*/
      }

      ..content {
      padding-left: 20px;
      }
      -->
      </style>
      </head>

      <body leftmargin="0" topmargin="0">
      <!-- a heading: loading a jpf-file-->
      <div id="header">
      <table width="100%" cellspacing="0" cellpadding="0" >
      <tr>
      <td width="520" valign="top"><i mg
      src="oudercomit é_files/oudercomité_hea ding.jpg" editor="Webstyl e4"
      moduleid="ouder comité (Project)\ouder comité_heading. xws" border="0" /></td>
      <td width="100%" align="center">
      <table cellspacing="3" cellpadding="0" >
      <tr>
      <td valign="top"><i mg
      src="oudercomit é_files/oudercomité_ima ge4.jpg" editor="Webstyl e4"
      moduleid="ouder comité (Project)\ouder comité_image4.x ws" border="0"
      width="100" height="100" /></td>
      </tr>
      </table> </td>
      </tr>
      </table>
      </div>
      <!-- this loads the navigation bar-->
      <div id="hnavigation ">
      <script Webstyle4>docum ent.write('<scr '+'ipt
      src="oudercomit é_files/xaramenu.js">'+ '</scr'+'ipt>');do cument.write('< scr'+'ipt
      src="oudercomit é_files/oudercomitx_hna vbar.js">'+'</scr'+'ipt>');/*img
      src="oudercomit é_files/oudercomité_hna vbar.gif" moduleid="ouder comité
      (Project)\ouder comité_hnavbar_ off.xws"*/</script>
      </div>

      <div id="content">


      <table width="100%" border="0" cellspacing="0" cellpadding="0" >
      <tr >
      <td id="test">
      hallo
      </td>

      </tr>
      </table>

      </div>

      </body>
      </html>


      Comment

      Working...