[Picfinity-commit] SF.net SVN: picfinity: [66] trunk/.themes/db/db.js
Status: Beta
Brought to you by:
espadav8
|
From: <esp...@us...> - 2007-09-02 17:51:24
|
Revision: 66
http://picfinity.svn.sourceforge.net/picfinity/?rev=66&view=rev
Author: espadav8
Date: 2007-09-02 10:51:23 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Remove the alerts when creating xmlHttp's
Don't use document.all to check for IE, now using window.ActiveXObject
Make createFormInput a bit nicer to read
Modified Paths:
--------------
trunk/.themes/db/db.js
Modified: trunk/.themes/db/db.js
===================================================================
--- trunk/.themes/db/db.js 2007-09-02 17:30:38 UTC (rev 65)
+++ trunk/.themes/db/db.js 2007-09-02 17:51:23 UTC (rev 66)
@@ -43,22 +43,15 @@
{
if (window.XMLHttpRequest)
{
- alert("returning window.XMLHttpRequest");
return new XMLHttpRequest();
}
else if (document.implementation && document.implementation.createDocument)
{
- alert("returning document.implementation.createDocument");
return document.implementation.createDocument("", "layout", null);
}
else if (window.ActiveXObject)
{
- alert("returning ActiveXObject(\"Microsoft.XMLHTTP\")");
- var tmpHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- // tmpHttpReq.validateOnParse = false;
- // tmpHttpReq.resolveExternals = false;
-
- return tmpHttpReq;
+ return new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
@@ -476,20 +469,20 @@
function createFormInput(inputType, inputName, spanText)
{
+ if (window.ActiveXObject)
+ {
+ var tmpInput = document.createElement("<input name=\"" + inputName + "\">");
+ }
+ else
+ {
+ var tmpInput = document.createElement("input");
+ tmpInput.name = inputName;
+ }
+
if (inputType == "hidden")
{
- if (document.all)
- {
- var tmpInput = document.createElement("<input name=\"" + inputName + "\">");
- }
- else
- {
- var tmpInput = document.createElement("input");
- tmpInput.name = inputName;
- }
tmpInput.type = inputType;
tmpInput.value = spanText;
-
return tmpInput;
}
else
@@ -497,15 +490,7 @@
var tmpLabel = document.createElement("label");
var tmpSpan = document.createElement("span");
tmpSpan.appendChild(document.createTextNode(spanText));
- if (document.all)
- {
- var tmpInput = document.createElement("<input name=\"" + inputName + "\">");
- }
- else
- {
- var tmpInput = document.createElement("input");
- tmpInput.name = inputName;
- }
+
tmpInput.type = inputType;
tmpInput.value = "";
@@ -520,7 +505,7 @@
var tmpLabel = document.createElement("label");
var tmpSpan = document.createElement("span");
tmpSpan.appendChild(document.createTextNode(spanText));
- if (document.all)
+ if (window.ActiveXObject)
{
var tmpTextarea = document.createElement("<textarea name=\"" + textareaName + "\">");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|