By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,341 Members | 1,619 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,341 IT Pros & Developers. It's quick & easy.

inserting htm

P: n/a
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("xyz",".gif",27,118,"javascript:var newwin=window.open
(another.htm',null,'height=200,width=400,status=ye s,toolbar=no,menubar=no,
location=no')","","tag-name",2,2,"oudercomitx_hnavbar_plain");

thanks
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <kA*****************@phobos.telenet-ops.be>,
"j van c" <jv******@pandora.be> wrote:
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("xyz",".gif",27,118,"javascript:var newwin=window.open
(another.htm',null,'height=200,width=400,status=ye s,toolbar=no,menubar=no,
location=no')","","tag-name",2,2,"oudercomitx_hnavbar_plain");

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
Jul 23 '05 #2

P: n/a
> To look further into what is going on we need:
a copy of the function mainMenuItem and a copy of the referenced html.

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_hnavbar.js (dealing with a horizontal
navigation bar)

if(typeof(loc)=="undefined"||loc==""){var
loc="";if(document.body&&document.body.innerHTML){ var
tt=document.body.innerHTML;var
ml=tt.match(/["']([^'"]*)oudercomitx_hnavbar.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_hnavbar_menu
{z-index:999;border-color:#000000;border-style:solid;border-width:"+bd+"px
0px "+bd+"px
0px;background-color:#aaaaaa;position:absolute;left:0px;top:0px;v isibility:hidden;}");
document.write(".oudercomitx_hnavbar_plain,
a.oudercomitx_hnavbar_plain:link,
a.oudercomitx_hnavbar_plain:visited{text-align:left;background-color:#aaaaaa;color:#000000;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px
"+bd+"px 0px "+bd+"px;padding: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:hover,
a.oudercomitx_hnavbar_plain:active{background-color:#0000aa;color:#ffffff;text-decoration:none;border-color:#000000;border-style:solid;border-width:0px
"+bd+"px 0px "+bd+"px;padding: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(frames)=="undefined"){var frames=0;}

startMainMenu("",0,0,2,0,0)
mainMenuItem("oudercomitx_hnavbar_b1",".gif",27,11 8,loc+"ocdoel.htm","","doel",2,2,"oudercomitx_hnav bar_plain");

<!-- the ocdoel.htm is opening but a the upperleft corner. My heading and
navigation bar are overwritten -->
mainMenuItem("oudercomitx_hnavbar_b2",".gif",27,11 8,"javascript:;????","","activiteiten",2,2,"ouderc omitx_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.open
(another.htm',null,'height=200,width=400,status=ye s,toolbar=no,menubar=no,
location=no')"-->
mainMenuItem("oudercomitx_hnavbar_b3",".gif",27,11 8,"javascript:;","","foto's",2,2,"oudercomitx_hnav bar_plain");
mainMenuItem("oudercomitx_hnavbar_b4",".gif",27,11 8,"javascript:;","","Links",2,2,"oudercomitx_hnavb ar_plain");
mainMenuItem("oudercomitx_hnavbar_b5",".gif",27,11 8,"javascript:;","","contacteer
ons",2,2,"oudercomitx_hnavbar_plain");
mainMenuItem("oudercomitx_hnavbar_b6",".gif",27,11 8,"javascript:;","","bestuur
en leden",2,2,"oudercomitx_hnavbar_plain");
endMainMenu("",0,0);

startSubmenu("oudercomitx_hnavbar_b4","oudercomitx _hnavbar_menu",118);
submenuItem("vcov","javascript:;","","oudercomitx_ hnavbar_plain");
endSubmenu("oudercomitx_hnavbar_b4");

startSubmenu("oudercomitx_hnavbar_b3","oudercomitx _hnavbar_menu",119);
submenuItem("oktobertreffen","javascript:;","","ou dercomitx_hnavbar_plain");
submenuItem("glühwein","javascript:;","","oudercom itx_hnavbar_plain");
submenuItem("nieuwjaarsreceptie","javascript:;","" ,"oudercomitx_hnavbar_plain");
endSubmenu("oudercomitx_hnavbar_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);oudercomité;Theme Colour 1;16227132;themecolour1;Bullet
highlight;3276544;themecolour2;Sub-Heading
Text;10635008;themecolour5;Background Color;16777215;themecolour6;Button
Text(over);0;themecolour7;Button Text;0;themecolour8;Heading & Logo
Text;0;themecolour9] -->
<!-- Template design (c) Xara Ltd 2003 -->
<title>Elements 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é_topstrip.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é_bullet.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"><img
src="oudercomité_files/oudercomité_heading.jpg" editor="Webstyle4"
moduleid="oudercomité (Project)\oudercomité_heading.xws" border="0" /></td>
<td width="100%" align="center">
<table cellspacing="3" cellpadding="0">
<tr>
<td valign="top"><img
src="oudercomité_files/oudercomité_image4.jpg" editor="Webstyle4"
moduleid="oudercomité (Project)\oudercomité_image4.xws" border="0"
width="100" height="100" /></td>
</tr>
</table> </td>
</tr>
</table>
</div>
<!-- this loads the navigation bar-->
<div id="hnavigation">
<script Webstyle4>document.write('<scr'+'ipt
src="oudercomité_files/xaramenu.js">'+'</scr'+'ipt>');document.write('<scr'+'ipt
src="oudercomité_files/oudercomitx_hnavbar.js">'+'</scr'+'ipt>');/*img
src="oudercomité_files/oudercomité_hnavbar.gif" moduleid="oudercomité
(Project)\oudercomité_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>
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.