468,780 Members | 2,200 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,780 developers. It's quick & easy.

menu javascript and frames

Hello.

I am an italian student and I do not known javascript language.

I need your help!

I have built a web page with frames (left frame and main frame).
In the left frames I have attach the code that you find below.
I have a problem. because I am not able...when I choose a voice in the menu,
the relative web page open in the left menu....where there is the menu; but
I want that the web page should be display in the main frames!
Anubody can help me?
Thanks in advance and I apologize for my english!

In my opinion I must change something here:

ejs_mv3_lien[0] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

but I do not known what put!
The code in the left frame:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Documento senza titolo</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

</HEAD>

<BODY BGCOLOR="black" vlink="red" link="blue">

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><font color="#999999" face="Lucida Handwriting"><strong>Men<font
color="#E4D28B">u'</font></strong></font></p>

<p>&nbsp;</p>

<p>

<script language="JavaScript">

document.write('<STYLE TYPE=text/css>');

document.write('.ejs_mv3_styl_scroll
{font-size:12px;font-family:Verdana;color:#999999;text-decoration:none}');

document.write('</STYLE>');

ejs_mv3_largeur = 180;

ejs_mv3_hauteur = 120;

ejs_mv3_bgcolor = '#E4D28B';

ejs_mv3_menu = new Array;

ejs_mv3_menu[0] = 'Home page';

ejs_mv3_menu[1] = 'Sc';

ejs_mv3_menu[2] = 'Fi';

ejs_mv3_menu[3] = 'Contatti';

ejs_mv3_menu[4] = 'Dove Siamo';

ejs_mv3_lien = new Array;

ejs_mv3_lien[0] = ''

ejs_mv3_lien[1] = ''

ejs_mv3_lien[2] = ''

ejs_mv3_lien[3] = ''

ejs_mv3_lien[4] = ''

ejs_mv3_lien[0] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[0] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[0] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[1] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[1] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[2] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[2] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[2] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[3] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[3] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[3] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

ejs_mv3_lien[4] += '- <A HREF="http://freephp.it/script/index.asp"
CLASS=ejs_mv3_styl_scroll>xxxx</A><BR>';

function d(texte)

{

document.write(texte);

}

d('<DIV ID=ejs_mv3_relativ
STYLE="position:relative;width:'+ejs_mv3_largeur+' ;height:'+ejs_mv3_hauteur+'">');

d('<DIV ID=ejs_mv3_cadre
STYLE="position:absolute;width:'+(ejs_mv3_largeur-8)+';height:'+(ejs_mv3_hauteur-8)+';top:4;left:4;clip:rect(0
'+(ejs_mv3_largeur-8)+' '+(ejs_mv3_hauteur-8)+' 0)">');

d('<div id=ejs_mv3_scroll_1
style="position:absolute;width:'+(ejs_mv3_largeur-8)+';left:0;top:0;"
CLASS=ejs_mv3_styl_scroll>Caricamento del mený ...</DIV>');

d('<div id=ejs_mv3_scroll_2
style="position:absolute;width:'+(ejs_mv3_largeur-8)+';top:0;left:'+ejs_mv3_largeur+';"
CLASS=ejs_mv3_styl_scroll></DIV>');

d('</DIV></DIV>');

ejs_mv3_mode = 1;

ejs_mv3_actuel = 0;

function ejs_mv3_show(menu)

{

if(menu == "menu")

{

var html = "<TABLE BORDER=1 BORDERCOLOR=black WIDTH=100% CELLSPACING=0
BGCOLOR="+ejs_mv3_bgcolor+">";

for(a=0;a<ejs_mv3_menu.length;a++)

{

html += '<TR><TD><A HREF=# onClick=\'ejs_mv3_show('+a+');return(false)\'
CLASS=ejs_mv3_styl_scroll>'+ejs_mv3_menu[a]+'</A></TD></TR>';

}

html += "</TABLE>";

document.getElementById("ejs_mv3_scroll_1").innerH TML = html;

if(ejs_mv3_mode == 2)

ejs_mv3_action(1);

}

else

{

var html = "<TABLE HEIGHT="+(ejs_mv3_hauteur-15)+" BORDER=1
BORDERCOLOR=black WIDTH=100% CELLSPACING=0
BGCOLOR="+ejs_mv3_bgcolor+"><TR><TD HEIGHT=20 ALIGN=center
CLASS=ejs_mv3_styl_scroll>"+ejs_mv3_menu[menu]+"</TD></TR><TR><TD
HEIGHT="+(ejs_mv3_hauteur-55)+" VALIGN=top
CLASS=ejs_mv3_styl_scroll>"+ejs_mv3_lien[menu]+"</TD></TR><TR><TD HEIGHT=20
CLASS=ejs_mv3_styl_scroll>&lt; <A HREF=#
onClick='ejs_mv3_show(\"menu\");return(false)'
CLASS=ejs_mv3_styl_scroll>Indietro</A></TD></TR></TABLE>";

document.getElementById("ejs_mv3_scroll_2").innerH TML = html;

if(ejs_mv3_mode == 1)

ejs_mv3_action(2);

}

}

ejs_mv3_cursor = ejs_mv3_largeur;

function ejs_mv3_action(action)

{

if(action == 2)

{

if(ejs_mv3_cursor>0)

{

ejs_mv3_cursor -= 10;

document.getElementById("ejs_mv3_scroll_1").style. left =
ejs_mv3_cursor-ejs_mv3_largeur;

document.getElementById("ejs_mv3_scroll_2").style. left = ejs_mv3_cursor;

setTimeout("ejs_mv3_action("+action+")",1);

ejs_mv3_mode = 2;

}

}

else

{

if(ejs_mv3_cursor<ejs_mv3_largeur)

{

ejs_mv3_cursor += 10;

document.getElementById("ejs_mv3_scroll_1").style. left =
ejs_mv3_cursor-ejs_mv3_largeur;

document.getElementById("ejs_mv3_scroll_2").style. left = ejs_mv3_cursor;

setTimeout("ejs_mv3_action("+action+")",1);

ejs_mv3_mode = 1;

}

}

}

window.onload = new Function("ejs_mv3_show('menu')");

</script>

</p>

<p><br>

<br>

<br>

<br>
Nov 6 '06 #1
2 1615

SiNi wrote:
Hello.

I am an italian student and I do not known javascript language.

I need your help!

I have built a web page with frames (left frame and main frame).
In the left frames I have attach the code that you find below.
I have a problem. because I am not able...when I choose a voice in the menu,
the relative web page open in the left menu....where there is the menu; but
I want that the web page should be display in the main frames!
Anubody can help me?
Thanks in advance and I apologize for my english!

Not really "JavaScript".

In the links that is displayed in the menu frame:
<a href="URL" target="NameOfMainFrame">DESCRIPTION</a>

Where "NameOfMainFrame" is the name you called your "main frame", as
you didn't paste the Framesets I couldn't create this for you. But you
should be able to figure it out.

Also checkout:
http://www.w3.org/TR/html4/present/f...ml#adef-target

By the way; your english is fine.

Have a nice day.

<--snip-->

Nov 6 '06 #2
In the links that is displayed in the menu frame:
<a href="URL" target="NameOfMainFrame">DESCRIPTION</a>
Where "NameOfMainFrame" is the name you called your "main frame", as
you didn't paste the Framesets I couldn't create this for you. But you
should be able to figure it out.
Thanks.

I tryed...

ejs_mv3_lien[0] += '- <A HREF="../IMMAGINI/ACQUA.JPG"
target="../I_menu/I_menu_body.htm">FOTO1</A><BR>';
where:
"acqua.jpg" is a photo that I want to display in the main frame.

"../I_menu/I_menu_body.htm" in the path of the "main fram"

FOTO1 in the text that appear in the MENU.

The photo is display...but in another new window of Internet Explorer...and
not in the frame called "I_menu_body.htm"...where I am Wrong?
Thanks in advance!

SINi

>
Also checkout:
http://www.w3.org/TR/html4/present/f...ml#adef-target

By the way; your english is fine.

Have a nice day.

<--snip-->

Nov 6 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by MP Multimedia | last post: by
4 posts views Thread by JesusFreak | last post: by
2 posts views Thread by RWD | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.