This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Javascript Modal öffnen
#1
field = document.createElement('td');
image = document.createElement('img');
image.src = 'web_images/file.png';
lnk = document.createElement('a');
lnk.href = '?clear=' + id;
lnk.onclick = $('#myModal3').modal();
lnk.appendChild(image);
field.appendChild(lnk);
field.style.backgroundColor = elem.getElementsByTagName('background_n')[0].firstChild.nodeValue;
field.setAttribute('width', 40);
line.appendChild(field);

hallo,
ich öffne über ein img ein modal,
dieses wird ganz normal über ein button im modal geschlossen,

führe ich jetzt ein refresh am browser durch, wird das modal geöffnet! warum ?????
Zitieren
#2
Kann man sich das irgendwo live anschauen , weil so kann ich kein Fehler finden.

Warum erstellst du die Elemente mit Javascript?
Gerade
wäre ein Tabellen-Element

Erstelle bei codepen.io doch ein Beispiel, wo man das Problem nachvollziehen kann.
Als Lösung markieren Zitieren


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste