php.de

Zurück   php.de > Webentwicklung > HTML, Usability und Barrierefreiheit

HTML, Usability und Barrierefreiheit Themen rund um Textauszeichnung, Formatierung, Barrierefreiheit und Usability.

Antwort
 
LinkBack Themen-Optionen Thema bewerten
Alt 31.05.2005, 03:29  
Gast
 
Beiträge: n/a
Standard opener.location.reload mit timeout funktioniert nicht

Hallo,

ich hab keinen blassen dunst warum das nicht funktionert:

Code:
<SCRIPT language='JavaScript'>
<!--hide
function reloadclose()
{
setTimeout('opener.location.reload();window.close()', 1000);
}
//-->
</SCRIPT>
Ich ruf die funktion so auf:

Code:
<input type=CHECKBOX onClick=\"location.href='cal_eintrag.php?action=day_block&von=$user_ID&an=$set_ADM&datum=$tdate';reloadclose();\">
...er refresht weder das "Mutterfenster" noch schließt er das fenster

wobei es nur hier funktioniert:

Code:
<input type=button border=0 value='Springe zu Kontakt' onClick=\"opener.location.href='kd_detail.php?action=select&ab=0&bis=100&ID=".$term_fetch2['contact']."';reloadclose();\">
hier mal der ganze code:

PHP-Code:
<?php

echo "
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>

<html>
<head>
    <title>Termineintrag</title>
    <SCRIPT language='JavaScript'>
<!--hide

function reloadclose()
{
setTimeout('opener.location.reload();window.close()', 3000);
}

//-->
</SCRIPT>

</head>

<body bgcolor=$bgcolor3 text=#000000 link=#0000FF vlink=#800080 alink=#FF0000>"
;

if(
$term_ID=="")
    {
    echo
"
    <font color=#00FF00>[b]Neueintrag[/b]</font>
    <table border=0 cellpadding=0 cellspacing=0>
    <form action=cal_eintrag.php method=post onsubmit=\"opener.location.reload();window.close();\">
    <input type=HIDDEN name=action value=set_termin>
    <input type=HIDDEN name=von value=$user_ID>
    <input type=HIDDEN name=an value='$set_ADM'>
    <input type=HIDDEN name=ID value='$ID'>
    
    <input type=HIDDEN name=ADM_mail value='$ADM_mail'>
    <input type=HIDDEN name=kdmail_firma value='"
.$kd_event2['firma']."'>
    <input type=HIDDEN name=kdmail_name value='"
.$kd_event2['nachname']."'>
    <input type=HIDDEN name=kdmail_vname value='"
.$kd_event2['vorname']."'>
    <input type=HIDDEN name=kdmail_tel1 value='"
.$kd_event2['tel1']."'>
    <input type=HIDDEN name=kdmail_mobil value='"
.$kd_event2['mobil']."'>
    <input type=HIDDEN name=kdmail_str value='"
.$kd_event2['strasse']."'>
    <input type=HIDDEN name=kdmail_plz value='"
.$kd_event2['plz']."'>
    <input type=HIDDEN name=kdmail_stadt value='"
.$kd_event2['stadt']."'>
    <input type=HIDDEN name=kdmail_email value='"
.$kd_event2['email']."'>
    <input type=HIDDEN name=kdmail_url value='"
.$kd_event2['url']."'>
    <input type=HIDDEN name=kdmail_branche1 value='"
.$kd_event2['branche1']."'>
    <input type=HIDDEN name=kdmail_branche2 value='"
.$kd_event2['branche2']."'>
    <input type=HIDDEN name=kdmail_branche3 value='"
.$kd_event2['branche3']."'>
    <input type=HIDDEN name=kdmail_branche4 value='"
.$kd_event2['branche4']."'>
    
    <input type=HIDDEN name=term_ID value='$term_ID'>
    <tr><td colspan=2>[b]Datum[/b]</td></tr>
    <tr><td colspan=2><input type='text' size=10 name='datum' value='$tdate'>
    
    [b]von:[/b]<input type='text' name='anfang' alt='4 Stellige Anfangszeit zB 0830' value='$anfang' size='4' maxlength='4' >
    [b]bis:[/b]<input type='text' name='ende' size='4' value='"
.$out10['ende']."$ende' maxlength='4' >
    [b]Tag Blocken[/b]<input type=CHECKBOX onClick=\"location.href='cal_eintrag.php?action=day_block&von=$user_ID&an=$set_ADM&datum=$tdate';reloadclose();\"></td></tr>
    
    <tr><td colspan=2>[b]Event[/b]</td></tr>
    <tr><td colspan=2><input type=text size=70 name=event value='"
.$kd_event2['stadt'].",".$kd_event2['strasse'].",".$kd_event2['firma'].",".$kd_event2['nachname'].",".$kd_event2['tel1']."'></td></tr>

    <tr><td colspan=2>[b]Bemerkung Termin[/b]</td></tr>
    <tr><td colspan=2><textarea name=note2 rows=5 cols=53></textarea></td></tr>

    <tr><td><input type=submit border=0  value=Speichern></form></td>

    <td align=right>
    </td>
    </tr>
    </table>"
;
    }
    else
        {
        echo
"
        <font color=#FF0000>[b]Ändern/Löschen[/b]</font>
        <table border=0 cellpadding=0 cellspacing=0>
        <form action=cal_eintrag.php method=get onsubmit=\"reloadclose()\">
        <input type=HIDDEN name=action value=up_termin>
        <input type=HIDDEN name=von value=$user_ID>
        <input type=HIDDEN name=an value=$set_ADM>
        <input type=HIDDEN name=ID value='$ID'>
        <input type=HIDDEN name=term_ID value='$term_ID'>
        <tr><td colspan=2>[b]Datum[/b]</td></tr>
        <tr><td colspan=2><input type='text' size=10 name='datum' value='"
.$term_fetch2['datum']."'>[b]von:[/b]<input type='text' name='anfang' alt='4 Stellige Anfangszeit zB 0830' value='".$term_fetch2['anfang']."' size='4' maxlength='4' >[b]bis:[/b]<input type='text' name='ende' size='4' value='".$term_fetch2['ende']."' maxlength='4' ></td></tr>
        <tr><td colspan=2>[b]Event[/b]</td></tr>
        <tr><td colspan=2><input type=text size=70 name=event value='"
.$term_fetch2['event']."'></td></tr>
    
        <tr><td colspan=2>[b]Bemerkung Termin[/b]</td></tr>
        <tr><td colspan=2><textarea name=note2 rows=5 cols=53>"
.$term_fetch2['note2']."</textarea></td></tr>
    
        <tr><td><input type=submit border=0 value=Speichern>
        <input type=button border=0 value='Springe zu Kontakt' onClick=\"opener.location.href='kd_detail.php?action=select&ab=0&bis=100&ID="
.$term_fetch2['contact']."';reloadclose();\"></form></td>

        <td align=right>
        <form action=cal_eintrag.php method=get onsubmit=\"reloadclose()\">
        <table border=0 cellpadding=0 cellspacing=0>
        <input type=HIDDEN name=action value=del_termin>
        <input type=HIDDEN name=von value=$user_ID>
        <input type=HIDDEN name=an value=$ADM_name[0] >
        <input type=HIDDEN name=ID value='$ID'>
        <input type=HIDDEN name=term_ID value='$term_ID'>
        <input type=submit border=0 value=Löschen>
        </form>
        </td>
        </tr>
        </table>"
;
        }

?>


vielleicht weis ja jemand von euch rat.

Gruss Gero
  Mit Zitat antworten
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 31.05.2005, 11:53  
Gast
 
Beiträge: n/a
Standard

probier mal, reloadclose(); vor location.href=''; zu stellen...

gruss
  Mit Zitat antworten
Alt 31.05.2005, 12:12  
Gast
 
Beiträge: n/a
Standard

Funktioniert leider auch nicht

so funktioniert das ja auch ->

Code:
onClick=\"window.location.href='cal_eintrag.php?action=day_block&von=$user_ID&an=$set_ADM&datum=$tdate';opener.location.reload();window.close();\"
das problem ist das der mysql server anscheinend nicht so schnell die daten bereit hat das sie gleich angezeigt werden bei einem sofortigen reload.

funktioniert nicht ->

Code:
onClick=\"window.location.href='cal_eintrag.php?action=day_block&von=$user_ID&an=$set_ADM&datum=$tdate';setTimeout('opener.location.reload();window.close()', 3000);\"
funktioniert auch nicht ->

Code:
onClick=\"window.location.href='cal_eintrag.php?action=day_block&von=$user_ID&an=$set_ADM&datum=$tdate';setTimeout('opener.location.reload()', 3000);\"


Gruss Gero
  Mit Zitat antworten
Alt 31.05.2005, 13:04  
Gast
 
Beiträge: n/a
Standard

ich meinte, setze das timeout, bevor du location.href=''; benutzt!
  Mit Zitat antworten
Alt 31.05.2005, 14:49  
Gast
 
Beiträge: n/a
Standard

Ja, ansonsten öffnet er ka die Seite, bevor er die Funktion aufruft. Ansonsten glaube ich nicht, dass ein Timeout in jedem Browser weiterläuft, obwohl man sich schon nicht mehr auf der Seite befindet, die es aufgerufen hat. Warum baust du die Funktion nicht in den Opener, sodass dort das Timeout gesetzt wird?
  Mit Zitat antworten
Alt 01.06.2005, 17:14  
Gast
 
Beiträge: n/a
Standard

Hallo,

wie soll ich das machen das timeout voher oder im opener setzen?
bin auf dem gebiet leider blutiger anfänger...

vielleicht hat ja jemand einen ansatz für mich

Gruss Gero
  Mit Zitat antworten
Alt 09.06.2005, 04:42  
Gast
 
Beiträge: n/a
Standard

Hi,

warum einfach wenns auch umständlich geht

ich hab das jetzt so gelöst:

PHP-Code:
<?php
echo "
<!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN>

<html>
<head>
    <title>Termineintrag</title>
</head>

<body bgcolor=$bgcolor3 text=#000000 link=#0000FF vlink=#800080 alink=#FF0000 "
;
if(
$action=='set_termin' OR $action=='day_block' OR $action=='up_termin' OR $action=='del_termin')
     { 
     echo 
"onLoad=\"setTimeout('window.close()', 1000)\""
             
."onUnload=\"opener.location.reload();\"";
     }
echo
">";

?>
einfacher geht es glaub ich nicht mehr

da ich das formular sowieso immer mit einem action= abschicke bietet sich die lösung bestens an

Gruss Gero
  Mit Zitat antworten
Antwort


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Session funktioniert nicht bei session.use_cookies = Off Quagga PHP Tipps 2007 13 13.01.2007 18:27
Lokal funktioniert alles -> auf Server fast nichts PsychoEagle Datenbanken 2 14.08.2006 08:43
schleife funktioniert nicht?! $$$ ThiKool $$$ PHP Tipps 2006 3 18.07.2006 07:52
fsockopen - timeout funktioniert nicht! PHP Tipps 2007 3 23.01.2006 23:46
Nach Einfügugng der Sessions funktioniert mein Program nicht PHP-Fortgeschrittene 1 02.10.2005 06:13
[Erledigt] Upload funktioniert manchmal, manchmal nicht HTML, Usability und Barrierefreiheit 9 29.09.2005 12:32
Neues Fenster automatisch öffnen funktioniert nicht ? HTML, Usability und Barrierefreiheit 3 07.08.2005 23:43
Kontakrformular funktioniert nur zum Teil PHP Tipps 2005-2 12 18.07.2005 11:24
Pfadangabe in php.ini funktioniert nicht PHP Tipps 2005 10 29.03.2005 15:16
timeout problöme ... PHP Tipps 2005 5 20.01.2005 17:17
Problem: MySQL Query funktioniert nicht. Wieso? PHP Tipps 2004-2 3 24.12.2004 13:58
Script funktioniert bei include() nicht mehr :-( seb-web HTML, Usability und Barrierefreiheit 9 24.12.2004 12:35
Dateien erstellen oder schreiben funktioniert nicht im Web PHP Tipps 2004-2 1 05.12.2004 19:39
suche script timeout oder paidlink oder ähnliches Beitragsarchiv 0 27.08.2004 21:18
Header Location funktioniert nicht PHP Tipps 2004 10 12.08.2004 17:11

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
window.opener.location.reload, php opener, location reload timeout, opener.location.reload, window.opener.location.reload(), window.opener.location.reload();, javascript location.href timeout, settimeout opener, javascript reload event, opener.location.reload(), javascript reload timeout, php opener reload, opener location set timeout, php location timeout, href timeout, form action reload, opener.location.reload settimeout, <!doctype html public \-//w3c//dtd html 4.01 transitional//en\> settimeout, opener.location.reload html, location.href timeout

Alle Zeitangaben in WEZ +2. Es ist jetzt 23:56 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.