Toch weer Javascript en frames ;)

Pagina: 1
Acties:

  • EL_Loco
  • Registratie: Oktober 2001
  • Laatst online: 08-11-2023

EL_Loco

alias Haco

Topicstarter
ik had al eerder een topic hierover, ik dacht dat ik de oplossing al wist, en had gevraagd of het draadje dicht mocht, maar nu zit ik weer vast ;(
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
<title>DBZ RPG</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
var width = screen.width;
var res =(((!(640-width))*1)+((!(800-width))*2)+((!(1024-width))*3)+
((!(1152-width))*4)+((!(1280-width))*5)+((!(1600-width))*6));
if(!(res)) res = 1;
if (res=='1')
{"parent.frames['leftFrame'].location.href = 'side8x6il.htm';"
"parent.frames['mainFrame'].location.href = 'loggedin.htm';"}
if (res=='2')
{"parent.frames['leftFrame'].location.href = 'side8x6il.htm';"
"parent.frames['mainFrame'].location.href = 'loggedin.htm';"}
if (res=='3')
{"parent.frames['leftFrame'].location.href = 'side7x1il.htm';"
"parent.frames['mainFrame'].location.href = 'loggedin.htm';"}
if (res!='1' && res!='2' && res!='3')
{"parent.frames['leftFrame'].location.href = 'side7x1il.htm';"
"parent.frames['mainFrame'].location.href = 'loggedin.htm';"}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>You will be redirected, if not, please select use one of these links.</p>
<p>If your screen-resolution is 800x600, 
<a href="side8x6il.htm.htm" target="leftFrame">click here</a><br>
If your screenresolution is 1024x768, 
<a href="side7x1il.htm.htm" target="leftFrame">click here</a><br>
 Else, <a href="side8x6il.htm.htm" target="leftFrame">click here</a>.</p>
</body>
</html>

dit is een redirect scriptje, die iemand redirect aan de hand van zijn resolutie.
maar het werkt niet, nu weet ik niet zoveel van javascript,
maar dit zou geloof ik wel moeten werken,
ook met de tutjes die ik gelezen heb.
* EL_Loco is confuus : |
-edit- typo's eruit, en iets minder layout verklotent gemaakt

rumores non hiatus dremelunt
malleo omnia consentiunt
Lid van het Anti-Jamba front!


  • Bosmonster
  • Registratie: Juni 2001
  • Laatst online: 29-08 19:47

Bosmonster

*zucht*

Maak van al die regels met veelste veel quotes:

code:
1
2
3
if (res=='2')
{"parent.frames['leftFrame'].location.href = 'side8x6il.htm';"
"parent.frames['mainFrame'].location.href = 'loggedin.htm';"}


eens dit:

code:
1
2
3
if (res==2)
{parent.frames['leftFrame'].location.href = 'side8x6il.htm';
parent.frames['mainFrame'].location.href = 'loggedin.htm';}

  • EL_Loco
  • Registratie: Oktober 2001
  • Laatst online: 08-11-2023

EL_Loco

alias Haco

Topicstarter
Yep, dan werkt het wel :)
danku

rumores non hiatus dremelunt
malleo omnia consentiunt
Lid van het Anti-Jamba front!