WebSite X5Help Center

 
C K.
C K.
User

Close Window, Code  de

Author: C K.
Visited 1250, Followers 1, Shared 0  

Ich habe eine "Thank You Page", welche mit Close Window geschlossen werden kann. Ich habe verschiedene Codes (via Google) in ein HTML Objekt eingefügt, es funktioniert teilweise und teilweise nicht, abhängig vom Browser.

Kann mir jemand eine Code zur Verfügung stellen, welcher eine offene Seite mittels "Close Window" schliesst?

Es genügt, wenn diese Funktion als einfacher Link vorhanden ist, braucht nicht unbedingt einen Button.

Vielen Dank

Posted on the
11 ANSWERS
Andreas S.
Andreas S.
Moderator

Meinst du so was wie hier?

<a href="" onclick="self.close();">Close</a>

Read more
Posted on the from Andreas S.
C K.
C K.
User
Author

Vielen Dank, Andreas, dies funktioniert mit IE, aber nicht mit Chrome/Firefox....mind. bei mir nicht...

Read more
Posted on the from C K.
C K.
C K.
User
Author

auch in der Vorschau funktioniert es....

Read more
Posted on the from C K.
Andreas S.
Andreas S.
Moderator

Versuche mal das...ist aber gleichzeitig auch ein Button den du per CSS gestalten könntest.

Wenn du ein Fenster öffnen willst...

<script language="javascript">

function open_a_window()
{
   window.open("window_to_close.htm");

   return false;
}

</script>

<input type="button" onclick="return open_a_window();" value="Öffnet ein Fenster" />


Und hier ein Button um das Fenster zu schließen!


<script language="javascript">

function quitBox(cmd)
{     
    if (cmd=='quit')   
    {
       open(location, '_self').close();   
    }    
    return false;  
}

</script>

<input type="button" onclick="return quitBox('quit');" value="Schliesst ein Fenster" />

Read more
Posted on the from Andreas S.
C K.
C K.
User
Author

danke, Andreas, werde das testen....

Read more
Posted on the from C K.
Martin R.
Martin R.
User

Ich nutze das:

javascript:window.close()

Klappt bei allen Browsern.

Read more
Posted on the from Martin R.
C K.
C K.
User
Author

Besten Dank.

Martin: ist das hier, was ich im HTML Objekt eintragen muss?

<ahref="javascript:close_window();">close</a>

Habe dies so getestet, aber funktioniert nicht bei allen Browsern, oder ich mache was falsch.

Andreas: habe dies getestet, aber irgendwie scheint es, dass es nicht bei Chrome, IE und Mozila funktioniert, bei IE funktioniert es am besten.

Ist so eine Kleinigkeit eine grosse Sache...undecided

Read more
Posted on the from C K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

<a href = "void(0)" onclick= "javascript:window.close()" > Close PopUp </a>

... schließt die selbe Seite ...
... um richtig zu funktionieren muss eingegeben werden in einer geöffneten Seite in PopUp.

(IT) ... chiude la stessa pagina...
... per funzionare correttamente deve essere inserito in una pagina aperta in PopUp.

.

ciao

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
C K.
C K.
User
Author

Danke & grazie!

Die Seite, welche schliessen soll, ist die Seite "Bestätigungsseite nach Datenversand" im Objekt Kontaktformular.

Read more
Posted on the from C K.
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

Entschuldigung für die Übersetzung;
Dann kann es nicht richtig funktionieren.
Dieser Code es kann funktionieren wenn die Seite im PopUp-Fenster geöffnet ist.

(IT) Scusami per la traduzione;
Allora non può funzionare correttamente.
Quel codice può funzionare se la pagina viene aperta in finestra PopUp.

.

ciao

.

Read more
Posted on the from  ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
 ‪ KolAsim ‪ ‪
Moderator

... ... ... in Ihrem Fall können Sie einfach eine CLOSE-Taste (Text, Bild, Objekt) mit dem Link zur Seite HOME oder zu der von Ihnen bevorzugten Seite verwenden, und Sie hätten es gelöst ...
... vielleicht ...
Hallo

.

(IT) ... ... ... nel tuo caso potresti semplicemente far uso di un pulsante CHIUDI, (testo, immagine, object), con il collegamento alla pagina HOME o alla pagina che preferisci, ed avresti così risolto...
... forse ...
ciao
.

Read more
Posted on the from  ‪ KolAsim ‪ ‪