Vorige in HTA bestand

Pagina: 1
Acties:
  • 370 views sinds 30-01-2008
  • Reageer

  • thisegzz
  • Registratie: Juni 2007
  • Laatst online: 30-11 16:25

thisegzz

(-(-_(-_-)_-)-)

Topicstarter
Ik heb een HTA bestand, en nu wil ik een link maken die werkt als de vorige knop. Maar helaas kan je in HTA niet terug... Op http://www.thescripts.com/forum/thread92005.html staat een manier om dit toch te kunnen, maar ik begrijp het niet. Dus kan iemand mij hiermee helpen?

Thanx,
Thisegzz

[ Voor 8% gewijzigd door thisegzz op 11-09-2012 16:50 ]


  • thisegzz
  • Registratie: Juni 2007
  • Laatst online: 30-11 16:25

thisegzz

(-(-_(-_-)_-)-)

Topicstarter
-

[ Voor 100% gewijzigd door thisegzz op 11-09-2012 16:49 ]


  • hufkes
  • Registratie: Maart 2000
  • Laatst online: 01-12 01:14

hufkes

nee, daar staat niet hufter!

Eerste zinnetjes in die link die je geeft is niet interessant, daarna zegt hij dat je een frame moet maken waar je de echte pagina in propt (genaamd "window") en eentje waar je onderstaande javascript in stopt.

Eerste stuk geeft dus de daadwerkelijk scriptcode weer, het onderstaaste stukje definieer je wanneer de verschillende functies worden aangeroepen, in dit geval dus als gevolg van het klikken op een hyperlink. "foobar.html" geeft dus de naam van de pagina weer die geopend moet worden in het frame window wanneer je op die link klikt.

JavaScript:
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
function History(target)
{
var items = [];
var currentItem = 0;

this.goto =
function history_goto(sURL)
{
items[currentItem++] = target.location;
target.location = sURL;
};

this.go =
function history_go(n)
{
if (currentItem + n < 0 || currentItem + n > items.length - 1)
{
if (n < 0)
n = -currentItem;
else
n = items.length - 1 - currentItem;
}
target.location = items[currentItem += n];
};

this.back =
function history_back()
{
this.go(-1);
};

this.forward =
function history_forward()
{
this.go(+1);
};
}

/*
* The non-function properties of the prototype are accessible
* via the function properties, the methods, only. If you need
* direct access, declare them as properties of `this' instead.)
*/

if (parent)
{
if (!parent.history)
// Let the history be a property of the parent frameset;
// navigation affects the location of the current frame (window)
parent.history = new History(window);
}

function checkProp(sProp)
{
return (parent && parent.history && parent[sProp]);
}

function back()
{
if (checkProp("back"))
parent.history.back();

return false;
}

function forward()
{
if (checkProp("forward"))
parent.history.forward();

return false;
}

function goto(sURL)
{
if (checkProp("goto"))
parent.history.goto(sURL);

return false;
}

HTML:
1
2
3
4
<a href="#" onclick="return back();">Back</a>
<a href="#" onclick="return forward();">Forward</a>
...
<a href="foobar.html" onclick="return goto(this.href);">Next</a>

[ Voor 16% gewijzigd door hufkes op 05-06-2007 17:30 ]

Onderstaande signature is al >20jr oud ***hoe dan***
---
Het internet is een veelbelovend medium
....dat maar heel weinig van zijn beloftes nakomt.
Wat weg is... raak je nooit meer kwijt :P


  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Dat jij 12 bent veranderd niks aan 't feit dat GoT geen persoonlijke supportdesk is :|

Lees ook Webdesign, Markup & Clientside Scripting Policy even als je wilt ;)

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.