| | | | |
| |||||||
| JavaScript, Ajax und mehr dynamisches Scripten und Interaktion auf Clientebene |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| Neuer Benutzer Registriert seit: 04.07.2011
Beiträge: 5
PHP-Kenntnisse: Fortgeschritten ![]() | Hallo! mein Problem ist "OnClick", es wird im FF und Chrome nicht richtig interpretiert: Ich habe ein .js Datei, die im Kopf mit Code: <script type="text/javascript" src="main/js.php"> In ihr gibt es mehrere Funktionen, die ich auch mit Code: <a href="javascript:login('value')">...
Code: <a onclick="login('value')">...
Bei Links ist das ja umgehbar, aber input's haben nur diese Möglichkeit Code: <input type="text" onclick="login('value')">
Firebug sagt: login is no function, aber bei Links mit login sagt er nichts. Noch kurioser: wenn ich onclick="alert()" und so'nen Spaß mach geht das. Total verwirrt! Erbitte Hilfe P.S. allen Code vgl http://tmaex.de |
| | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Neuer Benutzer Registriert seit: 04.07.2011
Beiträge: 5
PHP-Kenntnisse: Fortgeschritten ![]() | Hier der benötigte Code in kurz: Code: <!doctype html>
<html>
<head>
[...]
<script type="text/javascript" src="main/js.php">
</script>
</head>
[...]
<div id="login">
<form action="index.php?p=login" name="login" method="post">
<a href="javascript:login('hide');">X</a>
<input type="text" name="user" onClick="login('i-us')" value="Username"><input type="text" name="pw" onClick="login('i-pw')" value="Password">
</form></div>
JS: Code: function login (action) {
totime=10000;
if (action == 'show') {
document.getElementById("login").style.display = "block";
}
if (action == 'hide') {
document.getElementById("login").style.display = "none";
}
if (action == 'change') {
if (document.getElementById("login").style.display != "block") {
login('show');
if (document.getElementById("magic").style.display != "block") {
magic('hide');}
}
else {
login('hide');}
}
if (action == 'start') {
login("show");
login_to = setTimeout("login('hide');",totime);
}
if (action == 'restart') {
login_to = setTimeout("login('hide');",totime);
}
if (action == 'stay') {
clearTimeout(login_to);
}
if (action == 'stop') {
clearTimeout(login_to);
login("hide");
}
if (action == 'i-pw') {
document.login.password.type = "password";
document.login.password.value = "";
}
if (action == 'i-us') {
document.login.username.value = "";
}
}
__________________ http://tmaex.de |
| | |
| | |
| Neuer Benutzer Registriert seit: 04.07.2011
Beiträge: 5
PHP-Kenntnisse: Fortgeschritten ![]() | Vielen Dank, das wars! Auf die Idee wär ich nie gekommen
__________________ http://tmaex.de |
| | |
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| DOM mit onClick funktioniert nicht | Nussi | JavaScript, Ajax und mehr | 5 | 04.06.2010 00:05 |
| Verschlüsselung funktioniert nicht richtig | netmario | PHP Tipps 2010 | 2 | 19.05.2010 22:57 |
| [Erledigt] Mehrere Elemente auf Onclick überprüfen | lithium | JavaScript, Ajax und mehr | 2 | 25.04.2010 21:50 |
| mod_rewrite mit slash/ohne slash funktioniert nur teilweise | taurus | Server, Hosting und Workstations | 4 | 13.09.2009 12:57 |
| [Erledigt] onclick, onmoseover,onmouseout in 1 href | FreddyS | HTML, Usability und Barrierefreiheit | 11 | 31.07.2009 20:29 |
| loginscripttut probelm--> keine Funktionalität | marcoz | PHP Tipps 2009 | 16 | 11.07.2009 13:20 |
| [Erledigt] onclick submit Feldinhalt wird nicht übertragen | FreddyS | PHP Tipps 2009 | 11 | 07.07.2009 13:15 |
| [ERLEDIGT]PHP while-Schleife für Ausgabe funktioniert plötzlich nicht | fuckinghot19 | PHP Tipps 2009 | 6 | 05.06.2009 22:28 |
| [Erledigt] Umlaute ersetzen funktioniert nicht richtig | BlackSpirit | PHP Tipps 2009 | 19 | 20.04.2009 12:04 |
| onclick nicht funktioniert | waldsee | PHP Tipps 2009 | 8 | 09.02.2009 13:05 |
| send button funktioniert nicht, finde fehler nicht | selma123 | PHP Tipps 2008 | 3 | 17.09.2008 11:57 |
| [JS] onClick funktioniert erst beim 2. Mal Klicken. | DER_Brain | HTML, Usability und Barrierefreiheit | 2 | 08.07.2008 10:47 |
| onClick in <td>-Element funktioniert nicht | rocco | HTML, Usability und Barrierefreiheit | 1 | 04.03.2008 13:45 |
| Session funktioniert nicht bei session.use_cookies = Off | Quagga | PHP Tipps 2007 | 13 | 13.01.2007 18:27 |
| Dateien erstellen oder schreiben funktioniert nicht im Web | PHP Tipps 2004-2 | 1 | 05.12.2004 19:39 | |