RE: [ACFUG Discuss] queryNew() ?

2008-01-10 Thread jwest
Mark;

Is there any chance you could give a better explination on what you are 
trying to accomplish?  Please use sudo code to explain, there might be 
someone out here in ACFUG land that has accomplished the same thing your 
are looking to do but in a different manner.

Thanks

Jason L West
--- Quote ---
Learn to ask yourself at least three times through out your day, "Am I 
being productive or just active?", in order 
to keep yourself on track to what produces effective results instead of 
just looking efficient.




"Fennell, Mark P." <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
01/10/2008 06:54
Please respond to
discussion@acfug.org


To

cc

Subject
RE: [ACFUG Discuss] queryNew() ?






Yeah. I don't know if it was the right thing to do, but I basically just 
used a QoQ to selected the "desired" data and rebuilt the queryNew 
variable.
Thanks.
mf

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darin Kohles
Sent: Wednesday, January 09, 2008 1:23 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] queryNew() ?

Your best bet is to simply to do a query of queries - you can then filter 
either columns or row using SQL
 

SELECT row1, row5, etc...
FROM q_oldQuery
WHERE uncle like '%bob%'

 
Darin Kohles, Application Developer
[EMAIL PROTECTED]
Digital Positions, Inc.
2289 Peachtree Road NE
Atlanta, GA 30309

404-351-8878 support phone
404-351-2366 main phone
404-351-4055 fax
http://www.d-p.com/ 
 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell, Mark 
P.
Sent: Wednesday, January 09, 2008 1:04 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] queryNew() ?

Is there anyway to delete data from a query? Yes, delete from a _query_ 
not from a table or other database object. 
See, I want to use the queryNew() family of functions to collect some data 
from the client before I stick it in the database, kind of like in a 
shopping cart. You should be able to smell the stench of AJAX...
Can structDelete() be used?
I seem to recall that this can be done. I just don't remember the details.
Thanks.
mf

- 
Annual Sponsor - Figleaf Software 

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink 
- 
- 
Annual Sponsor - Figleaf Software 

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink 
- 

- 
Annual Sponsor - Figleaf Software 

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink 
- 



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] queryNew() ?

2008-01-10 Thread Fennell, Mark P.
But, if I tell you then you'll know just how stupid my theoretical test
with no potential for real world application really is...
It's basically a small chat engine stored as an application variable so
that it's not easily traceable and it only resides in the server's
memory and the browser window. And to limit the impact on performance
and traceability, I wanted it to purge older messages. 
 
Alas, here's the code snippet I finally used. Perhaps it will help
someone else. In the end moving an object from query type to something
else such as a struct was too much code and since data volatility isn't
an issue, it was easier just to recreate the query. 
 
If anyone's interested I'll post the code somewhere. It's just 3 files:
1 Application.cfm, 1 index.cfm and 1 datarequestor.js. It's about 150
lines of CF code. The JS file does all the ajaxy stuff and it's 490+
lines. 
kthxbye.
mf
 

 select * from application.msgs where
id>#evaluate(getTickCount()-25)#














From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, January 10, 2008 7:49 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] queryNew() ?



Mark; 

Is there any chance you could give a better explination on what you are
trying to accomplish?  Please use sudo code to explain, there might be
someone out here in ACFUG land that has accomplished the same thing your
are looking to do but in a different manner. 

Thanks 

Jason L West
--- Quote ---
Learn to ask yourself at least three times through out your day, "Am I
being productive or just active?", in order 
to keep yourself on track to what produces effective results instead of
just looking efficient. 




"Fennell, Mark P." <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 

01/10/2008 06:54 
Please respond to
discussion@acfug.org


To
 
cc
Subject
RE: [ACFUG Discuss] queryNew() ?






Yeah. I don't know if it was the right thing to do, but I basically just
used a QoQ to selected the "desired" data and rebuilt the queryNew
variable. 
Thanks. 
mf 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Darin Kohles
Sent: Wednesday, January 09, 2008 1:23 PM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] queryNew() ?

Your best bet is to simply to do a query of queries - you can then
filter either columns or row using SQL 
  
 
SELECT row1, row5, etc... 
FROM q_oldQuery 
WHERE uncle like '%bob%' 
 
  

Darin Kohles, Application Developer
[EMAIL PROTECTED]
Digital Positions, Inc.
2289 Peachtree Road NE
Atlanta, GA 30309

404-351-8878 support phone
404-351-2366 main phone
404-351-4055 fax
http://www.d-p.com/   






From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fennell,
Mark P.
Sent: Wednesday, January 09, 2008 1:04 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] queryNew() ?

Is there anyway to delete data from a query? Yes, delete from a _query_
not from a table or other database object. 
See, I want to use the queryNew() family of functions to collect some
data from the client before I stick it in the database, kind of like in
a shopping cart. You should be able to smell the stench of AJAX... 
Can structDelete() be used? 
I seem to recall that this can be done. I just don't remember the
details. 
Thanks. 
mf 

- 
Annual Sponsor - Figleaf Software   

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform
  

For more info, see http://www.acfug.org/mailinglists
  
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
  
List hosted by FusionLink   
- 
- 
Annual Sponsor - Figleaf Software   

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform
  

For more info, see http://www.acfug.org/mailinglists
  
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
  
List hosted by FusionLink   
- 

- 
Annual Sponsor - Figleaf Software   

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform
  

For more info, see http://www.acfug.org/mailinglists


[ACFUG Discuss] How Load a PDF to Window?

2008-01-10 Thread Peyton Todd
Hello. I'm a new member of ACFUG, returning to CF after a five-years away from 
programming. We were at CF5 when I left, and it's a pleasure to see all the new 
capabilities that have been added since then. This is my first posting to the 
Discussion section, so I hope I figured out correctly how it's done.

Here's my problem, which ought to be simple, or so I would think:

I want to load a PDF to a . However, when I place the PDF on an 
arbitrary directory, thus:



...I get an error message inside the window saying:

"Error: Unable to open connection to URL c:/Scanned 
Styles/515/51510.pdf?cfdebug" 

Plus an alert window saying 'Error retrieving markup for theScannedStyle_body, 
unable to open connection to URL c:/Scanned Styles/515/51510.pdf 

(followed by a suggestion that I add cfdebug to my URL parameters, but that 
made no difference in the amount of information I was given)

When I place the pdf on the same directory as the web page, thus:



... there's no alert box this time, but the window contains only the cryptic:

%PDF-1.3 %??4 0 obj <>] /Decode[1 0] /Length 5 0 R >> stream 

That suggest that it found the file this time but not the other time, although 
I assure you the file exists on the directory referred to. But although it 
seems to have found it, it didn't display it, as you can see.

I also tried the same code as above, but with 'loadPDF.cfm' as the source, 
where loadPDF.cfm contains only the code below:




However, that simply fills the window with the metadata (author, etc.)

What am I doing wrong?

Thanks for your help,
Peyton



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





RE: SPAM-LOW: [ACFUG Discuss] How Load a PDF to Window?

2008-01-10 Thread Clarke Bishop
I did something similar to this recently(Load a PDF into a CFWINDOW), and I
had to create an HTML file for the cfwindow. The HTML file then had a
reference to the PDF.

Hope this helps,

Clarke  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peyton Todd
Sent: Thursday, January 10, 2008 3:22 PM
To: discussion@acfug.org
Subject: SPAM-LOW: [ACFUG Discuss] How Load a PDF to Window?

Hello. I'm a new member of ACFUG, returning to CF after a five-years away
from programming. We were at CF5 when I left, and it's a pleasure to see all
the new capabilities that have been added since then. This is my first
posting to the Discussion section, so I hope I figured out correctly how
it's done.

Here's my problem, which ought to be simple, or so I would think:

I want to load a PDF to a . However, when I place the PDF on an
arbitrary directory, thus:



...I get an error message inside the window saying:

"Error: Unable to open connection to URL c:/Scanned
Styles/515/51510.pdf?cfdebug" 

Plus an alert window saying 'Error retrieving markup for
theScannedStyle_body, unable to open connection to URL c:/Scanned
Styles/515/51510.pdf 

(followed by a suggestion that I add cfdebug to my URL parameters, but that
made no difference in the amount of information I was given)

When I place the pdf on the same directory as the web page, thus:



... there's no alert box this time, but the window contains only the
cryptic:

%PDF-1.3 %??4 0 obj <>] /Decode[1 0] /Length 5 0 R >> stream 

That suggest that it found the file this time but not the other time,
although I assure you the file exists on the directory referred to. But
although it seems to have found it, it didn't display it, as you can see.

I also tried the same code as above, but with 'loadPDF.cfm' as the source,
where loadPDF.cfm contains only the code below:

 

However, that simply fills the window with the metadata (author, etc.)

What am I doing wrong?

Thanks for your help,
Peyton



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-








-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





Re: [ACFUG Discuss] How Load a PDF to Window?

2008-01-10 Thread Douglas Knudsen
IIRC, CFWINDOW uses a DIV.  You'd need say a iFrame to display a PDF inline,
eh?

DK

On Jan 10, 2008 3:22 PM, Peyton Todd <[EMAIL PROTECTED]> wrote:

> Hello. I'm a new member of ACFUG, returning to CF after a five-years away
> from programming. We were at CF5 when I left, and it's a pleasure to see all
> the new capabilities that have been added since then. This is my first
> posting to the Discussion section, so I hope I figured out correctly how
> it's done.
>
> Here's my problem, which ought to be simple, or so I would think:
>
> I want to load a PDF to a . However, when I place the PDF on an
> arbitrary directory, thus:
>
>headerStyle="background-color:c10026"
>   modal="true" source="c:/Scanned Styles/515/51510.pdf?cfdebug"
>   x="10" y="10" initShow="true" closable="true" resizable="true" />
>
> ...I get an error message inside the window saying:
>
> "Error: Unable to open connection to URL c:/Scanned
> Styles/515/51510.pdf?cfdebug"
>
> Plus an alert window saying 'Error retrieving markup for
> theScannedStyle_body, unable to open connection to URL c:/Scanned
> Styles/515/51510.pdf
>
> (followed by a suggestion that I add cfdebug to my URL parameters, but
> that made no difference in the amount of information I was given)
>
> When I place the pdf on the same directory as the web page, thus:
>
>headerStyle="background-color:c10026"
>   modal="true" source="51510.pdf?cfdebug"
>   x="10" y="10" initShow="true" closable="true" resizable="true" />
>
> ... there's no alert box this time, but the window contains only the
> cryptic:
>
> %PDF-1.3 %??4 0 obj <>] /Decode[1 0] /Length 5 0 R >> stream
>
> That suggest that it found the file this time but not the other time,
> although I assure you the file exists on the directory referred to. But
> although it seems to have found it, it didn't display it, as you can see.
>
> I also tried the same code as above, but with 'loadPDF.cfm' as the source,
> where loadPDF.cfm contains only the code below:
>
> 
> 
>
> However, that simply fills the window with the metadata (author, etc.)
>
> What am I doing wrong?
>
> Thanks for your help,
> Peyton
>
>
>
> -
> Annual Sponsor FigLeaf Software - http://www.figleaf.com
>
> To unsubscribe from this list, manage your profile @
> http://www.acfug.org?fa=login.edituserform
>
> For more info, see http://www.acfug.org/mailinglists
> Archive @ http://www.mail-archive.com/discussion%40acfug.org/
> List hosted by http://www.fusionlink.com
> -
>
>
>
>


-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-



RE: [ACFUG Discuss] How Load a PDF to Window?

2008-01-10 Thread Fennell, Mark P.
I think you can use embed/object html tags just like you would with a
swf.
something like this...
 
 
 




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas
Knudsen
Sent: Thursday, January 10, 2008 3:59 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] How Load a PDF to Window?


IIRC, CFWINDOW uses a DIV.  You'd need say a iFrame to display a PDF
inline, eh?

DK


On Jan 10, 2008 3:22 PM, Peyton Todd <[EMAIL PROTECTED] > wrote:


Hello. I'm a new member of ACFUG, returning to CF after a
five-years away from programming. We were at CF5 when I left, and it's a
pleasure to see all the new capabilities that have been added since
then. This is my first posting to the Discussion section, so I hope I
figured out correctly how it's done. 

Here's my problem, which ought to be simple, or so I would
think:

I want to load a PDF to a . However, when I place the
PDF on an arbitrary directory, thus:

 

...I get an error message inside the window saying:

"Error: Unable to open connection to URL c:/Scanned
Styles/515/51510.pdf?cfdebug"

Plus an alert window saying 'Error retrieving markup for
theScannedStyle_body, unable to open connection to URL c:/Scanned
Styles/515/51510.pdf 

(followed by a suggestion that I add cfdebug to my URL
parameters, but that made no difference in the amount of information I
was given)

When I place the pdf on the same directory as the web page,
thus:



... there's no alert box this time, but the window contains only
the cryptic:

%PDF- 1.3 %??4 0 obj <>] /Decode[1 0] /Length 5 0 R >> stream

That suggest that it found the file this time but not the other
time, although I assure you the file exists on the directory referred
to. But although it seems to have found it, it didn't display it, as you
can see. 

I also tried the same code as above, but with 'loadPDF.cfm' as
the source, where loadPDF.cfm contains only the code below:




However, that simply fills the window with the metadata (author,
etc.)

What am I doing wrong?

Thanks for your help,
Peyton



- 
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-








-- 
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it? 
- 
Annual Sponsor - Figleaf Software   

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform 

For more info, see http://www.acfug.org/mailinglists 
Archive @ http://www.mail-archive.com/discussion%40acfug.org/ 
List hosted by FusionLink   
- 



-

Annual Sponsor FigLeaf Software - http://www.figleaf.com



To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-




[ACFUG Discuss] Re: Trying to Load a PDF to a CFWINDOW

2008-01-10 Thread Peyton Todd
Apologies for my ignorance on several points:

First, is the method I'm using here (copying each reply one-by-one into a new 
message addressed to discussion@acfug.org) the simplest way to do this? I have 
very little experience with group e-mails, including what in the university 
environment (where I spent most of the last 5 years) are called 'lists' (if 
this is one). So is there a simpler way? I presume that if I just hit 'reply' 
on each message, then only the person who sent it to me will receive my reply, 
right?

Second, in response to Clarke's suggestion, which says:

>I did something similar to this recently(Load a PDF into a CFWINDOW), >and I 
>had to create an HTML file for the cfwindow. The HTML file then >had 
>areference to the PDF.

Okay, if I understand you, the  source attribute will say, e.g., = 
myPDF_Loader.htm, and the html page will 'reference the PDF'? But how will it 
do that? All I can think at the moment (out of practice, sorry) would be an 
href anchor to the PDF, whose click event I could fire with an onload attached 
to the  tag. I haven't tried it but I suppose it would work. Is that what 
you have in mind?

Third, in response to Douglas's suggestion, which says:

>IIRC, CFWINDOW uses a DIV.  You'd need say a iFrame to display a PDF inline, 
>eh?

What does IIRC stand for? And what's an 'iFrame'? I presume you don't mean a 
, right? To further reveal my ignorance, I thought that a  is 
for what's NOT inline, in contrast to a , is that not right? And my 
window would NOT be inline, would it?

Fourth, in response to Mark's suggestion, which says:

>I think you can use embed/object html tags just like you would with a swf. 
>something like this...
 
 
 


That looks daunting, since I've written only a few COM objects in my time, and 
only in Visual Basic. What would the code in the object say?

Needless to say, anyone other that the three who've responded so far is welcome 
to add their wisdom!

I suppose I could just go with a javascript window.open... but the  
would be so much cooler since its interface would match the rest of my complex 
page.

Thanks for your help,
Peyton

P.S. I have another problem I'll ask ACFUG members about in a moment, one which 
may correspond to a grave shortcoming in the DOM model. I can't believe it 
doesn't have a simple answer, though... 


-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





[ACFUG Discuss] Building a Disabled vs. Enabled Save button

2008-01-10 Thread Peyton Todd
Okay, here's the problem I mentioned which seems to represent a shortcoming in 
the DOM model. Surely I'm missing something, right? Surely what I want to do is 
so common that the DOM designers allowed for it, didn't they?

Here it is:

I have built a Save button which starts off in a disabled state, then gets 
enabled as soon as the user changes anything in the form. As it turns out, 
there's a problem with using 'onchange' since it is not recognized by the DOM 
until the changed  item loses focus, and the user may desire to press 
the Save button immediately after making the change, which he cannot do since 
it will remain disabled until he moves the cursor off the  item where he 
made the change. To solve that problem, I am using 'onkeypress', which lets me 
enable the Save button right away.

That actually doesn't work for a , nor do we want it to, since if the 
user presses 'N', for example, when the value of the  is already 'N', 
we don't want that to be treated as a change. For that situation, it turns out 
that 'onchange' is the way to go, since indeed the change in this case is 
recognized by the DOM right away, without waiting for a change in focus.

But now for the problem: onkeypress doesn't work for Backspace, and onchange 
doesn't either. The DOM evidently does not consider Backspace to be a keypress. 
It also does not regard Tab as a keypress, which is indeed how we want Tab to 
behave, since nothing changes when the user merely tabs from one  field 
to another. Sometimes that might be what we want for Backspace, too, I don't 
know. But note that Backspace is destructive of whatever character is to the 
left of the cursor when Backspace is pressed, and that's a change. In fact, IN 
SOME CASES, IT IS THE REMOVAL OF A CHARACTER - AND ONLY THAT - which 
contsitutes the change the user is making. But this key press will not fire the 
onkeypress event, so it will not let me enable the Save button when it's the 
only change which occurs. Ouch!

I haven't tried them all, but the set of events available for  tags does 
not look promising. None appears to have a definition which would solve this 
problem.

What to do?

Thanks for your advice,
Peyton



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





RE: [ACFUG Discuss] Building a Disabled vs. Enabled Save button

2008-01-10 Thread Kitchens, Brent
Here's something I created a while ago that may help.

This is a checkbox input control on the form:



These are the div and input control affected by the onclick event - in
their original states before the event fires:

(required)



These are the javascript functions called on the event - there are
multiple controls on this form I'm only sending the relevant ones:

function enabctrl(ctrl) {
if (ctrl == 'hs')
{
document.pansubmit.hsbox.value=1;
document.pansubmit.hs_protnum.disabled=false;
document.pansubmit.hs_appdate.disabled=false;
document.pansubmit.hs_appdate.disabled=false;
document.pansubmit.hs_apppend.disabled=false;
document.pansubmit.hs_appdef.disabled=false;
}
}

function disabctrl(ctrl) {
if (ctrl == 'hs')
{
document.pansubmit.hsbox.value=0;   
document.pansubmit.hs_protnum.disabled=true;
document.pansubmit.hs_protnum.value='';
document.pansubmit.hs_appdate.disabled=true;
document.pansubmit.hs_appdate.value='Click to select';
document.pansubmit.hs_apppend.disabled=true;
document.pansubmit.hs_apppend.value=0;  
document.pansubmit.hs_apppend.checked=false;
document.pansubmit.hs_appdef.disabled=true;
document.pansubmit.hs_appdef.checked=false; 
document.pansubmit.hs_appdef.value=0;   
}

function show_div(grp) {
if (grp == 'hs')
{
document.getElementById("hs_req1").style.visibility =
"visible";
document.getElementById("hs_req2").style.visibility =
"visible";
}   
}

function hide_div(grp) {
if (grp == 'hs')
{
document.getElementById("hs_req1").style.visibility =
"hidden";
document.getElementById("hs_req2").style.visibility =
"hidden";
}   
}

Hope this helps.

Brent Kitchens
Office of Research - IT
Emory University


}-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peyton Todd
Sent: Thursday, January 10, 2008 5:18 PM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Building a Disabled vs. Enabled Save button

Okay, here's the problem I mentioned which seems to represent a
shortcoming in the DOM model. Surely I'm missing something, right?
Surely what I want to do is so common that the DOM designers allowed for
it, didn't they?

Here it is:

I have built a Save button which starts off in a disabled state, then
gets enabled as soon as the user changes anything in the form. As it
turns out, there's a problem with using 'onchange' since it is not
recognized by the DOM until the changed  item loses focus, and
the user may desire to press the Save button immediately after making
the change, which he cannot do since it will remain disabled until he
moves the cursor off the  item where he made the change. To solve
that problem, I am using 'onkeypress', which lets me enable the Save
button right away.

That actually doesn't work for a , nor do we want it to, since
if the user presses 'N', for example, when the value of the  is
already 'N', we don't want that to be treated as a change. For that
situation, it turns out that 'onchange' is the way to go, since indeed
the change in this case is recognized by the DOM right away, without
waiting for a change in focus.

But now for the problem: onkeypress doesn't work for Backspace, and
onchange doesn't either. The DOM evidently does not consider Backspace
to be a keypress. It also does not regard Tab as a keypress, which is
indeed how we want Tab to behave, since nothing changes when the user
merely tabs from one  field to another. Sometimes that might be
what we want for Backspace, too, I don't know. But note that Backspace
is destructive of whatever character is to the left of the cursor when
Backspace is pressed, and that's a change. In fact, IN SOME CASES, IT IS
THE REMOVAL OF A CHARACTER - AND ONLY THAT - which contsitutes the
change the user is making. But this key press will not fire the
onkeypress event, so it will not let me enable the Save button when it's
the only change which occurs. Ouch!

I haven't tried them all, but the set of events available for 
tags does not look promising. None appears to have a definition which
would solve this problem.

What to do?

Thanks for your advice,
Peyton



-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-





-
Annual Sponsor FigLeaf Software - http://www.figleaf.com

To unsubscribe from this list, manage your