the window.opener line is fine, like if i take out the other lines that
access the form elements on the current page. it works great.
i did find one bug, sqlbuild was mispelled.... uggghhh looked at it about
30 times before i found it. but then again it was starting to get late (well
i was on the 14th hr at work) when i found it... i think if i stayed maybe
another 5 hrs i would have had the really good revelations!!! :-) but
anyway.
i viewed the page, and then copied the source to a new html file, i got the
line document.sqlbuild.criteria.value to work fine. but then i tried back on
the asp page. and it didnt work... ?????
perplexed
daniel
Daniel O'Dorisio
dodorisio@h...
xxx-xxx-xxxx
-----Original Message-----
From: Maurice Faber [mailto:mrdata@i...]
Sent: Friday, July 20, 2001 7:09 AM
To: javascript
Subject: [javascript] RE: Please help with strings!!
Hello Daniel,
if you test the syntax variable just before assigning it to:
window.opener.document.report.sqlsyntax.value
what value does it have?
and if it has the correct value, then the line above is not correct, and it
might be correct if you let out the .document part (isn't the doc allready
called thru the opener?), like this:
window.opener.report.sqlsyntax.value
hope it helps debugging...
Maurice
-----Original Message-----
From: Daniel O'Dorisio (Work) [mailto:dodorisio@h...]
Sent: donderdag 19 juli 2001 13:16
To: javascript
Subject: [javascript] Please help with strings!!
what i am trying to do is build a sql generation
utility that will allow the user to select the field to filter and select
the expression and enter the criteria.
the code is:
function generatesql() {
var syntax = "SELECT * FROM vfulldoc"
if (document.sqlbuild.criteria.value == '') {
syntax = syntax + " WHERE "
>syntax = syntax +
document.squbuild.column1.options[squbuild.column1.selectedindex].text
syntax = syntax +
document.squbuild.expression.options[squbuild.expression.selectedindex].text
syntax = syntax + "'" + document.squbuild.criteria.value + "'"
window.opener.document.report.sqlsyntax.value = syntax
}else {
window.opener.document.report.sqlsyntax.value = syntax
}
}
the line i marked for some reason it acts like it resets the variable and
no data what soever gets passed to the window.opener field. and also my if
statement isnt working, it is always true??
if ya have any ideas....i would love to hear them :-)
daniel