Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-libraries
Commits
0a131fdf
Commit
0a131fdf
authored
Jun 02, 2008
by
Bas Lijnse
Browse files
Updated javascript for dual line debug
parent
0ad200d4
Changes
1
Show whitespace changes
Inline
Side-by-side
libraries/iData/Resources/js/clean.js
View file @
0a131fdf
...
...
@@ -150,6 +150,9 @@ function sendForm(formid, onclient) {
return
;
}
serverDebug
(
""
);
clientDebug
(
""
);
//Add state and focus information to the form
addState
(
form
);
...
...
@@ -341,6 +344,9 @@ function ajaxSendForm(form) {
//Re-initialize ajax (MAY NOT BE NECCESARY. REQUIRES ADDITIONAL TESTING)
initAjax
();
//Show a short status message
serverDebug
(
"
handling request...
"
);
//Send request
xmlHttp
.
open
(
"
POST
"
,
"
/
"
+
getAppName
()
+
"
_ajax
"
,
true
);
xmlHttp
.
setRequestHeader
(
"
Content-Type
"
,
"
multipart/form-data; boundary=
"
+
msg
[
0
]);
...
...
@@ -349,9 +355,6 @@ function ajaxSendForm(form) {
xmlHttp
.
onreadystatechange
=
ajaxCallback
;
xmlHttp
.
send
(
msg
[
1
]);
//Show a short status message
document
.
getElementById
(
"
iTaskInfo
"
).
innerHTML
=
"
<font color=
\"
yellow
\"
><b>Server is handling request...</b><hr/>
"
;
}
function
ajaxCallback
()
{
...
...
@@ -377,8 +380,7 @@ function saplSendForm(form) {
}
lock
=
true
;
document
.
getElementById
(
"
iTaskInfo
"
).
innerHTML
=
"
<font color=
\"
yellow
\"
><b>Client is handling request...</b></font><hr/>
"
;
clientDebug
(
"
handling request...
"
);
//Encode the form and create an HTTP request message
var
msg
=
multipartEncodeForm
(
form
);
...
...
@@ -395,11 +397,13 @@ function saplSendForm(form) {
var
rsp
=
saplApplet
.
getOutput
();
if
(
rsp
==
null
)
{
clientDebug
(
"
Applet returned null
"
);
lock
=
false
;
return
false
;
}
if
(
rsp
.
substring
(
0
,
5
)
==
"
ABORT
"
)
{
clientDebug
(
"
Applet aborted:
"
+
rsp
);
lock
=
false
;
return
false
;
}
...
...
@@ -407,11 +411,13 @@ function saplSendForm(form) {
var
parts
=
rsp
.
split
(
Sapl_ToServer_Separator
);
if
(
parts
.
length
!=
2
)
{
clientDebug
(
"
Unable to split response
"
+
rsp
);
lock
=
false
;
return
false
;
}
if
(
parts
[
0
]
==
"
True
"
)
{
clientDebug
(
"
Switch to server
"
);
lock
=
false
;
return
false
;
}
...
...
@@ -432,8 +438,6 @@ function splitResponseAndUpdate(response, fromserver) {
}
function
updateDivs
(
divcodes
,
fromserver
)
{
for
(
var
i
=
0
;
i
<
divcodes
.
length
;
i
++
)
{
var
thisupdate
=
divcodes
[
i
].
split
(
FormName_Content_Separator
);
...
...
@@ -445,6 +449,20 @@ function updateDivs(divcodes, fromserver) {
}
}
function
serverDebug
(
message
)
{
var
div
=
document
.
getElementById
(
"
debug-server
"
);
if
(
div
!=
undefined
)
{
div
.
innerHTML
=
"
<span style=
\"
color: yellow; font-weight: bold;
\"
>Server: </span>
"
+
message
+
"
<hr />
"
;
}
}
function
clientDebug
(
message
)
{
var
div
=
document
.
getElementById
(
"
debug-client
"
);
if
(
div
!=
undefined
)
{
div
.
innerHTML
=
"
<span style=
\"
color: yellow; font-weight: bold;
\"
>Client: </span>
"
+
message
+
"
<hr />
"
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment