Hi,
I have the following script (javascript in html document):
<html>
<head>
<meta http-equiv="content-type"
content="text/html;charset=IS O-8859-1">
<title>Stando rt Speichern</title>
<link rel="stylesheet " type="text/css"
href="../../../stylesheets/styles.css">
<script language="javas cript">
// 0=icon, 1=menue, 2=kopf, 3=task, 4=text, 5=bild, 6=navigation
// benötigt werden zum save nur die Frames 0, 2, 4, 5, 6
URL0 = top.window.open er.parent.frame s[0].location.href;
// ist der Inhalt des Icon-Frames
URL1 = top.window.open er.parent.frame s[2].location.href;
// ist der Inhalt des Kopf-Frames
URL2 = top.window.open er.parent.frame s[4].location.href;
// ist der Inhalt des Text-Frames
URL3 = URL2.substring( 0,URL2.length-5) + "b.htm"
// generiert aus dem eineindeutigen Text-Frame das dazugehörige
Bildframe, damit kann das Problem mit den
// verschiedenen Inhalten im Bildframe (b.htm, g.htm, gx.htm)
umschifft werden
URL4 = top.window.open er.parent.frame s[6].location.href;
// ist der Inhalt des Navigation-Frames
function setCookie(Cooki eName, URL0, URL1, URL2, URL3, URL4, expires)
{
document.cookie = escape(CookieNa me) + "="
+ escape(CookieNa me) + "URL0$" + escape(URL0) + "&"
+ escape(CookieNa me) + "URL1$" + escape(URL1) + "&"
+ escape(CookieNa me) + "URL2$" + escape(URL2) + "&"
+ escape(CookieNa me) + "URL3$" + escape(URL3) + "&"
+ escape(CookieNa me) + "URL4$" + escape(URL4) + "&"
+ ((expires == null) ? "" : ("; expires=" +
expires.toGMTSt ring()));
}
function save(UserName)
{
var today = new Date();
var expires = new Date();
expires.setTime (today.getTime( ) + 1000*60*60*24*3 65);
// setzt das Verfallsdatum des Cookies auf heute in einem Jahr
(ms*sec*min*h*d ), da sonst das Cookie
// bei Schliessen des Browsers automatisch gelöscht wird
if (UserName != "")
{
CookieName = UserName;
setCookie(Cooki eName, URL0, URL1, URL2, URL3, URL4, expires);
}
}
</script>
</head>
<body class="basic">
<div align="center">
<h3>Standort speichern</h3>
</div>
<br>
<p>Bitte geben Sie im folgenden Textfeld den <strong>Namen des
Standorts</strong> ein unter dem Sie Ihren Lernstand speichern
wollen.</p>
<p>Nach dem Klicken auf die Schaltfl‰che
"<strong>S peichern</strong>"wi rd Ihr aktueller Standort
unter dem gewählten Namen gespeichert.</p>
<br>
<form onSubmit="retur n false">
<center>
<div align="center">
<p>
<input TYPE="text" NAME="username" SIZE="20">
<input TYPE="button" style="font-family:Arial,
Helvetica;font-size:12px;font-weight:bold;bac kground-color:#c2c2c2;c olor:
#000080"
value="Speicher n"
onClick="javasc ript:save(this. form.username.v alue);window.cl ose();">
</p>
</div>
</center>
</form>
<br><br><br>
<form NAME="Schaltfl& auml;che OK">
<div align="center">
<input type="button" style="font-family:Arial,He lvetica;
font-size:12px;font-weight:bold;bac kground-color: #c2c2c2;color:
#000080"
name="Schaltfl& auml;che OK" onclick="window .close();"
value="Fenster schliessen">
</div>
</form>
</body>
</html>
What I want to do: save the actual position of a user in this
(learning) program. The screen is built of 7 frames (complex learning
context, needs 7 frames...) of which the url of 5 frames should be
saved in order to return to the actual posistion in the program later.
The script works on:
http://www.zahnpasten.hcbe.ch/home/i...e/homepage.htm but
not on my side - HELP !!!!
ps: I am very unexperienced in programming
THANKS FOR ANY HELP
I have the following script (javascript in html document):
<html>
<head>
<meta http-equiv="content-type"
content="text/html;charset=IS O-8859-1">
<title>Stando rt Speichern</title>
<link rel="stylesheet " type="text/css"
href="../../../stylesheets/styles.css">
<script language="javas cript">
// 0=icon, 1=menue, 2=kopf, 3=task, 4=text, 5=bild, 6=navigation
// benötigt werden zum save nur die Frames 0, 2, 4, 5, 6
URL0 = top.window.open er.parent.frame s[0].location.href;
// ist der Inhalt des Icon-Frames
URL1 = top.window.open er.parent.frame s[2].location.href;
// ist der Inhalt des Kopf-Frames
URL2 = top.window.open er.parent.frame s[4].location.href;
// ist der Inhalt des Text-Frames
URL3 = URL2.substring( 0,URL2.length-5) + "b.htm"
// generiert aus dem eineindeutigen Text-Frame das dazugehörige
Bildframe, damit kann das Problem mit den
// verschiedenen Inhalten im Bildframe (b.htm, g.htm, gx.htm)
umschifft werden
URL4 = top.window.open er.parent.frame s[6].location.href;
// ist der Inhalt des Navigation-Frames
function setCookie(Cooki eName, URL0, URL1, URL2, URL3, URL4, expires)
{
document.cookie = escape(CookieNa me) + "="
+ escape(CookieNa me) + "URL0$" + escape(URL0) + "&"
+ escape(CookieNa me) + "URL1$" + escape(URL1) + "&"
+ escape(CookieNa me) + "URL2$" + escape(URL2) + "&"
+ escape(CookieNa me) + "URL3$" + escape(URL3) + "&"
+ escape(CookieNa me) + "URL4$" + escape(URL4) + "&"
+ ((expires == null) ? "" : ("; expires=" +
expires.toGMTSt ring()));
}
function save(UserName)
{
var today = new Date();
var expires = new Date();
expires.setTime (today.getTime( ) + 1000*60*60*24*3 65);
// setzt das Verfallsdatum des Cookies auf heute in einem Jahr
(ms*sec*min*h*d ), da sonst das Cookie
// bei Schliessen des Browsers automatisch gelöscht wird
if (UserName != "")
{
CookieName = UserName;
setCookie(Cooki eName, URL0, URL1, URL2, URL3, URL4, expires);
}
}
</script>
</head>
<body class="basic">
<div align="center">
<h3>Standort speichern</h3>
</div>
<br>
<p>Bitte geben Sie im folgenden Textfeld den <strong>Namen des
Standorts</strong> ein unter dem Sie Ihren Lernstand speichern
wollen.</p>
<p>Nach dem Klicken auf die Schaltfl‰che
"<strong>S peichern</strong>"wi rd Ihr aktueller Standort
unter dem gewählten Namen gespeichert.</p>
<br>
<form onSubmit="retur n false">
<center>
<div align="center">
<p>
<input TYPE="text" NAME="username" SIZE="20">
<input TYPE="button" style="font-family:Arial,
Helvetica;font-size:12px;font-weight:bold;bac kground-color:#c2c2c2;c olor:
#000080"
value="Speicher n"
onClick="javasc ript:save(this. form.username.v alue);window.cl ose();">
</p>
</div>
</center>
</form>
<br><br><br>
<form NAME="Schaltfl& auml;che OK">
<div align="center">
<input type="button" style="font-family:Arial,He lvetica;
font-size:12px;font-weight:bold;bac kground-color: #c2c2c2;color:
#000080"
name="Schaltfl& auml;che OK" onclick="window .close();"
value="Fenster schliessen">
</div>
</form>
</body>
</html>
What I want to do: save the actual position of a user in this
(learning) program. The screen is built of 7 frames (complex learning
context, needs 7 frames...) of which the url of 5 frames should be
saved in order to return to the actual posistion in the program later.
The script works on:
http://www.zahnpasten.hcbe.ch/home/i...e/homepage.htm but
not on my side - HELP !!!!
ps: I am very unexperienced in programming
THANKS FOR ANY HELP
Comment