[Bug 71491] New: Window problem with JavaScript
esddss at freenet.de
esddss at freenet.de
Tue Dec 30 15:02:05 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=71491
Summary: Window problem with JavaScript
Product: kdevelop
Version: unspecified
Platform: unspecified
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: bookmarks part
AssignedTo: kdevelop-devel at kdevelop.org
ReportedBy: esddss at freenet.de
Version: 3.1.4 (using KDE KDE 3.1.4)
OS: Linux
Window problem with JavaScript
For seeing this problem I recommend to visit my homepage "http://www.people.freenet.de/esd".
If you choose the button on the left side "zu den Waren" or click on the right side on a corresponding picture, you come to the article page. You can test a purchase without permitting the input datas!
Here a explaination of the function:
When you on this page (Modul "index-Waren.html"), after input the data(!), press the button "Bestellung berechnen und prüfen ¦ Order calculate and test", JavaScript function "function bestellung()" (extern data in "index-Waren.html") will be called and a window, named "neuFenster.html", will be create(!) and opened with the contents and datas of your purchase, produced with JavaScript-code.
Start this data in my homepage by LINUX and Microsoft and see (by the way, this function runs by the Microsoft browser without problems!).
Error:
The Konqueror shows an error alert, that the window "neuFenster.html" doesn't exist, but CREATE for all that this window with all required contents and datas, if you are OFFLINE!
If you are in difference ONLINE in Internet, the Konqueror shows also an error alert, but creates NOT this window "neuFenster.html", only an empty window and a server page with an error alert that this page does not exist and is not available.
Part of Modul "index-Waren.html" from my homepage:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/TR/xhtml1">
<head>
<!-- HERE CALLS "index-Waren.html" the data "bestellung.js": -->
<script language="JavaScript" src="bestellung.js" type="text/javascript" >
</script>
</head>
<body background="Image1.gif" link="blue" vlink="purple" onBlur="focus">
------------------------------------further commands
<table>
------------------------------------further commands
<td height="20" align="center">
<!-- HERE CALLS "index-Waren.html" the function "bestellung()" from the data "bestellung.js": -->
<input type="button" value="Bestellung berechnen und prüfen ¦ Order calculate and test"
onClick="bestellung()"/>
</td>
------------------------------------further commands
</table>
</body>
</html>
Part of Modul "bestellung.js" from my homepage, called from "index-Waren.html":
function bestellung()
{
------------------------------------further commands
// Fenster mit der Übersicht über die Bestellung öffnen:
bestellwindow=window.open("neuFenster.html", "Bestelldaten", "width=600, height=300, scrollbars=yes");
bestellwindow.document.writeln("<html><head></head><body>");
bestellwindow.document.write("EDITION SYSTEMS DESIGN Michael Lanczak Steinfurt<br/>");
bestellwindow.document.write("<h2>Im Warenkorb liegen ¦ In productbasket are:</h2>");
bestellwindow.document.write("<table border=2 cellpadding=5>")
bestellwindow.document.write("<tr>");
bestellwindow.document.write("<th>Artikel"+"<br/>");
bestellwindow.document.write("Article</th>");
bestellwindow.document.write("<th>Einzelpreis"+"<br/>");
bestellwindow.document.write("Single price</th>");
bestellwindow.document.write("<th>Menge"+"<br/>");
bestellwindow.document.write("Quantity</th>");
bestellwindow.document.write("<th>Summe"+"<br/>");
bestellwindow.document.write("Quantity</th>");
bestellwindow.document.write("</tr>");
for(i=0;i<anzahl;++i)
{
bestellwindow.document.write("<tr>");
bestellwindow.document.write("<td>");
bestellwindow.document.write(artikel_liste[i]);
bestellwindow.document.write("</td>");
bestellwindow.document.write("<td>");
bestellwindow.document.write(preis_liste[i]);
bestellwindow.document.write("</td>");
bestellwindow.document.write("<td>");
bestellwindow.document.write(menge_liste[i]);
bestellwindow.document.write("</td>");
bestellwindow.document.write("<td>");
bestellwindow.document.write(summe_liste[i]);
bestellwindow.document.write("</td>");
bestellwindow.document.write("</tr>");
}
bestellwindow.document.write("<tr>");
bestellwindow.document.write("<td colspan='2'><b>");
bestellwindow.document.write("Gesamtsumme ¦ Total: </b>");
bestellwindow.document.write("</td>");
bestellwindow.document.write("<td>");
bestellwindow.document.write("</td>");
bestellwindow.document.write("<td>");
bestellwindow.document.write("<b>"+gesamtsumme+"</b>");
bestellwindow.document.write("</td>");
bestellwindow.document.write("</tr>");
bestellwindow.document.writeln("</table>");
// Ausgabe der Bestellerdaten:
bestellwindow.document.write("<h2>Ihre Daten: ¦ Your data:</h2>");
bestellwindow.document.write("<b>Firma / Company : "+Firma);
bestellwindow.document.write("Vorname / Forename : " +Vorname);
bestellwindow.document.write("Name / Name : " +Name);
bestellwindow.document.write("Straße / Street : " +Strasse);
bestellwindow.document.write("PLZ / Postal code : " +PLZ);
bestellwindow.document.write("Ort / Town : " +Ort);
bestellwindow.document.write("Land / Country : " +Land);
bestellwindow.document.write("Telefon / Phone : " +Telefon);
bestellwindow.document.write("Fax / Fax : " +Fax);
bestellwindow.document.write("E-Mail / E-Mail : " +EMail);
bestellwindow.document.write("Internet / Internet: " +Internet);
bestellwindow.document.write("Datum / Date : " +Datum+"</b>");
bestellwindow.document.write("<p>");
bestellwindow.document.write('<input type="button" value="Fenster schließen ¦ Window close" onClick="javascript:self.close(); return false;">');
bestellwindow.document.write("</p>");
bestellwindow.document.writeln("</body></html>");
bestellwindow.document.close();
}
____________________________
More information about the KDevelop-devel
mailing list