projects
/
cql-js-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ef1c473
)
Experimenting with onkeyup event.
author
jakub
<jakub@indexdata.dk>
Wed, 14 May 2008 21:34:06 +0000
(23:34 +0200)
committer
jakub
<jakub@indexdata.dk>
Wed, 14 May 2008 21:34:06 +0000
(23:34 +0200)
index.html
patch
|
blob
|
history
diff --git
a/index.html
b/index.html
index
a456092
..
0e2e883
100644
(file)
--- a/
index.html
+++ b/
index.html
@@
-4,9
+4,9
@@
<script type="text/javascript">
var cp = new CQLParser();
<script type="text/javascript">
var cp = new CQLParser();
- function parseOnSubmit(form) {
+ function parseInput(query) {
try {
try {
- cp.parse(form.q.value);
+ cp.parse(query);
document.getElementById("output").value = cp.toXCQL();
} catch (e) {
document.getElementById("output").value = e.message;
document.getElementById("output").value = cp.toXCQL();
} catch (e) {
document.getElementById("output").value = e.message;
@@
-17,9
+17,9
@@
</head>
<body>
<div>
</head>
<body>
<div>
- <form name="test" onsubmit="parseOnSubmit(this); return false;">
+ <form name="test" onsubmit="parseInput(this.q.value); return false;">
Query:
Query:
- <input type="text" name="q" size="160"></input>
+ <input type="text" name="q" size="160" onkeyup="parseInput(this.value); return false;"></input>
<br>
<br>
XCQL:
<br>
<br>
XCQL: