Autor Beitrag
lemming
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Di 12.07.05 14:25 
Hallo,

ich habe so ein Javascript:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
javascript:void(
win=window.open('http://www.example.com?from='+location.href,%20'Hallo',%20' 
width=390, 
height=235, 
resizable=yes, 
scrollbars=no, 
menubar=no, 
status=no'))


Das öffnet mir ein Popup und übergibt der öffnenden Seite die URL der letzten Seite. Jetzt möchte ich das ganze nicht mehr als Popup, sondern als einfachen Link. Wie hat da das javascript auszusehen?

Danke

lemming
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 12.07.05 14:37 
Hallo! ;)

Probier' mal das:
ausblenden Quelltext
1:
2:
3:
javascript:void(
document.location.href='http://www.example.com?from='+location.href
)


^^keine Garantie :tongue:
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: Di 12.07.05 14:52 
Oder so:
ausblenden Quelltext
1:
document.write('<a href="http://www.example.com?from='+location.href+'">Klick</a>');					

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
Phobeus
ontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1280

Linux (FC6), WinXP Pro (Box)
D6 Pers, D7 Pro, FPC 2.x
BeitragVerfasst: Di 12.07.05 15:26 
Und wenn man es dann nochmal verbessern möchte, dann nimm kein JS, sondern so etwas wie PHP, damit auch Nutzer ohne JS deine Seite noch "beklicken" können ;)

_________________
"Menschen sterben nicht wenn man sie zu Grabe trägt, sondern wenn sie ihre Träume verlieren..."
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Di 12.07.05 15:51 
user profile iconPhobeus hat folgendes geschrieben:
Und wenn man es dann nochmal verbessern möchte, dann nimm kein JS, sondern so etwas wie PHP, damit auch Nutzer ohne JS deine Seite noch "beklicken" können ;)

Voraussetzung dafür ist aber ein PHP-Parser der auf dem Server installiert ist... ;)
lemming Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 470

Mac OS 10.3.1
Delphi 6 Pro, Kylix 3
BeitragVerfasst: Mi 13.07.05 15:05 
Herzlichsten Dank.

PHP kann ich für den Link da leider nicht einsetzen, da das ganze in die Linkleiste des Browsers kommt.

Nochmals Danke.

lemming