RE: OT - JS Question

2012-08-29 Thread Stephens, Larry V

I suggest jquery for formatting the DOB. 

You can also bind the DOB field with jquery to trigger an Ajax call then use 
the callback to pop up your message.

If you haven't used these that probably sounds like gibberish. Contact me off 
list if it does. 

-Original Message-
From: Bruce Sorge [mailto:sor...@gmail.com] 
Sent: Tuesday, August 28, 2012 6:30 PM
To: cf-talk
Subject: OT - JS Question


Can someone point me to a site or a sample of JS that does the following:

User enters first name, last name and birth date (birthdate is in a specific 
format by using drop downs and not free text).
Once the birth year has been selected, a query is triggered to check for the 
existence of the same information that was just entered. 
If a match is found, a pop up is displayed stating that they have already 
registered.
If no match, nothing happens.


Thanks,

Bruce



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352335
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OT - JS Question

2012-08-29 Thread .jonah

Trigger the form serialization and AJAX form submission "onchange" and 
then trigger the popup from the success callback to the AJAX call.

Are you doing this with vanilla.js or using a library like jQuery?

On 8/28/12 3:30 PM, Bruce Sorge wrote:
> Can someone point me to a site or a sample of JS that does the following:
>
> User enters first name, last name and birth date (birthdate is in a specific 
> format by using drop downs and not free text).
> Once the birth year has been selected, a query is triggered to check for the 
> existence of the same information that was just entered.
> If a match is found, a pop up is displayed stating that they have already 
> registered.
> If no match, nothing happens.
>
>
> Thanks,
>
> Bruce
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352334
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


OT - JS Question

2012-08-28 Thread Bruce Sorge

Can someone point me to a site or a sample of JS that does the following:

User enters first name, last name and birth date (birthdate is in a specific 
format by using drop downs and not free text).
Once the birth year has been selected, a query is triggered to check for the 
existence of the same information that was just entered. 
If a match is found, a pop up is displayed stating that they have already 
registered.
If no match, nothing happens.


Thanks,

Bruce

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352328
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


OT - JS question

2012-08-12 Thread Bruce Sorge

I have a form where I am adding administrators to a site. Site administrators 
and resort administrators. Rather than have two separate forms for this I 
thought that what I would do is when they are adding an admin, if they select a 
resort admin, then another select list appears with a list of resorts. 
Otherwise if they are a site admin they do not need ot select a resort. I have 
looked on line for JS to do this but all I can find is something that shows 
both select lists, and if you select a certain item in the first one then the 
second one populates, otherwise the list is empty. Admittedly I am not all that 
savvy at writing JS code. Has anyone done this before and would you be willing 
to share the code?


Thanks,

Bruce


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OT JS question

2010-03-05 Thread Raj Vijay

Can you try this,

(parseInt("",10)||0)

Raj

>Thanks for the suggestions but if I do this I get NaN (not a number I am 
>guessing).
>
>parseInt("FOO",10);
>parseInt("",10);
>
>
>
>http://www.w3schools.com/jsref/jsref_parseInt.asp
>
>var value = "15";
>parseInt(value,10);
>
>On Thu, Mar 4, 2010 at 1:37 PM, Chad Gray  wrote: 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331375
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: OT JS question

2010-03-04 Thread Chad Gray

Ah I think I found one that will work
Number("");

I will test it out.

Thanks for the help!


-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com] 
Sent: Thursday, March 04, 2010 3:04 PM
To: cf-talk
Subject: RE: OT JS question


Thanks for the suggestions but if I do this I get NaN (not a number I am 
guessing).

parseInt("FOO",10);
parseInt("",10);



-Original Message-
From: Jake Churchill [mailto:reyna...@gmail.com] 
Sent: Thursday, March 04, 2010 2:40 PM
To: cf-talk
Subject: Re: OT JS question


http://www.w3schools.com/jsref/jsref_parseInt.asp

var value = "15";
parseInt(value,10);

On Thu, Mar 4, 2010 at 1:37 PM, Chad Gray  wrote:

>
> Anyone know if there is an equivalent to CF’s val() in Javascript?
>
> I want to check a JS variable and set it to zero if it is blank.
>
> Thanks
>
> 





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331366
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: OT JS question

2010-03-04 Thread Chad Gray

Thanks for the suggestions but if I do this I get NaN (not a number I am 
guessing).

parseInt("FOO",10);
parseInt("",10);



-Original Message-
From: Jake Churchill [mailto:reyna...@gmail.com] 
Sent: Thursday, March 04, 2010 2:40 PM
To: cf-talk
Subject: Re: OT JS question


http://www.w3schools.com/jsref/jsref_parseInt.asp

var value = "15";
parseInt(value,10);

On Thu, Mar 4, 2010 at 1:37 PM, Chad Gray  wrote:

>
> Anyone know if there is an equivalent to CF’s val() in Javascript?
>
> I want to check a JS variable and set it to zero if it is blank.
>
> Thanks
>
> 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: OT JS question

2010-03-04 Thread Andy Matthews

parseInt might do the trick.

parseInt(var)

-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com] 
Sent: Thursday, March 04, 2010 1:37 PM
To: cf-talk
Subject: OT JS question


Anyone know if there is an equivalent to CF's val() in Javascript?
 
I want to check a JS variable and set it to zero if it is blank.
 
Thanks



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OT JS question

2010-03-04 Thread Jake Churchill

http://www.w3schools.com/jsref/jsref_parseInt.asp

var value = "15";
parseInt(value,10);

On Thu, Mar 4, 2010 at 1:37 PM, Chad Gray  wrote:

>
> Anyone know if there is an equivalent to CF’s val() in Javascript?
>
> I want to check a JS variable and set it to zero if it is blank.
>
> Thanks
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331360
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


OT JS question

2010-03-04 Thread Chad Gray

Anyone know if there is an equivalent to CF’s val() in Javascript?
 
I want to check a JS variable and set it to zero if it is blank.
 
Thanks

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:331359
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Simple JS question...

2009-09-16 Thread Dave Watts

> Hope this one is easy... how can I get the selected value from a form's
> select box and then pass that value as a variable in a href? Can it be done
> with an onClick event?
>
>  href="/account/index.cfm?mode=wishlist&productid=*js value here*">Add to
> Wishlist

The solutions that Charlie and Duane provided are perfectly good, but
it's worth pointing out that URLs have a search attribute, which you
can set directly:

Add
to Wishlist

The advantage of this approach, if you even want to call it that, is
that you can modify rather than overwrite the URL assigned to the href
attribute of the link.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326374
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple JS question...

2009-09-16 Thread Che Vilnonis

Charlie/Duane... Thanks. That did the trick! 

-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com] 
Sent: Wednesday, September 16, 2009 3:02 PM
To: cf-talk
Subject: Re: Simple JS question...


not tested, but something like:

Add to Wishlist


 function takeMeThere() {
  var mySelectBox = document.getElementById('mySelectBox');
  var productID =
mySelectBox.options[mySelectBox.selectedIndex].value;

  location.href = "/account/index.cfm?mode=wishlist&productid=" +
productID;
 }


On Wed, Sep 16, 2009 at 11:54 AM, Che Vilnonis  wrote:

>
> Hope this one is easy... how can I get the selected value from a 
> form's select box and then pass that value as a variable in a href? 
> Can it be done with an onClick event?
>
>  href="/account/index.cfm?mode=wishlist&productid=*js value here*">Add 
> to Wishlist
>
>
> Thanks, Che
>
>
>
> 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326373
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple JS question...

2009-09-16 Thread Duane Boudreau

Text

This may not be 100% as I haven't tested it, but it should be close.


-Original Message-
From: Che Vilnonis [mailto:ch...@asitv.com] 
Sent: Wednesday, September 16, 2009 3:54 PM
To: cf-talk
Subject: Simple JS question...


Hope this one is easy... how can I get the selected value from a form's
select box and then pass that value as a variable in a href? Can it be done
with an onClick event?

Add to
Wishlist


Thanks, Che





~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326371
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple JS question...

2009-09-16 Thread Charlie Griefer

not tested, but something like:

Add to Wishlist


 function takeMeThere() {
  var mySelectBox = document.getElementById('mySelectBox');
  var productID =
mySelectBox.options[mySelectBox.selectedIndex].value;

  location.href = "/account/index.cfm?mode=wishlist&productid=" +
productID;
 }


On Wed, Sep 16, 2009 at 11:54 AM, Che Vilnonis  wrote:

>
> Hope this one is easy... how can I get the selected value from a form's
> select box and then pass that value as a variable in a href? Can it be done
> with an onClick event?
>
>  href="/account/index.cfm?mode=wishlist&productid=*js value here*">Add to
> Wishlist
>
>
> Thanks, Che
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Simple JS question...

2009-09-16 Thread Che Vilnonis

Hope this one is easy... how can I get the selected value from a form's
select box and then pass that value as a variable in a href? Can it be done
with an onClick event?

Add to
Wishlist


Thanks, Che



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326369
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis

Thank you Dave... a simple solution indeed! 

-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Friday, July 31, 2009 4:25 PM
To: cf-talk
Subject: Re: Simple JS Question?


> Dave I would... but the actual example is a bit more complicated. 
> Basically, I'm using CSS to create a background image that sits under a
form text box.
> I then use a  around a invisible "spacer.gif" to submit via a 
> mouse click. The site is complicated design wise... I'm only trying to 
> make the designer's layout functional.

You could still simplify this, by calling the form's submit method when you
click on the button.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized instruction
at our training centers in Washington DC, Atlanta, Chicago, Baltimore,
Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325156
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple JS Question?

2009-07-31 Thread Dave Watts

> Dave I would... but the actual example is a bit more complicated. Basically,
> I'm using CSS to create a background image that sits under a form text box.
> I then use a  around a invisible "spacer.gif" to submit via a mouse
> click. The site is complicated design wise... I'm only trying to make the
> designer's layout functional.

You could still simplify this, by calling the form's submit method
when you click on the button.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325154
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis

Dave I would... but the actual example is a bit more complicated. Basically,
I'm using CSS to create a background image that sits under a form text box.
I then use a  around a invisible "spacer.gif" to submit via a mouse
click. The site is complicated design wise... I'm only trying to make the
designer's layout functional.

~Che

-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Friday, July 31, 2009 3:55 PM
To: cf-talk
Subject: Re: Simple JS Question?


> Thanks Dave. In isn't quite working. What's interesting is that if I 
> enter a search term and then hit the enter key, I get the pluses in 
> the url. If I click the submit button with my mouse, I get the spaces 
> between the search term in the url.

If you hit enter, you're submitting the form. If you click the image - you
don't actually have a submit button - you're changing the location object's
href property.

Why not simplify this, so that when you click the image you submit the form?
Just get rid of all the JS, and use 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325151
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Simple JS Question?

2009-07-31 Thread Dave Watts

> Thanks Dave. In isn't quite working. What's interesting is that if I enter a
> search term and then hit the enter key, I get the pluses in the url. If I
> click the submit button with my mouse, I get the spaces between the search
> term in the url.

If you hit enter, you're submitting the form. If you click the image -
you don't actually have a submit button - you're changing the location
object's href property.

Why not simplify this, so that when you click the image you submit the
form? Just get rid of all the JS, and use 

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325150
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Simple JS Question?

2009-07-31 Thread Che Vilnonis

Thanks Dave. In isn't quite working. What's interesting is that if I enter a
search term and then hit the enter key, I get the pluses in the url. If I
click the submit button with my mouse, I get the spaces between the search
term in the url.

~Che 

-Original Message-
From: Dave Watts [mailto:dwa...@figleaf.com] 
Sent: Friday, July 31, 2009 3:37 PM
To: cf-talk
Subject: Re: Simple JS Question?


> Using JS, how can I replace all spaces with plus (+) signs? Can it be 
> done "inline", or must I create a JS function?

You can use the escape function built into JavaScript; this is analogous to
URLEncodedFormat in CF.

http://www.w3schools.com/jsref/jsref_escape.asp

This won't replace spaces with plus signs, but will instead use the
appropriate URL encoding sequence, and the server will automatically
unencode the values it receives.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized instruction
at our training centers in Washington DC, Atlanta, Chicago, Baltimore,
Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325149
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Simple JS Question?

2009-07-31 Thread Dave Watts

> Using JS, how can I replace all spaces with plus (+) signs? Can it be done
> "inline", or must I create a JS function?

You can use the escape function built into JavaScript; this is
analogous to URLEncodedFormat in CF.

http://www.w3schools.com/jsref/jsref_escape.asp

This won't replace spaces with plus signs, but will instead use the
appropriate URL encoding sequence, and the server will automatically
unencode the values it receives.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325148
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Simple JS Question?

2009-07-31 Thread Che Vilnonis

Take this simple form snippet:






Using JS, how can I replace all spaces with plus (+) signs? Can it be done
"inline", or must I create a JS function?

Basically, I want the URL on the results page to look something like this:
http://mydomain.com/searchResults.cfm?searchField=blue+tennis+racket

Thanks, Che



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325147
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: JS Question: How to include a parameter when assigning a function to an event.

2009-06-18 Thread Tony Bentley

Use JQuery and then check out the documentation on binding an event.

A classic example is passing the id to a function to identify that element 
inside of the function:

$("#TheButton").bind("click",function(el){openClose( $(this).attr("id") )});


function openClose(el){
if($(el).is(".closed")){
$(el).show();
$(el).addClass("open");
}
if($(el).is(".open"){
$(el).hide();
$(el).addClass("closed");
}
}

Make sense?


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323650
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question: How to include a parameter when assigning a function to an event.

2009-06-18 Thread cold.fusion

Other solutions? Use JQuery or Ext Core for this type of binding. Makes 
it very simple, and avoids any cross browser issues.

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer

Co-Author of "Learning Ext JS"
http://www.packtpub.com/learning-ext-js/book
_
http://blog.cutterscrossing.com

On 6/18/2009 10:51 AM, Ian Skinner wrote:
> I finally found the right combination of Google Search terms and
> following other links to find at least one solution:
>
> container.childNodes[i].onclick = function() {openClose('hello world')};
>
> I would be interesting in hearing if there are other solutions or any
> difficulties I might have with this version.
>
> TIA
>
> Ian
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323648
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: JS Question: How to include a parameter when assigning a function to an event.

2009-06-18 Thread Ian Skinner

I finally found the right combination of Google Search terms and 
following other links to find at least one solution:

container.childNodes[i].onclick = function() {openClose('hello world')};

I would be interesting in hearing if there are other solutions or any 
difficulties I might have with this version.

TIA

Ian
 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323645
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


JS Question: How to include a parameter when assigning a function to an event.

2009-06-18 Thread Ian Skinner

I have this code that is assigning a JS function to the onClick events 
of elements.

container.childNodes[i].onclick = openClose;

I would like to assign parameters so that the openClose function of 
different elements function on specific items.  I recoginize that this 
syntax is not going to work:

container.childNodes[i].onclick = openClose(paramA,paramB);

But my Google searching skills are failing me on finding how one would 
do this type task, but surely it has got to be possible.  I just can't 
imagine that it is not possible to define a function for an event 
handler that can not use parameters.



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323642
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: js question - getting rusty

2009-05-03 Thread Don L

Thank you, William, this did what I need (I'm embarrassed), on user behavior, 
yes, expect it this way but you never know what user would do even given 
sufficient instructions.  Don

>For this, pretend that the contents of the iframe actually resides in a
>different browser window.
>
>When you click on bn1, you are changing the computers focus to a different
>window.  So all other commands, without using the mouse to change to the
>other window, will only effect that window.
>
>I haven't tried this, but I would suggest having the code after
>'eventTrigger' be [iframeid].focus().  If this works, it will change the
>'active' window back to the framed page.  Of course, this assumes that this
>is what your user would 'expect' the layout to do after a click on a
>button...
>
>William
>
>
>/>
>/> 
>/>
>
>I's an embarrasing js question, been on and off on js, pretty rusty with
>it...
>
>I have an iframe for text data input, in the meantime, I have a button 
>(id=d2) that has an event trigger to open up another window to do 
>something else, once it is done for the pop-up window, when a user 
>goes back to the iframe for more typing/data input, there's a problem, 
>if he/she hits the space bar, it triggers the id of d2 again, pop up a 
>window again.  Browser = IE7.  I didn't notice this odd behavior in 
>the past, is it because the computer has been hacked hence the 
>keyboard is not functioning nomally but I've just tried two computers 
>with the same odd behavior.
>
>Someone at the js NG suggested adding the this.blur() event after it, it
>worked for button1 but not button2, button3 etc.  
>
>
> -- this one works
> -- not this one
> -- nor this one
>
>Any idea?  Thanks.
>
>Don
>Chunshen Li 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322142
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: js question - getting rusty

2009-05-03 Thread William Seiter

For this, pretend that the contents of the iframe actually resides in a
different browser window.

When you click on bn1, you are changing the computers focus to a different
window.  So all other commands, without using the mouse to change to the
other window, will only effect that window.

I haven't tried this, but I would suggest having the code after
'eventTrigger' be [iframeid].focus().  If this works, it will change the
'active' window back to the framed page.  Of course, this assumes that this
is what your user would 'expect' the layout to do after a click on a
button...

William



 


-Original Message-
From: Don L [mailto:do...@yahoo.com] 
Sent: Sunday, May 03, 2009 4:38 PM
To: cf-talk
Subject: js question - getting rusty


I's an embarrasing js question, been on and off on js, pretty rusty with
it...

I have an iframe for text data input, in the meantime, I have a button 
(id=d2) that has an event trigger to open up another window to do 
something else, once it is done for the pop-up window, when a user 
goes back to the iframe for more typing/data input, there's a problem, 
if he/she hits the space bar, it triggers the id of d2 again, pop up a 
window again.  Browser = IE7.  I didn't notice this odd behavior in 
the past, is it because the computer has been hacked hence the 
keyboard is not functioning nomally but I've just tried two computers 
with the same odd behavior.

Someone at the js NG suggested adding the this.blur() event after it, it
worked for button1 but not button2, button3 etc.  


 -- this one works
 -- not this one
 -- nor this one

Any idea?  Thanks.

Don
Chunshen Li







~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322141
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


js question - getting rusty

2009-05-03 Thread Don L

I's an embarrasing js question, been on and off on js, pretty rusty with it...

I have an iframe for text data input, in the meantime, I have a button 
(id=d2) that has an event trigger to open up another window to do 
something else, once it is done for the pop-up window, when a user 
goes back to the iframe for more typing/data input, there's a problem, 
if he/she hits the space bar, it triggers the id of d2 again, pop up a 
window again.  Browser = IE7.  I didn't notice this odd behavior in 
the past, is it because the computer has been hacked hence the 
keyboard is not functioning nomally but I've just tried two computers 
with the same odd behavior.

Someone at the js NG suggested adding the this.blur() event after it, it worked 
for button1 but not button2, button3 etc.  


 -- this one works
 -- not this one
 -- nor this one

Any idea?  Thanks.

Don
Chunshen Li





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322139
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question

2008-12-21 Thread Robert Harrison
Thank You. I did figure out I couldn't do it because of the variable. I wantede 
to close the window onload of the next page, thn it hit me, duh. Close on 
unload of the current page. That did it. I was doig the action in the wrong 
place. Whoops!  
   
Thanks,  
Robert  
   
   
   
 
  _  

  From: s. isaac dealey [mailto:i...@turnkey.to]
To: cf-talk [mailto:cf-t...@houseoffusion.com]
Sent: Sat, 20 Dec 2008 16:25:01 -0500
Subject: Re: JS Question

> > I'm opening a popup on one page and want to close it on another page.
> 
> You can't do it, because the variable you created on one page to
> reference the popup doesn't exist when you leave that page.

That's true... although you might be able to get around that if you do
something really fancy with frames or iframes and passing a window
reference around. 

Or you could load the content of the "other page" via an ajax widget to
prevent actually navigating away from the page and that would preserve
your window reference. 

-- 
s. isaac dealey ^ new epoch
isn't it time for a change? 
ph: 781.769.0723

http://onTap.riaforge.org/blog





~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317040
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question

2008-12-20 Thread Dave Watts
> That's true... although you might be able to get around that if you do
> something really fancy with frames or iframes and passing a window
> reference around.

You would have to keep the page that created the variable; that page
could certainly be within a frameset or iframe. You could probably
also pass the reference from the page that created it to another page
currently loaded in the browser, but that would also require a
frameset or iframe.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317034
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question

2008-12-20 Thread s. isaac dealey
> > I'm opening a popup on one page and want to close it on another page.
> 
> You can't do it, because the variable you created on one page to
> reference the popup doesn't exist when you leave that page.

That's true... although you might be able to get around that if you do
something really fancy with frames or iframes and passing a window
reference around. 

Or you could load the content of the "other page" via an ajax widget to
prevent actually navigating away from the page and that would preserve
your window reference. 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 781.769.0723

http://onTap.riaforge.org/blog



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317032
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: JS Question

2008-12-20 Thread Dave Watts
> I'm opening a popup on one page and want to close it on another page.

You can't do it, because the variable you created on one page to
reference the popup doesn't exist when you leave that page.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317018
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: JS Question

2008-12-20 Thread J.J. Merrick
I think the reasoning is that "upbar" is not something that the popup
is called in the DOM rather it is a var that is defined as that
window. So when you go to close it in the non-opening page that upbar
isn't defined thus it doesn't know how or what to close.

Don't really know your solution since browsers get pretty picky on
allowing other windows to close other windows for security reasons.
You might need to rethink what you are doing and use something like a
Modal window or something.



J.J.



On Fri, Dec 19, 2008 at 12:34 PM, Robert Harrison
 wrote:
> I'm opening a popup on one page and want to close it on another page.
>
> I'm opening it with this:
>
>function progressWindow()
>{
> upbar = window.open("fileupload.htm",
> "upbar","status=1,scrollbars=no,resizable=no,width=320,height=130,top=280,le
> ft=380");
>}
>
> Trying to close it with this:
>
>function closepopup()
>{
> if(false == upbar.closed)
> {
>upbar.close ();
> }
>}
>
> This works if I open and close it on the same page, but it does not work
> across pages. Anyone see what I'm doing wrong?
>
>
>
> Robert B. Harrison
> Director of Interactive services
> Austin & Williams
> 125 Kennedy Drive, Suite 100 Hauppauge NY 11788
> T : 631.231.6600 Ext. 119
> F : 631.434.7022
> www.austin-williams.com
>
> Great advertising can't be either/or... It must be &.
>
>
>
>
> 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317014
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


JS Question

2008-12-19 Thread Robert Harrison
I'm opening a popup on one page and want to close it on another page. 

I'm opening it with this:

function progressWindow()
{
 upbar = window.open("fileupload.htm",
"upbar","status=1,scrollbars=no,resizable=no,width=320,height=130,top=280,le
ft=380");
}

Trying to close it with this:

function closepopup()
{
 if(false == upbar.closed) 
 {
upbar.close ();
 }
}

This works if I open and close it on the same page, but it does not work
across pages. Anyone see what I'm doing wrong?



Robert B. Harrison
Director of Interactive services
Austin & Williams
125 Kennedy Drive, Suite 100 Hauppauge NY 11788
T : 631.231.6600 Ext. 119 
F : 631.434.7022
www.austin-williams.com

Great advertising can't be either/or... It must be &.




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316989
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: JS Question Hide/Show Form Elements

2007-08-05 Thread Adrian Lynch
Or $("#idofelement").toggle();

I'm having a tonne of fun with jQuery at the moment!

Adrian

-Original Message-
From: Josh Nathanson
Sent: 03 August 2007 17:25
To: CF-Talk
Subject: Re: JS Question Hide/Show Form Elements


> HIDE: document.getElementById('idOfElement').style.display='none'
> SHOW: document.getElementById('idOfElement').style.display='block'

Or in jQuery:

$("#idofelement").hide();
$("#idofelement").show();

-- Josh

~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285412
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question Hide/Show Form Elements

2007-08-03 Thread Josh Nathanson
> HIDE: document.getElementById('idOfElement').style.display='none'
> SHOW: document.getElementById('idOfElement').style.display='block'

Or in jQuery:

$("#idofelement").hide();
$("#idofelement").show();

-- Josh



~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285338
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: JS Question Hide/Show Form Elements

2007-08-03 Thread Bobby Hartsfield
HIDE: document.getElementById('idOfElement').style.display='none'
SHOW: document.getElementById('idOfElement').style.display='block'


..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 02, 2007 2:53 PM
To: CF-Talk
Subject: OT: JS Question Hide/Show Form Elements

Anyone know of a JS that works on *most* browsers that will allow me to
hide/show sections of a form depending on what radio button is clicked? I've
found a few, but they don't seem to work with all browsers. Sent at 2:52 PM
EST.

Thanks, Che





~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285331
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: OT: JS Question Hide/Show Form Elements

2007-08-02 Thread Eric Haskins
We use Prototype. It works in just about everything we have thrown at it.

Eric


On 8/2/07, Che Vilnonis <[EMAIL PROTECTED]> wrote:
>
> Anyone know of a JS that works on *most* browsers that will allow me to
> hide/show sections of a form depending on what radio button is clicked?
> I've
> found a few, but they don't seem to work with all browsers. Sent at 2:52
> PM
> EST.
>
> Thanks, Che
>
>
>
> 

~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285280
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: JS Question Hide/Show Form Elements

2007-08-02 Thread Jim Davis
> -Original Message-
> From: Che Vilnonis [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 02, 2007 2:53 PM
> To: CF-Talk
> Subject: OT: JS Question Hide/Show Form Elements
> 
> Anyone know of a JS that works on *most* browsers that will allow me to
> hide/show sections of a form depending on what radio button is clicked?
> I've
> found a few, but they don't seem to work with all browsers.

You could do this with my PanelManager:

http://www.depressedpress.com/Content/Development/JavaScript/Extensions/DP_P
anelManager/Index.cfm

Just segment your form into DIVs with IDs and add those DIVs to the Panel
Manager.  You can then access panel manager methods directly from the DIVs.

For example if one of your DIVs was called "FormSection1" you'd create it as
a panel like so:

  // Create a Panel Manager for the Menu
FormPanels = new DP_PanelManager();
  // Create Panels
FormPanels.addPanel("FormSection1");

This adds a tons of methods to your DIV. Now any reference you get to the
DIV will allow access to those methods.  For example to "hide" the element
do this:

document.getElementById("FormSection1").setDisplay("none");

Actually it's even a little easier because the setDisplay() supports a value
of "toggle" that will show the element if it's hidden and hide it if its
showing.

You can also modify the size, position, opacity and other properties of the
panel.  For example if you want the form section to fade out for 100ms
before it disappears do this:

document.getElementById("FormSection1").shiftOpacity(0, 0, 100);
document.getElementById("FormSection1").setDisplay("none", 100);

That tells the panel to fade out to 0 opacity for 100ms and to wait 100 ms
before changing the display (remember both lines will run at the same time
thus the delay).

The component has been tested in IE, FireFox and Opera.

Jim Davis


~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285265
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


OT: JS Question Hide/Show Form Elements

2007-08-02 Thread Che Vilnonis
Anyone know of a JS that works on *most* browsers that will allow me to
hide/show sections of a form depending on what radio button is clicked? I've
found a few, but they don't seem to work with all browsers. Sent at 2:52 PM
EST.

Thanks, Che



~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285234
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: JS Question

2006-12-14 Thread Bruce Sorge
Well I do not know what went wrong with that tag. I downloaded another one
though and although it is not as pretty as the other one, it is functional
and that is all that matters.

-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 3:00 PM
To: CF-Talk
Subject: RE: JS Question

Bruce,

When you say the function I gave you did nothing... You mean it didn't
even alert anything? You might have Javascript Disabled on the browser
some how.


...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 4:39 PM
To: CF-Talk
Subject: Re: JS Question

No popup blocker, custom tag has not been touched since yesterday (it
worked fine when I left work). Function names are fine. The code you
sent did nothing for me really. And I put an alert in the function, and
nothing. So at least now I know the function is not being called.






~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264098
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: JS Question

2006-12-14 Thread Robertson-Ravo, Neil (RX)
What does Firebug show you?





"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Ben Nadel
To: CF-Talk
Sent: Thu Dec 14 22:59:47 2006
Subject: RE: JS Question

Bruce,

When you say the function I gave you did nothing... You mean it didn't
even alert anything? You might have Javascript Disabled on the browser
some how.


...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 4:39 PM
To: CF-Talk
Subject: Re: JS Question

No popup blocker, custom tag has not been touched since yesterday (it
worked fine when I left work). Function names are fine. The code you
sent did nothing for me really. And I put an alert in the function, and
nothing. So at least now I know the function is not being called.






~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264083
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: JS Question

2006-12-14 Thread Ben Nadel
Bruce,

When you say the function I gave you did nothing... You mean it didn't
even alert anything? You might have Javascript Disabled on the browser
some how.


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 4:39 PM
To: CF-Talk
Subject: Re: JS Question

No popup blocker, custom tag has not been touched since yesterday (it
worked fine when I left work). Function names are fine. The code you
sent did nothing for me really. And I put an alert in the function, and
nothing. So at least now I know the function is not being called.




~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264082
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: JS Question

2006-12-14 Thread Bruce Sorge
No popup blocker, custom tag has not been touched since yesterday (it worked
fine when I left work). Function names are fine. The code you sent did
nothing for me really. And I put an alert in the function, and nothing. So
at least now I know the function is not being called.


~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264073
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: JS Question

2006-12-14 Thread Ben Nadel
Pop-up blocker in your browser? Did you update anything recently having
nothing to do with the code?

Make a link with the following code:

Debug FN Call 

This will alert the function that is actually being called. You should
see actual TEXT being alerted here. If you see NULL or undefined, then
you are not calling the name of a valid function.

Reasons:

1. One or more functions have the same name.

2. Name is mispelled.



..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 14, 2006 3:59 PM
To: CF-Talk
Subject: JS Question

Hey all,
I have an app that I am using a custom tag called cf_cal. it worked fine
yesterday, and now today it is not. Basicaly it has an image of a
calendar and when you click on the image, it opens a small windows with
a calendar in it. The call to the tag looks like this:


Here is the page in the custom tag that generates the icon:


When I click on it, nothing happens. No errors, no page, nothing. I
checked and double-checked the form name as well as the field name, even
going so far as to copy and paste them in, but nothing. I have not made
any changes to this app other than rename a bunch of form fields, but I
did not touch these. I have made to changes to the custom tag either.

Thanks,

Bruce




~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264071
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


JS Question

2006-12-14 Thread Bruce Sorge
Hey all,
I have an app that I am using a custom tag called cf_cal. it worked fine
yesterday, and now today it is not. Basicaly it has an image of a calendar
and when you click on the image, it opens a small windows with a calendar in
it. The call to the tag looks like this:


Here is the page in the custom tag that generates the icon:


When I click on it, nothing happens. No errors, no page, nothing. I checked
and double-checked the form name as well as the field name, even going so
far as to copy and paste them in, but nothing. I have not made any changes
to this app other than rename a bunch of form fields, but I did not touch
these. I have made to changes to the custom tag either.

Thanks,

Bruce


~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264070
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: More of a JS Question/Forms

2006-05-02 Thread Denny Valliant
On 5/2/06, Jochem van Dieten <[EMAIL PROTECTED]> wrote:
>
> Denny Valliant said:
> > The only trouble with JavaScript is: what if it's turned off?
>
> Then you fall back to server-side validation.


Indeed, if you remembered to do it.  I've found lots of places
where their only validation is through JS.  Thank god for the
web developer extension for firefox! Click click!

I'm guilty too, I've got some dates that aren't validated 'cept
JS, which I've been meaning to isValid or whatnot.

> The isValid() and maybe hidden form fields would be "safest".
> >
> > I think.
> >
> > Not the most UI friendly. In conjunction with some AJAX it
> > could be, tho.
>
> And how is AJAX going to work if Javascript doesn't work?


It's just a method to have both.  If JS is enabled, you can have
the AJAX check the inputs while they're still on the form, but
have it degrade nicely if they don't have JS enabled, using the
same submission page with a plain old "post" instead.

Theoretically.

In one app, I've got all the form fields in a DB, which I use to
determine if it's required, max length, etc..  Then I dynamically
generate the select queries, JS validation, DB insert validation...

In a setup like that it is easier to add the "check it from all
angles" - JS and Server Side- because I control the angles
through standard variables (required, length, datatype).

Doing it by hand is a pain in the ass but best practice is to
have both... so some wayform or another...
:de

-ps Although I've shied away from cfform, I like how now
you can do the same stuff I rolled my own to do (cf 7).


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239333
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-05-02 Thread Jochem van Dieten
Denny Valliant said:
> The only trouble with JavaScript is: what if it's turned off?

Then you fall back to server-side validation.


> The isValid() and maybe hidden form fields would be "safest".
>
> I think.
>
> Not the most UI friendly. In conjunction with some AJAX it
> could be, tho.

And how is AJAX going to work if Javascript doesn't work?

Jochem




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239249
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-05-02 Thread Cutter (CFRelated)
In our various site's stats, of several thousand daily users, 4% had 
javascript disabled and 99.3% of those were crawlers. What are your 
site's stats like?

Cutter

Denny Valliant wrote:
> The only trouble with JavaScript is: what if it's turned off?
> 
> The isValid() and maybe hidden form fields would be "safest".
> 
> I think.
> 
> Not the most UI friendly. In conjunction with some AJAX it
> could be, tho.
> :D
> 
> On 5/1/06, Jochem van Dieten <[EMAIL PROTECTED]> wrote:
> 
>>Eric J. Hoffman wrote:
>>
>>>I know this isn't quite CF, but figure the folks around here have done
>>>this easily.
>>>
>>>I have two forms, and I just want to check if no value has been entered
>>>in either form, and pop to tell the user to enter something!  So I can't
>>>do a required field in my validation because they can fill in one of
>>>three fields or more in one form, but not the other.
>>>
>>>Anyway, I would check form1 and form2 for no values...I get that, but
>>>wonder how to check for nothing from each form.
>>
>>function verify() {
>>   fields = document.getElementsByTagName('input');
>>   for (var i=0; i < fields.length; i++)   {
>> if (fields[i].value != '')
>>   return true;
>>   }
>>   alert('Please fill out at least one form field!');
>>   return false;
>>}
>>
>>Jochem
>>
>>
> 
> 
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239239
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-05-01 Thread Denny Valliant
The only trouble with JavaScript is: what if it's turned off?

The isValid() and maybe hidden form fields would be "safest".

I think.

Not the most UI friendly. In conjunction with some AJAX it
could be, tho.
:D

On 5/1/06, Jochem van Dieten <[EMAIL PROTECTED]> wrote:
>
> Eric J. Hoffman wrote:
> > I know this isn't quite CF, but figure the folks around here have done
> > this easily.
> >
> > I have two forms, and I just want to check if no value has been entered
> > in either form, and pop to tell the user to enter something!  So I can't
> > do a required field in my validation because they can fill in one of
> > three fields or more in one form, but not the other.
> >
> > Anyway, I would check form1 and form2 for no values...I get that, but
> > wonder how to check for nothing from each form.
>
> function verify() {
>fields = document.getElementsByTagName('input');
>for (var i=0; i < fields.length; i++)   {
>  if (fields[i].value != '')
>return true;
>}
>alert('Please fill out at least one form field!');
>return false;
> }
>
> Jochem
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239207
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-05-01 Thread Jochem van Dieten
Eric J. Hoffman wrote:
> I know this isn't quite CF, but figure the folks around here have done
> this easily.
> 
> I have two forms, and I just want to check if no value has been entered
> in either form, and pop to tell the user to enter something!  So I can't
> do a required field in my validation because they can fill in one of
> three fields or more in one form, but not the other.
> 
> Anyway, I would check form1 and form2 for no values...I get that, but
> wonder how to check for nothing from each form.

function verify() {
   fields = document.getElementsByTagName('input');
   for (var i=0; i < fields.length; i++)   {
 if (fields[i].value != '')
   return true;
   }
   alert('Please fill out at least one form field!');
   return false;
}

Jochem

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239180
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: More of a JS Question/Forms

2006-05-01 Thread Eric J. Hoffman
Two forms.

Two options for people to search.  Different kind of data sets.  They
can either enter in one or the other.

Just want to make sure something was entered on the page somewhere
before they hit a submit button.  Or maybe, that in the form button they
do submit, something was freeking entered.  Maybe that's the normal
ticket.  

Thanks, 





Eric J. Hoffman
Managing Partner
2081 Industrial Blvd
StillwaterMN55082
mail: [EMAIL PROTECTED]
www: http://www.ejhassociates.com
tel: 651.717.4105
fax: 651.717.4115
mob: 651.245.2717



This message contains confidential information and is intended only for [EMAIL 
PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, 
distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by 
e-mail if you have received this e-mail by mistake and delete this e-mail from 
your system. E-mail transmission cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does 
not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version.


-Original Message-

From: Jim Wright [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 01, 2006 9:08 AM
To: CF-Talk
Subject: Re: More of a JS Question/Forms

> I have two forms, and I just want to check if no value has been 
> entered in either form, and pop to tell the user to enter something!  
> So I can't do a required field in my validation because they can fill 
> in one of three fields or more in one form, but not the other.

Eric,
While Charlie's getElementById code will probably work fine for what you
are talking about, I'm a little confused about the two forms.  Are these
forms on the same page/frame?  When you submit one, you would lose
anything that was entered on the other, unless you do some onSubmit
javascript to capture and pass that data through the form you are
submitting...so validating on data that is going to be lost seems odd.
Or are you just saying that these are two parts of the same form?
-jim


--
Jim Wright
Wright Business Solutions
[EMAIL PROTECTED]
919-417-2257



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239176
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-05-01 Thread Jim Wright
> I have two forms, and I just want to check if no value has been entered
> in either form, and pop to tell the user to enter something!  So I can't
> do a required field in my validation because they can fill in one of
> three fields or more in one form, but not the other.

Eric,
While Charlie's getElementById code will probably work fine for what
you are talking about, I'm a little confused about the two forms.  Are
these forms on the same page/frame?  When you submit one, you would
lose anything that was entered on the other, unless you do some
onSubmit javascript to capture and pass that data through the form you
are submitting...so validating on data that is going to be lost seems
odd.  Or are you just saying that these are two parts of the same
form?
-jim


--
Jim Wright
Wright Business Solutions
[EMAIL PROTECTED]
919-417-2257

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239165
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: More of a JS Question/Forms

2006-05-01 Thread Andy Matthews
Good point Ben. Thanks.



-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED]
Sent: Monday, May 01, 2006 9:01 AM
To: CF-Talk
Subject: RE: More of a JS Question/Forms


Andy,

One caveat to the FORM.fieldnames, that has killed me a few times... If you
are Param'ing stuff on the server, in the form scope

Ex. 

And "file_delete" is NOT submitted to the form (ie. checkbox is not
checked), then "file_field" will not be in the fieldnames list. A slightly
better solution might be to loop over the form scope via a collection loop.


Ben Nadel
www.bennadel.com
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Monday, May 01, 2006 9:35 AM
To: CF-Talk
Subject: RE: More of a JS Question/Forms

FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.






~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239164
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: More of a JS Question/Forms

2006-05-01 Thread Ben Nadel
Andy,

One caveat to the FORM.fieldnames, that has killed me a few times... If you
are Param'ing stuff on the server, in the form scope

Ex. 

And "file_delete" is NOT submitted to the form (ie. checkbox is not
checked), then "file_field" will not be in the fieldnames list. A slightly
better solution might be to loop over the form scope via a collection loop. 

...
Ben Nadel 
www.bennadel.com
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 01, 2006 9:35 AM
To: CF-Talk
Subject: RE: More of a JS Question/Forms

FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239162
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: More of a JS Question/Forms

2006-05-01 Thread Andy Matthews
FORM.fieldnames is a built in variable containing a commadelimited list of
all of the FORM fields. You could loop over that and check to see if any/all
of the fields are empty.



-Original Message-
From: Eric J. Hoffman [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 30, 2006 6:19 PM
To: CF-Talk
Subject: More of a JS Question/Forms


I know this isn't quite CF, but figure the folks around here have done
this easily.

I have two forms, and I just want to check if no value has been entered
in either form, and pop to tell the user to enter something!  So I can't
do a required field in my validation because they can fill in one of
three fields or more in one form, but not the other.

Anyway, I would check form1 and form2 for no values...I get that, but
wonder how to check for nothing from each form.

Thanks.



Eric J. Hoffman
Managing Partner
2081 Industrial Blvd
StillwaterMN55082
mail: [EMAIL PROTECTED]
www: http://www.ejhassociates.com
tel: 651.717.4105
fax: 651.717.4115
mob: 651.245.2717



This message contains confidential information and is intended only for
[EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you
should not disseminate, distribute or copy this e-mail. Please notify
[EMAIL PROTECTED] immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete,
or contain viruses. Eric J. Hoffman therefore does not accept liability for
any errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239160
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: More of a JS Question/Forms

2006-05-01 Thread Snake
You could just loop over all form field and test If they are blank.

E.g.

 




 





If all the submitted fields are blank, the variable BLANK will be true at
the end, if aven 1 is not blank, it will be false, so you can display your
validation message.

--
Snake

-Original Message-
From: Eric J. Hoffman [mailto:[EMAIL PROTECTED] 
Sent: 01 May 2006 00:19
To: CF-Talk
Subject: More of a JS Question/Forms

I know this isn't quite CF, but figure the folks around here have done this
easily.

I have two forms, and I just want to check if no value has been entered in
either form, and pop to tell the user to enter something!  So I can't do a
required field in my validation because they can fill in one of three fields
or more in one form, but not the other.

Anyway, I would check form1 and form2 for no values...I get that, but wonder
how to check for nothing from each form.

Thanks.



Eric J. Hoffman
Managing Partner
2081 Industrial Blvd
StillwaterMN55082
mail: [EMAIL PROTECTED]
www: http://www.ejhassociates.com
tel: 651.717.4105
fax: 651.717.4115
mob: 651.245.2717



This message contains confidential information and is intended only for
[EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you
should not disseminate, distribute or copy this e-mail. Please notify
[EMAIL PROTECTED] immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete,
or contain viruses. Eric J. Hoffman therefore does not accept liability for
any errors or omissions in the contents of this message, which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.




~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239157
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: More of a JS Question/Forms

2006-04-30 Thread Charlie Griefer
give each form field a unique ID.

if ((document.getElementById('field1').value == "") &&
(document.getElementById('field2').value == "")) {
 alert('foobar');
 return false;
}

that's the basic/most straightforward way.  there are some regex's for
JS that will also check to make sure there are no spaces in the field
name...which makes the validation a bit more effective.

On 4/30/06, Eric J. Hoffman <[EMAIL PROTECTED]> wrote:
> I know this isn't quite CF, but figure the folks around here have done
> this easily.
>
> I have two forms, and I just want to check if no value has been entered
> in either form, and pop to tell the user to enter something!  So I can't
> do a required field in my validation because they can fill in one of
> three fields or more in one form, but not the other.
>
> Anyway, I would check form1 and form2 for no values...I get that, but
> wonder how to check for nothing from each form.
>
> Thanks.
> 
>
>
> Eric J. Hoffman
> Managing Partner
> 2081 Industrial Blvd
> StillwaterMN55082
> mail: [EMAIL PROTECTED]
> www: http://www.ejhassociates.com
> tel: 651.717.4105
> fax: 651.717.4115
> mob: 651.245.2717
>
> 
>
> This message contains confidential information and is intended only for 
> [EMAIL PROTECTED] If you are not cf-talk@houseoffusion.com you should not 
> disseminate, distribute or copy this e-mail. Please notify [EMAIL PROTECTED] 
> immediately by e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system. E-mail transmission cannot be guaranteed to be 
> secure or error-free as information could be intercepted, corrupted, lost, 
> destroyed, arrive late or incomplete, or contain viruses. Eric J. Hoffman 
> therefore does not accept liability for any errors or omissions in the 
> contents of this message, which arise as a result of e-mail transmission. If 
> verification is required please request a hard-copy version.
> 
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239151
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


More of a JS Question/Forms

2006-04-30 Thread Eric J. Hoffman
I know this isn't quite CF, but figure the folks around here have done
this easily.

I have two forms, and I just want to check if no value has been entered
in either form, and pop to tell the user to enter something!  So I can't
do a required field in my validation because they can fill in one of
three fields or more in one form, but not the other.

Anyway, I would check form1 and form2 for no values...I get that, but
wonder how to check for nothing from each form.

Thanks.



Eric J. Hoffman
Managing Partner
2081 Industrial Blvd
StillwaterMN55082
mail: [EMAIL PROTECTED]
www: http://www.ejhassociates.com
tel: 651.717.4105
fax: 651.717.4115
mob: 651.245.2717



This message contains confidential information and is intended only for [EMAIL 
PROTECTED] If you are not cf-talk@houseoffusion.com you should not disseminate, 
distribute or copy this e-mail. Please notify [EMAIL PROTECTED] immediately by 
e-mail if you have received this e-mail by mistake and delete this e-mail from 
your system. E-mail transmission cannot be guaranteed to be secure or 
error-free as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. Eric J. Hoffman therefore does 
not accept liability for any errors or omissions in the contents of this 
message, which arise as a result of e-mail transmission. If verification is 
required please request a hard-copy version.


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239150
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: JS Question

2005-05-14 Thread Andy Ousterhout
Thanks.  

-Original Message-
From: Ewok 

Use the title attribute for the tool tip 

If you are wanting the actual text on the button changed.. use 

Onmouseover="this.value='Mouse On Danielson';" OnMouseout="this.value='Mouse
Off Danielson';"

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 14, 2005 11:27 AM
To: CF-Talk
Subject: JS Question

I would like to be able to display alternate text when a User Mouse Over's a
submit button and have the text displayed similar to how Alt Text works with
links.  Now could I do this?

Andy 






~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206714
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: JS Question

2005-05-14 Thread Ewok
Use the title attribute for the tool tip 

If you are wanting the actual text on the button changed.. use 

Onmouseover="this.value='Mouse On Danielson';" OnMouseout="this.value='Mouse
Off Danielson';"

-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 14, 2005 11:27 AM
To: CF-Talk
Subject: JS Question

I would like to be able to display alternate text when a User Mouse Over's a
submit button and have the text displayed similar to how Alt Text works with
links.  Now could I do this?

Andy 




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206712
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


JS Question

2005-05-14 Thread Andy Ousterhout
I would like to be able to display alternate text when a User Mouse Over's a
submit button and have the text displayed similar to how Alt Text works with
links.  Now could I do this?

Andy 


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:206711
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CF and JS question

2004-08-28 Thread Douglas Knudsen
I'm abit confused here, I create an associative array using
var foo = new Array
foo['dosge'] = 'car';

without issue.  I can see that Array is an Object perhaps, but teh
above does work.  Well, I'm not certain it will work in all JS in all
browsers, I'm kind of lucky, I work on a sterile intranet.

Doug

- Original Message -
From: Jim Davis <[EMAIL PROTECTED]>
Date: Sat, 28 Aug 2004 14:11:16 -0400
Subject: RE: CF and JS question
To: CF-Talk <[EMAIL PROTECTED]>

In _javascript_ associative arrays are always Objects - doing "new Object"
always creates an associative array (or, more specifically something that
can be used as an associative array) and doing "new Array" always results in
an indexed array.  There's no way to create an associative array using the
Array object.

CF is similar for CFCs (in that all CFCs are actually structures).  But in
CF all CFCs are structs but all structs are not CFCs where in _javascript_ all
associative arrays are Objects and all Objects are associative arrays.

Jim Davis

From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 28, 2004 1:04 PM
To: CF-Talk
Subject: Re: CF and JS question

> Actually, JS supports associative arrays also.  So,
> foo['apple'] =
> fruit is perfectly fine.  Hence the need for
> JSStringFormat() when
> creating these via CF, in case there's a ' or something.

> Doug

Ahh... Well I've always just used Object() for that -- which is also
what cfwddx uses... I suspect that's for backward compatibility with
some earlier versions of JS or at least the JS engines in some earlier
browsers.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF and JS question

2004-08-28 Thread Jim Davis
In _javascript_ associative arrays are always Objects - doing "new Object"
always creates an associative array (or, more specifically something that
can be used as an associative array) and doing "new Array" always results in
an indexed array.  There's no way to create an associative array using the
Array object.

CF is similar for CFCs (in that all CFCs are actually structures).  But in
CF all CFCs are structs but all structs are not CFCs where in _javascript_ all
associative arrays are Objects and all Objects are associative arrays.

Jim Davis

From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 28, 2004 1:04 PM
To: CF-Talk
Subject: Re: CF and JS question

> Actually, JS supports associative arrays also.  So,
> foo['apple'] =
> fruit is perfectly fine.  Hence the need for
> JSStringFormat() when
> creating these via CF, in case there's a ' or something.

> Doug

Ahh... Well I've always just used Object() for that -- which is also
what cfwddx uses... I suspect that's for backward compatibility with
some earlier versions of JS or at least the JS engines in some earlier
browsers.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-28 Thread S . Isaac Dealey
> Actually, JS supports associative arrays also.  So,
> foo['apple'] =
> fruit is perfectly fine.  Hence the need for
> JSStringFormat() when
> creating these via CF, in case there's a ' or something.

> Doug

Ahh... Well I've always just used Object() for that -- which is also
what cfwddx uses... I suspect that's for backward compatibility with
some earlier versions of JS or at least the JS engines in some earlier
browsers.

s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-28 Thread Douglas Knudsen
Actually, JS supports associative arrays also.  So, foo['apple'] =
fruit is perfectly fine.  Hence the need for JSStringFormat() when
creating these via CF, in case there's a ' or something.

Doug

- Original Message -
From: S. Isaac Dealey <[EMAIL PROTECTED]>
Date: Sat, 28 Aug 2004 11:29:58 -0400
Subject: RE: CF and JS question
To: CF-Talk <[EMAIL PROTECTED]>

> beautiful use of JSStringFormat() Isaac!  You know I
> fought with errant '
> and " in my JS for like a year and a half before
> discovering this function.
> Now, doesn't the below creae an array of 3d arrays?  A
> true 3D array is nto
> available like CF, IIRC.  Anyhoo, I've used the below
> approach also

> var sys = new Array;
>   
>    sys['#JSStringFormat(rates.billsystem)#'] = new Array;
>    

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ] = new Array
> 

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ]['#JSStringFormat(rates.descr)#'] =
> '#JSStringFormat(rates.url)#';
> 
>    
>   

Offhand, the syntax looks a bit odd... you've got

sys['#jsstringformat(something)#'] = new Array;

Where "sys" is an existing array... which may work with some
_javascript_ engines if "something" is an integer, although generally
speaking you wouldn't use jsstringformat() or quotes for this value
since a _javascript_ array is always indexed with integers. If you were
to change "sys" from an array to an Object (again, case sensitive like
everything in JS), then you would want to use the quotes and the
jsstringformat() function, since the Object behaves much like a CF
structure or associative array, having members which are referenced by
name instead of an arbitrary order (as an Array). Objects can also
have functions or methods as members, although at least with previous
versions of JS it was described as "object based" not "object
oriented". I'm not certain but I think the more recent versions of
ECMAScript/JS are described as "object oriented" now.

s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF and JS question

2004-08-28 Thread S . Isaac Dealey
> beautiful use of JSStringFormat() Isaac!  You know I
> fought with errant '
> and " in my JS for like a year and a half before
> discovering this function.
> Now, doesn't the below creae an array of 3d arrays?  A
> true 3D array is nto
> available like CF, IIRC.  Anyhoo, I've used the below
> approach also

> var sys = new Array;
>   
>    sys['#JSStringFormat(rates.billsystem)#'] = new Array;
>    

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ] = new Array
> 

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ]['#JSStringFormat(rates.descr)#'] =
> '#JSStringFormat(rates.url)#';
> 
>    
>   

Offhand, the syntax looks a bit odd... you've got

sys['#jsstringformat(something)#'] = new Array;

Where "sys" is an existing array... which may work with some
_javascript_ engines if "something" is an integer, although generally
speaking you wouldn't use jsstringformat() or quotes for this value
since a _javascript_ array is always indexed with integers. If you were
to change "sys" from an array to an Object (again, case sensitive like
everything in JS), then you would want to use the quotes and the
jsstringformat() function, since the Object behaves much like a CF
structure or associative array, having members which are referenced by
name instead of an arbitrary order (as an Array). Objects can also
have functions or methods as members, although at least with previous
versions of JS it was described as "object based" not "object
oriented". I'm not certain but I think the more recent versions of
ECMAScript/JS are described as "object oriented" now.

s. isaac dealey 954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread S . Isaac Dealey
> well see I have 3 selects twice..
> I'm already using the cf multi selects related once, and
> because of
> the code behind that custom tag you cant use it twice on
> the same
> page.
> I'd already considered that ;)

Well you probably could, but if you're using an encrypted tag it would
require using cfsavecontent and some regular expressions which -- if
the _javascript_ to do this gives you headaches, the regular expressions
to do that would just make your head explode outright. :)

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
well see I have 3 selects twice..
I'm already using the cf multi selects related once, and because of
the code behind that custom tag you cant use it twice on the same
page.
I'd already considered that ;)

On Fri, 27 Aug 2004 14:00:12 -0400, Adam Haskell <[EMAIL PROTECTED]> wrote:
> oh yeah or you could look on Macromedia's dev exchange and look for
> the UDF (maybe a tag) called 2 releated selects ;) I don't like the
> way it is done in that tag though.
> 
> Adam H
> 
> On Fri, 27 Aug 2004 12:45:14 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > Sorry Adam, I didnt see your post.. I may go that route but
> > considering it's given me pains for the past 3 hours :) I think I'm
> > gonna do something else for a few minutes and calm myself down..
> >
> > On Fri, 27 Aug 2004 12:42:45 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > > FINALLY!
> > >
> > > I went with 2 arrays, 2 queries to populate the damn arrays using SQL
> > > to check to see if c_activityid was 2 or 4.
> > > It works..
> > >
> > >
> > >
> > >
> > > On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > > > that works.. I also had to add  and [x] within the loop.
> > > > the problem I'm running into now is that it's leaving the spaces empty
> > > >
> > > >for(i=0;i
> > > > if (taskArray[i][2] == actid)
> > > >   document.forms['laforma'].c_taskid.options[i] = new
> > > > Option(taskArray[i][0], taskArray[i][1]);
> > > >}
> > > >
> > > > it's going through the entire array (10 items) and putting something in there..
> > > > which means if I pass 4..
> > > > the select box has 7 empty spaces and then
> > > > CBT
> > > > Classroom Training
> > > > Conference Call
> > > >
> > > > I added a rmvNulls function I wrote quick..
> > > > function rmvNulls(sel) {
> > > >for (i=0;i
> > > >//alert(sel.options[i].value.length)
> > > >    if (sel.options[i].value.length == 0)
> > > >sel.options[i] = null;
> > > >}
> > > > }
> > > >
> > > > this removes some of them but then gives me a JS error..
> > > > says something about options.value is null or not an object?
> > > >
> > > > any ideas on how to not add all the extra empty choices
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > > > > > hey Issac..
> > > > > > yeah I started using your code to generate the JS Array..
> > > > > > var taskArray = new Array();
> > > > > > 
> > > > > > 
> > > > > >  to="#alltasks.recordcount#">
> > > > > >  taskArray[#x-1#] = new Array(
> > > > > >'#jsstringformat(alltasks.task)#',
> > > > > >'#jsstringformat(alltasks.c_taskid)#',
> > > > > >'#jsstringformat(alltasks.c_activityid)#');
> > > > > > 
> > > > > > 
> > > > >
> > > > > > but when implementing it..
> > > > > > for(i=0;i
> > > > > >   for(j=0;j<2;j++) {
> > > > > >  if (taskArray[i][2] == actid)
> > > > > >   document.forms['laforma'].c_taskid.options[i] = new
> > > > > > Option(taskArray[i][j], taskArray[i][j+1]);
> > > > > >   }
> > > > > > }
> > > > >
> > > > > > which to me seems like it should work..
> > > > > > But it isnt
> > > > >
> > > > >
> > > > > See my last reply for the code-bit -- your j loop is an extra -- once
> > > > > you remove that I think you should be okay.
> > > > >
> > > > > s. isaac dealey   954.927.5117
> > > > >
> > > > > new epoch : isn't it time for a change?
> > > > >
> > > > > add features without fixtures with
> > > > > the onTap open source framework
> > > > > http://www.sys-con.com/story/?storyid=44477&DE=1
> > > > > http://www.sys-con.com/story/?storyid=45569&DE=1
> > > > > http://www.fusiontap.com
> > > > >
> > > > >
> >
> >
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Adam Haskell
oh yeah or you could look on Macromedia's dev exchange and look for
the UDF (maybe a tag) called 2 releated selects ;) I don't like the
way it is done in that tag though.

Adam H 

On Fri, 27 Aug 2004 12:45:14 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> Sorry Adam, I didnt see your post.. I may go that route but
> considering it's given me pains for the past 3 hours :) I think I'm
> gonna do something else for a few minutes and calm myself down..
> 
> On Fri, 27 Aug 2004 12:42:45 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > FINALLY!
> >
> > I went with 2 arrays, 2 queries to populate the damn arrays using SQL
> > to check to see if c_activityid was 2 or 4.
> > It works..
> >
> >
> >
> >
> > On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > > that works.. I also had to add  and [x] within the loop.
> > > the problem I'm running into now is that it's leaving the spaces empty
> > >
> > >for(i=0;i
> > > if (taskArray[i][2] == actid)
> > >   document.forms['laforma'].c_taskid.options[i] = new
> > > Option(taskArray[i][0], taskArray[i][1]);
> > >}
> > >
> > > it's going through the entire array (10 items) and putting something in there..
> > > which means if I pass 4..
> > > the select box has 7 empty spaces and then
> > > CBT
> > > Classroom Training
> > > Conference Call
> > >
> > > I added a rmvNulls function I wrote quick..
> > > function rmvNulls(sel) {
> > >for (i=0;i
> > >//alert(sel.options[i].value.length)
> > >    if (sel.options[i].value.length == 0)
> > >sel.options[i] = null;
> > >}
> > > }
> > >
> > > this removes some of them but then gives me a JS error..
> > > says something about options.value is null or not an object?
> > >
> > > any ideas on how to not add all the extra empty choices
> > >
> > >
> > >
> > >
> > > On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > > > > hey Issac..
> > > > > yeah I started using your code to generate the JS Array..
> > > > > var taskArray = new Array();
> > > > > 
> > > > > 
> > > > >  to="#alltasks.recordcount#">
> > > > >  taskArray[#x-1#] = new Array(
> > > > >'#jsstringformat(alltasks.task)#',
> > > > >'#jsstringformat(alltasks.c_taskid)#',
> > > > >'#jsstringformat(alltasks.c_activityid)#');
> > > > > 
> > > > > 
> > > >
> > > > > but when implementing it..
> > > > > for(i=0;i
> > > > >   for(j=0;j<2;j++) {
> > > > >  if (taskArray[i][2] == actid)
> > > > >   document.forms['laforma'].c_taskid.options[i] = new
> > > > > Option(taskArray[i][j], taskArray[i][j+1]);
> > > > >   }
> > > > > }
> > > >
> > > > > which to me seems like it should work..
> > > > > But it isnt
> > > >
> > > >
> > > > See my last reply for the code-bit -- your j loop is an extra -- once
> > > > you remove that I think you should be okay.
> > > >
> > > > s. isaac dealey   954.927.5117
> > > >
> > > > new epoch : isn't it time for a change?
> > > >
> > > > add features without fixtures with
> > > > the onTap open source framework
> > > > http://www.sys-con.com/story/?storyid=44477&DE=1
> > > > http://www.sys-con.com/story/?storyid=45569&DE=1
> > > > http://www.fusiontap.com
> > > >
> > > >
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
Sorry Adam, I didnt see your post.. I may go that route but
considering it's given me pains for the past 3 hours :) I think I'm
gonna do something else for a few minutes and calm myself down..

On Fri, 27 Aug 2004 12:42:45 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> FINALLY!
> 
> I went with 2 arrays, 2 queries to populate the damn arrays using SQL
> to check to see if c_activityid was 2 or 4.
> It works..
> 
> 
> 
> 
> On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > that works.. I also had to add  and [x] within the loop.
> > the problem I'm running into now is that it's leaving the spaces empty
> >
> >for(i=0;i
> > if (taskArray[i][2] == actid)
> >   document.forms['laforma'].c_taskid.options[i] = new
> > Option(taskArray[i][0], taskArray[i][1]);
> >}
> >
> > it's going through the entire array (10 items) and putting something in there..
> > which means if I pass 4..
> > the select box has 7 empty spaces and then
> > CBT
> > Classroom Training
> > Conference Call
> >
> > I added a rmvNulls function I wrote quick..
> > function rmvNulls(sel) {
> >for (i=0;i
> >//alert(sel.options[i].value.length)
> >    if (sel.options[i].value.length == 0)
> >sel.options[i] = null;
> >}
> > }
> >
> > this removes some of them but then gives me a JS error..
> > says something about options.value is null or not an object?
> >
> > any ideas on how to not add all the extra empty choices
> >
> >
> >
> >
> > On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > > > hey Issac..
> > > > yeah I started using your code to generate the JS Array..
> > > > var taskArray = new Array();
> > > > 
> > > > 
> > > >  to="#alltasks.recordcount#">
> > > >  taskArray[#x-1#] = new Array(
> > > >'#jsstringformat(alltasks.task)#',
> > > >'#jsstringformat(alltasks.c_taskid)#',
> > > >'#jsstringformat(alltasks.c_activityid)#');
> > > > 
> > > > 
> > >
> > > > but when implementing it..
> > > > for(i=0;i
> > > >   for(j=0;j<2;j++) {
> > > >  if (taskArray[i][2] == actid)
> > > >   document.forms['laforma'].c_taskid.options[i] = new
> > > > Option(taskArray[i][j], taskArray[i][j+1]);
> > > >   }
> > > > }
> > >
> > > > which to me seems like it should work..
> > > > But it isnt
> > >
> > >
> > > See my last reply for the code-bit -- your j loop is an extra -- once
> > > you remove that I think you should be okay.
> > >
> > > s. isaac dealey   954.927.5117
> > >
> > > new epoch : isn't it time for a change?
> > >
> > > add features without fixtures with
> > > the onTap open source framework
> > > http://www.sys-con.com/story/?storyid=44477&DE=1
> > > http://www.sys-con.com/story/?storyid=45569&DE=1
> > > http://www.fusiontap.com
> > >
> > >
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
FINALLY!

I went with 2 arrays, 2 queries to populate the damn arrays using SQL
to check to see if c_activityid was 2 or 4.
It works..


On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> that works.. I also had to add  and [x] within the loop.
> the problem I'm running into now is that it's leaving the spaces empty
> 
>for(i=0;i
> if (taskArray[i][2] == actid)
>   document.forms['laforma'].c_taskid.options[i] = new
> Option(taskArray[i][0], taskArray[i][1]);
>}
> 
> it's going through the entire array (10 items) and putting something in there..
> which means if I pass 4..
> the select box has 7 empty spaces and then
> CBT
> Classroom Training
> Conference Call
> 
> I added a rmvNulls function I wrote quick..
> function rmvNulls(sel) {
>for (i=0;i
>//alert(sel.options[i].value.length)
>    if (sel.options[i].value.length == 0)
>sel.options[i] = null;
>}
> }
> 
> this removes some of them but then gives me a JS error..
> says something about options.value is null or not an object?
> 
> any ideas on how to not add all the extra empty choices
> 
> 
> 
> 
> On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > > hey Issac..
> > > yeah I started using your code to generate the JS Array..
> > > var taskArray = new Array();
> > > 
> > > 
> > >  to="#alltasks.recordcount#">
> > >  taskArray[#x-1#] = new Array(
> > >'#jsstringformat(alltasks.task)#',
> > >'#jsstringformat(alltasks.c_taskid)#',
> > >'#jsstringformat(alltasks.c_activityid)#');
> > > 
> > > 
> >
> > > but when implementing it..
> > > for(i=0;i
> > >   for(j=0;j<2;j++) {
> > >  if (taskArray[i][2] == actid)
> > >   document.forms['laforma'].c_taskid.options[i] = new
> > > Option(taskArray[i][j], taskArray[i][j+1]);
> > >   }
> > > }
> >
> > > which to me seems like it should work..
> > > But it isnt
> >
> >
> > See my last reply for the code-bit -- your j loop is an extra -- once
> > you remove that I think you should be okay.
> >
> > s. isaac dealey   954.927.5117
> >
> > new epoch : isn't it time for a change?
> >
> > add features without fixtures with
> > the onTap open source framework
> > http://www.sys-con.com/story/?storyid=44477&DE=1
> > http://www.sys-con.com/story/?storyid=45569&DE=1
> > http://www.fusiontap.com
> >
> >
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Adam Haskell
you will want to use a vairavle for matches like z

so z=0

loop
  if match {
    option[z].value;
    z=z+1;
}

Code:
document.forms['laforma'].c_taskid.options.length = 0;
y = taskArray.length;
z=0;
for (x=0; x
boom put itin the sub select
 if(taskArray[i][2] == actid){
   document.forms['laforma'].c_taskid.options[z] = new Option(taskArray[x][0]);
   document.forms['laforma'].c_taskid.options[z].value =  taskArray[x][1]
   z=z+1;
   }
}

Adam  H 

On Fri, 27 Aug 2004 12:13:24 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> that works.. I also had to add  and [x] within the loop.
> the problem I'm running into now is that it's leaving the spaces empty
> 
>for(i=0;i
> if (taskArray[i][2] == actid)
>   document.forms['laforma'].c_taskid.options[i] = new
> Option(taskArray[i][0], taskArray[i][1]);
>}
> 
> it's going through the entire array (10 items) and putting something in there..
> which means if I pass 4..
> the select box has 7 empty spaces and then
> CBT
> Classroom Training
> Conference Call
> 
> I added a rmvNulls function I wrote quick..
> function rmvNulls(sel) {
>for (i=0;i
>//alert(sel.options[i].value.length)
>    if (sel.options[i].value.length == 0)
>sel.options[i] = null;
>}
> }
> 
> this removes some of them but then gives me a JS error..
> says something about options.value is null or not an object?
> 
> any ideas on how to not add all the extra empty choices
> 
> 
> On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > > hey Issac..
> > > yeah I started using your code to generate the JS Array..
> > > var taskArray = new Array();
> > > 
> > > 
> > >  to="#alltasks.recordcount#">
> > >  taskArray[#x-1#] = new Array(
> > >'#jsstringformat(alltasks.task)#',
> > >'#jsstringformat(alltasks.c_taskid)#',
> > >'#jsstringformat(alltasks.c_activityid)#');
> > > 
> > > 
> >
> > > but when implementing it..
> > > for(i=0;i
> > >   for(j=0;j<2;j++) {
> > >  if (taskArray[i][2] == actid)
> > >   document.forms['laforma'].c_taskid.options[i] = new
> > > Option(taskArray[i][j], taskArray[i][j+1]);
> > >   }
> > > }
> >
> > > which to me seems like it should work..
> > > But it isnt
> >
> >
> > See my last reply for the code-bit -- your j loop is an extra -- once
> > you remove that I think you should be okay.
> >
> > s. isaac dealey   954.927.5117
> >
> > new epoch : isn't it time for a change?
> >
> > add features without fixtures with
> > the onTap open source framework
> > http://www.sys-con.com/story/?storyid=44477&DE=1
> > http://www.sys-con.com/story/?storyid=45569&DE=1
> > http://www.fusiontap.com
> >
> >
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
that works.. I also had to add  and [x] within the loop.
the problem I'm running into now is that it's leaving the spaces empty

	for(i=0;i
	 if (taskArray[i][2] == actid)
	   document.forms['laforma'].c_taskid.options[i] = new
Option(taskArray[i][0], taskArray[i][1]);
	}

it's going through the entire array (10 items) and putting something in there..
which means if I pass 4..
the select box has 7 empty spaces and then
CBT
Classroom Training
Conference Call

I added a rmvNulls function I wrote quick..
function rmvNulls(sel) {
	for (i=0;i
	//alert(sel.options[i].value.length)
		if (sel.options[i].value.length == 0)
			sel.options[i] = null;
	}
}

this removes some of them but then gives me a JS error..
says something about options.value is null or not an object?

any ideas on how to not add all the extra empty choices


On Fri, 27 Aug 2004 12:25:38 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > hey Issac..
> > yeah I started using your code to generate the JS Array..
> > var taskArray = new Array();
> > 
> > 
> >  to="#alltasks.recordcount#">
> >  taskArray[#x-1#] = new Array(
> >'#jsstringformat(alltasks.task)#',
> >'#jsstringformat(alltasks.c_taskid)#',
> >'#jsstringformat(alltasks.c_activityid)#');
> > 
> > 
> 
> > but when implementing it..
> > for(i=0;i
> >   for(j=0;j<2;j++) {
> >  if (taskArray[i][2] == actid)
> >   document.forms['laforma'].c_taskid.options[i] = new
> > Option(taskArray[i][j], taskArray[i][j+1]);
> >   }
> > }
> 
> > which to me seems like it should work..
> > But it isnt
> 
> 
> See my last reply for the code-bit -- your j loop is an extra -- once
> you remove that I think you should be okay.
> 
> s. isaac dealey   954.927.5117
> 
> new epoch : isn't it time for a change?
> 
> add features without fixtures with
> the onTap open source framework
> http://www.sys-con.com/story/?storyid=44477&DE=1
> http://www.sys-con.com/story/?storyid=45569&DE=1
> http://www.fusiontap.com
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread S . Isaac Dealey
> hey Issac..
> yeah I started using your code to generate the JS Array..
> var taskArray = new Array();
> 
> 
>  to="#alltasks.recordcount#">
>  taskArray[#x-1#] = new Array(
>'#jsstringformat(alltasks.task)#',
>'#jsstringformat(alltasks.c_taskid)#',
>'#jsstringformat(alltasks.c_activityid)#');
> 
> 

> but when implementing it..
> for(i=0;i
>   for(j=0;j<2;j++) {
>  if (taskArray[i][2] == actid)
>   document.forms['laforma'].c_taskid.options[i] = new
> Option(taskArray[i][j], taskArray[i][j+1]);
>   }
> }

> which to me seems like it should work..
> But it isnt

See my last reply for the code-bit -- your j loop is an extra -- once
you remove that I think you should be okay.

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread S . Isaac Dealey
You have an unnecessary extra loop... (the j loop)

for(i=0;i
  if (taskArray[i][2] == actid)
    document.write('option=' + taskArray[i][0] +
    'value=' + taskArray[i][1] + '');
}

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
hey Issac..
yeah I started using your code to generate the JS Array..
var taskArray = new Array();


 to="#alltasks.recordcount#">
 taskArray[#x-1#] = new Array(
   '#jsstringformat(alltasks.task)#',
   '#jsstringformat(alltasks.c_taskid)#',
   '#jsstringformat(alltasks.c_activityid)#');



but when implementing it..
for(i=0;i
  for(j=0;j<2;j++) {
 if (taskArray[i][2] == actid)
  document.forms['laforma'].c_taskid.options[i] = new
Option(taskArray[i][j], taskArray[i][j+1]);
  }
}

which to me seems like it should work..
But it isnt



On Fri, 27 Aug 2004 11:14:33 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> I'm still screwing around with this...
> I have the array created but getting some funky output..
> 
> for(i=0;i
>    for(j=0;j<2;j++) {
>   if (taskArray[i][2] == actid)
>document.write('option=' + taskArray[i][j] + 'value=' +
> taskArray[i][j+1] + '');
>    }
> }
> 
> gives...
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> option=Analysis
> value=3
> option=3
> value=2
> 
> far from what I want..
> which would be
> option=Analysis
> value=3
> option=Design
> value=4
> option=Development
> value=5
> option=Evaluation
> value=7
> option=Follow-Up
> value=8
> option=Implementation
> value=6
> option=SomeNewTask
> value=21
> 
> and that way I could use that data to populate my select box..
> Thanks
> 
> 
> 
> 
> On Fri, 27 Aug 2004 10:25:01 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> > The array isnt really the problem, the problem is taking the array and
> > populating the select statements.
> > some puesdocode
> >
> > var taskArray = new Array(10,3);
> > taskArray["Analysis",3,2];
> > taskArray["CBT",10,4];
> > taskArray["Classroom Training",9,4];
> > taskArray["Conference Call",11,4];
> > taskArray["Design",4,2];
> > taskArray["Development",5,2];
> > taskArray["Evaluation",7,2];
> > taskArray["Follow-Up",8,2];
> > taskArray["Implementation",6,2];
> > taskArray["SomeNewTask",21,2];
> >
> > for i = 0 to taskArray.arrayLength
> >  for j = 0 to taskArray.arrayDimension
> > if taskArray.[i,3] = 2
> > //document.forms['laforma'].c_taskid.options[i] = new
> > Option(taskArray[i,j], taskArray[i,j+1]);
> >
> > ??
> > I have the array populated but it's taking that array and sending a
> > value to a function to populate a select box that I'm having problems
> > with.
> >
> > If I pass 2 then the selectbox should be created with..
> > Analysis,3
> > Design,4
> > Development,5
> > Evaluation,7
> > Follow-Up,8
> > Implementation,6
> > SomeNewTask,21
> >
> > or 4
> > CBT,10
> > Classroom Training,9
> > Conference Call,11
> >
> > the first variable (the string) is the Option, the number is the value.
> >
> >
> >
> >
> > On Thu, 26 Aug 2004 23:42:19 -0400, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> > > beautiful use of JSStringFormat() Isaac!  You know I fought with errant '
> > > and " in my JS for like a year and a half before discovering this function.
> > > Now, doesn't the below creae an array of 3d arrays?  A true 3D array is nto
> > > available like CF, IIRC.  Anyhoo, I've used the below approach also
> > >
> > > var sys = new Array;
> > >  
> > >   sys['#JSStringFormat(rates.billsystem)#'] = new Array;
> > >   
> > >
> > > sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> > > ] = new Array
> > >    
> > >
> > > sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> > > ]['#JSStringFormat(rates.descr)#'] = '#JSStringFormat(rates.url)#';
> > >    
> > >   
> > >  
> > >
> > > Doug
> > >
> > > -Original Message-
> > > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 26, 2004 4:05 PM
> > > To: CF-Talk
> > > Subject: Re: CF and JS question
> > >
> > > _javascript_ arrays are declared a bit differently than CF arrays.
> > >
> > > try this:
> > >
> > > var taskArray = new Array();
> > > 
> > >  to="#alltasks.recordcount#">
> > >  taskArray[#x-1#] = new Array(
> > > '#jsstringformat(alltasks.task)#',
> > > '#jsstringformat(alltasks.c_taskid)#',
> > > '#jsstringformat(alltasks.c_activityid)#');
> > > 
> > >
> > > s. isaac dealey   954.927.5117
> > >
> > > new epoch : isn't it time for a change?
> > >
> > > add features without fixtures with
> > > the onTap open source framework
> > > http://www.sys-con.com/story/?storyid=44477&DE=1
> > > http://www.sys-con.com/story/?storyid=45569&DE=1
> > > http://www.fusiontap.com
> > >  _
> > >
> > >
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
I'm still screwing around with this...
I have the array created but getting some funky output..

for(i=0;i
    for(j=0;j<2;j++) {
   if (taskArray[i][2] == actid)
document.write('option=' + taskArray[i][j] + 'value=' +
taskArray[i][j+1] + '');
    }
}

gives...
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2
option=Analysis
value=3
option=3
value=2

far from what I want..
which would be 
option=Analysis
value=3
option=Design
value=4
option=Development
value=5
option=Evaluation
value=7
option=Follow-Up
value=8
option=Implementation
value=6
option=SomeNewTask
value=21

and that way I could use that data to populate my select box..
Thanks



On Fri, 27 Aug 2004 10:25:01 -0500, Greg Morphis <[EMAIL PROTECTED]> wrote:
> The array isnt really the problem, the problem is taking the array and
> populating the select statements.
> some puesdocode
> 
> var taskArray = new Array(10,3);
> taskArray["Analysis",3,2];
> taskArray["CBT",10,4];
> taskArray["Classroom Training",9,4];
> taskArray["Conference Call",11,4];
> taskArray["Design",4,2];
> taskArray["Development",5,2];
> taskArray["Evaluation",7,2];
> taskArray["Follow-Up",8,2];
> taskArray["Implementation",6,2];
> taskArray["SomeNewTask",21,2];
> 
> for i = 0 to taskArray.arrayLength
>  for j = 0 to taskArray.arrayDimension
> if taskArray.[i,3] = 2
> //document.forms['laforma'].c_taskid.options[i] = new
> Option(taskArray[i,j], taskArray[i,j+1]);
> 
> ??
> I have the array populated but it's taking that array and sending a
> value to a function to populate a select box that I'm having problems
> with.
> 
> If I pass 2 then the selectbox should be created with..
> Analysis,3
> Design,4
> Development,5
> Evaluation,7
> Follow-Up,8
> Implementation,6
> SomeNewTask,21
> 
> or 4
> CBT,10
> Classroom Training,9
> Conference Call,11
> 
> the first variable (the string) is the Option, the number is the value.
> 
> 
> 
> 
> On Thu, 26 Aug 2004 23:42:19 -0400, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> > beautiful use of JSStringFormat() Isaac!  You know I fought with errant '
> > and " in my JS for like a year and a half before discovering this function.
> > Now, doesn't the below creae an array of 3d arrays?  A true 3D array is nto
> > available like CF, IIRC.  Anyhoo, I've used the below approach also
> >
> > var sys = new Array;
> >  
> >   sys['#JSStringFormat(rates.billsystem)#'] = new Array;
> >   
> >
> > sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> > ] = new Array
> >    
> >
> > sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> > ]['#JSStringFormat(rates.descr)#'] = '#JSStringFormat(rates.url)#';
> >    
> >   
> >  
> >
> > Doug
> >
> > -Original Message-
> > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 26, 2004 4:05 PM
> > To: CF-Talk
> > Subject: Re: CF and JS question
> >
> > _javascript_ arrays are declared a bit differently than CF arrays.
> >
> > try this:
> >
> > var taskArray = new Array();
> > 
> >  to="#alltasks.recordcount#">
> >  taskArray[#x-1#] = new Array(
> > '#jsstringformat(alltasks.task)#',
> > '#jsstringformat(alltasks.c_taskid)#',
> > '#jsstringformat(alltasks.c_activityid)#');
> > 
> >
> > s. isaac dealey   954.927.5117
> >
> > new epoch : isn't it time for a change?
> >
> > add features without fixtures with
> > the onTap open source framework
> > http://www.sys-con.com/story/?storyid=44477&DE=1
> > http://www.sys-con.com/story/?storyid=45569&DE=1
> > http://www.fusiontap.com
> >  _
> >
> >
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread S . Isaac Dealey
> The array isnt really the problem, the problem is taking
> the array and
> populating the select statements.
> some puesdocode

> for i = 0 to taskArray.arrayLength
>   for j = 0 to taskArray.arrayDimension
>  if taskArray.[i,3] = 2

I ... don't think this syntax is correct...
I would expect to see taskArray[i][3]

> //document.forms['laforma'].c_taskid.options[i] = new
> Option(taskArray[i,j], taskArray[i,j+1]);

Again, new Option(taskArray[i][j], taskArray[i][j+1]);

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-27 Thread Greg Morphis
The array isnt really the problem, the problem is taking the array and
populating the select statements.
some puesdocode

var taskArray = new Array(10,3);
taskArray["Analysis",3,2];
taskArray["CBT",10,4];
taskArray["Classroom Training",9,4];
taskArray["Conference Call",11,4];
taskArray["Design",4,2];
taskArray["Development",5,2];
taskArray["Evaluation",7,2];
taskArray["Follow-Up",8,2];
taskArray["Implementation",6,2];
taskArray["SomeNewTask",21,2];

for i = 0 to taskArray.arrayLength
  for j = 0 to taskArray.arrayDimension
 if taskArray.[i,3] = 2
//document.forms['laforma'].c_taskid.options[i] = new
Option(taskArray[i,j], taskArray[i,j+1]);

??
I have the array populated but it's taking that array and sending a
value to a function to populate a select box that I'm having problems
with.

If I pass 2 then the selectbox should be created with..
Analysis,3
Design,4
Development,5
Evaluation,7
Follow-Up,8
Implementation,6
SomeNewTask,21

or 4
CBT,10
Classroom Training,9
Conference Call,11

the first variable (the string) is the Option, the number is the value.

On Thu, 26 Aug 2004 23:42:19 -0400, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> beautiful use of JSStringFormat() Isaac!  You know I fought with errant '
> and " in my JS for like a year and a half before discovering this function.
> Now, doesn't the below creae an array of 3d arrays?  A true 3D array is nto
> available like CF, IIRC.  Anyhoo, I've used the below approach also
> 
> var sys = new Array;
>  
>   sys['#JSStringFormat(rates.billsystem)#'] = new Array;
>   
> 
> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> ] = new Array
>    
> 
> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
> ]['#JSStringFormat(rates.descr)#'] = '#JSStringFormat(rates.url)#';
>    
>   
>  
> 
> Doug
> 
> -Original Message-
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 26, 2004 4:05 PM
> To: CF-Talk
> Subject: Re: CF and JS question
> 
> _javascript_ arrays are declared a bit differently than CF arrays.
> 
> try this:
> 
> var taskArray = new Array();
> 
>  to="#alltasks.recordcount#">
>  taskArray[#x-1#] = new Array(
> '#jsstringformat(alltasks.task)#',
> '#jsstringformat(alltasks.c_taskid)#',
> '#jsstringformat(alltasks.c_activityid)#');
> 
> 
> s. isaac dealey   954.927.5117
> 
> new epoch : isn't it time for a change?
> 
> add features without fixtures with
> the onTap open source framework
> http://www.sys-con.com/story/?storyid=44477&DE=1
> http://www.sys-con.com/story/?storyid=45569&DE=1
> http://www.fusiontap.com 
>  _
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: CF and JS question

2004-08-26 Thread Douglas Knudsen
beautiful use of JSStringFormat() Isaac!  You know I fought with errant '
and " in my JS for like a year and a half before discovering this function.
Now, doesn't the below creae an array of 3d arrays?  A true 3D array is nto
available like CF, IIRC.  Anyhoo, I've used the below approach also 

 
var sys = new Array;
  
   sys['#JSStringFormat(rates.billsystem)#'] = new Array;
   

 
sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
] = new Array 
    

 
sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat(rates.rateplan)#'
]['#JSStringFormat(rates.descr)#'] = '#JSStringFormat(rates.url)#';
    
   
  

 
Doug

-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 26, 2004 4:05 PM
To: CF-Talk
Subject: Re: CF and JS question

_javascript_ arrays are declared a bit differently than CF arrays.

try this:

var taskArray = new Array();

  to="#alltasks.recordcount#">
  taskArray[#x-1#] = new Array(
'#jsstringformat(alltasks.task)#',
'#jsstringformat(alltasks.c_taskid)#',
'#jsstringformat(alltasks.c_activityid)#');


s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: CF and JS question

2004-08-26 Thread S . Isaac Dealey
_javascript_ arrays are declared a bit differently than CF arrays.

try this:

var taskArray = new Array();

  to="#alltasks.recordcount#">
  taskArray[#x-1#] = new Array(
	'#jsstringformat(alltasks.task)#',
	'#jsstringformat(alltasks.c_taskid)#',
	'#jsstringformat(alltasks.c_activityid)#');


s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




CF and JS question

2004-08-26 Thread Greg Morphis
I'm trying to populate a JS two dimensional array using CF..
this is that I have so far
var taskArray = new Array(#alltasks.recordcount#,3);

taskArray["#alltasks.task#",#alltasks.c_taskid#,#alltasks.c_activityid#];


I look at the source and it seems to be doing what I want..

var taskArray = new Array(10,3);
taskArray["Analysis",3,2];
taskArray["CBT",10,4];
taskArray["Classroom Training",9,4];
taskArray["Conference Call",11,4];
taskArray["Design",4,2];
taskArray["Development",5,2];
taskArray["Evaluation",7,2];
taskArray["Follow-Up",8,2];
taskArray["Implementation",6,2];
taskArray["SomeNewTask",21,2];

I have a select box that returns 2 or 4
I need this to populate a select box with the Array's 1 element as the
Option, and the 2nd as the value only if the 2 matches the third or if
4 does..
IE
the user selects the option that returns 2
the select box should populate with 
Analysis,3
Design,4
Development,5
Evaluation,7
Follow-Up,8
Implementation,6
SomeNewTask,21

or 4
CBT,10
Classroom Training,9
Conference Call,11

I can hard code it but I cant do it dynamically..
	//document.forms['laforma'].c_taskid.options[1] = new Option('Analysis', '3');
	//document.forms['laforma'].c_taskid.options[2] = new Option('Design', '4');
	//document.forms['laforma'].c_taskid.options[3] = new
Option('Development', '5');
	//document.forms['laforma'].c_taskid.options[4] = new
Option('Implementation', '6');
	//document.forms['laforma'].c_taskid.options[5] = new
Option('Evaluation', '7');
	//document.forms['laforma'].c_taskid.options[6] = new Option('Follow-Up', '8');

can you guys assist me with populating the select box with that generated array?

Thanks!
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: JS Question

2004-06-10 Thread Pascal Peters
Just for info: I ran the code you gave in the orriginal post before
sending my previous response and just added the  and
"function". It never gave me an error. It just didn't collapse a table
once it was opened.

Pascal 

> -Original Message-
> From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] 
> Sent: donderdag 10 juni 2004 0:02
> To: CF-Talk
> Subject: RE: JS Question
> 
> You are missing "function" at the beginning of your function 
> declaration.
> 
>  
> No, I just included the necessary code to give you an idea of 
> what I was doing... or trying to do rather.
>  
> I got it now thought... eval() was needed.
>  
> Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Michael T. Tangorre
You are missing "function" at the beginning of your function
declaration.

No, I just included the necessary code to give you an idea of what I was
doing... or trying to do rather.

 
I got it now thought... eval() was needed.

 
Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: JS Question

2004-06-09 Thread sudhakar ramaswamy
Your code modified a little.
Works on IE 6.0.


 
 
  Company #x# 
 

  trimmed off .. #x#   

 



//initialize to some unused value
var currentElement = '0';


function toggleDrillDown(x){

//return if clicking the same element
if(x == currentElement){
return
}
//if different element and current element !=0 hide current element
else if (currentElement != '0'){
document.getElementById(currentElement).style.display = 'none';   
}

//set the currentElem to this
currentElement = x;

//now unhide the new element.
    document.getElementById(x).style.display = 'block';
}  

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

RE: JS Question

2004-06-09 Thread Pascal Peters
You are missing "function" at the beginning of your function
declaration.

Also, I suppose you want to hide the related table if you click a second
time. What you have there will show the table, but never hide it.

function toggleDrillDown(x){
  if(document.getElementById(x).style.display == 'block'){
    document.getElementById(x).style.display = 'none';  
  }
  else{
    document.getElementById(x).style.display = 'block';
  }
}

> -Original Message-
> From: Tangorre, Michael [mailto:[EMAIL PROTECTED] 
> Sent: woensdag 9 juni 2004 17:46
> To: CF-Talk
> Subject: SOT: JS Question
> 
> I have a CFLOOP that outputs 10 tables. Think of the 10 
> tables as pairs of 5.
>  
> T1 / T2
> T3 / T4
> T5 / T6
> T7 / T8
> T9 / T10
>  
> There is a link in each top table (T1,T3,T5,T7,T9) that when 
> clicked on should display the table below it (T2,T4,T6,T8,T10 
> respectively.)
>  
> The HTML for the link is as follows:
>  
> 
>  
>  
>   
> return false;">Company #x#  
>  
>   trimmed off 
>  
>  
> 
>  
> The JS is as follows:
>  
> toggleDrillDown(x){
>  if(document.getElementById(x).style.display == 'block'){
> document.getElementById(x).style.display = 'inline';  }  else{
> document.getElementById(x).style.display = 'block';  } }
> 
> The error says "Object Expected" but when I try and pass in
> document.getElementById("tbl#x#") that does not work either.
>  
> Any ideas? Thanks!
>  
> Mike
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Tangorre, Michael
> > toggleDrillDown(x){
> You're passing in a string when you call the function, 
> instead of the object itself.

I'm with ya Dave.. However, when I pass in the object I get another error
saying ';' expected (even though all the ; are there

Passing in the object
toggleDrillDown(document.getElementById('tbl#x#'));

Perhaps my syntax for passing objects is off. Am I forgetting something?

Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Dave Watts
>   
> return false;">Company #x#  
> 
> ...
> 
> The JS is as follows:
>  
> toggleDrillDown(x){

You're passing in a string when you call the function, instead of the object
itself.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: SOT: JS Question

2004-06-09 Thread Tangorre, Michael
> 
> Are you sure this code is inside a 
> 

Positive... It's a JS thing for sure. All the #x# and other variables output
correctly when viewing the source.

Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Tangorre, Michael
> This might be way too obvious to be your problem, but I don't 
> see any CFOUTPUT in that HTML.

I only included the important code... Left the "gimmes" off :-)

Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: SOT: JS Question

2004-06-09 Thread Claude Schneegans
Are you sure this code is inside a 


--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Dave Watts
> There is a link in each top table (T1,T3,T5,T7,T9) that when 
> clicked on should display the table below it (T2,T4,T6,T8,T10 
> respectively.)
>  
> The HTML for the link is as follows:
>  
> 
>  
>  
>   
> return false;">Company #x#  
>  
>   trimmed off 
>  
>  
> 

This might be way too obvious to be your problem, but I don't see any
CFOUTPUT in that HTML.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Tangorre, Michael
> This looks like a case of mixing server side and client side 
> logic.  Try dumping the values of the variables via a JS 
> alert() just before calling the getElementById.  See if it's 
> what you are expecting.

Just a bad variable naming choice Not mixing it up. :-)
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: JS Question

2004-06-09 Thread Shawn Grover
This looks like a case of mixing server side and client side logic.  Try dumping the values of the variables via a JS alert() just before calling the getElementById.  See if it's what you are expecting.

 
Shawn

-Original Message-
From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 9:46 AM
To: CF-Talk
Subject: SOT: JS Question

I have a CFLOOP that outputs 10 tables. Think of the 10 tables as pairs of
5.

T1 / T2
T3 / T4
T5 / T6
T7 / T8
T9 / T10

There is a link in each top table (T1,T3,T5,T7,T9) that when clicked on
should display the table below it (T2,T4,T6,T8,T10 respectively.)

The HTML for the link is as follows:




  
false;">Company #x#


  trimmed off  



The JS is as follows:

toggleDrillDown(x){
if(document.getElementById(x).style.display == 'block'){
    document.getElementById(x).style.display = 'inline';  
}
else{
    document.getElementById(x).style.display = 'block';  
}
}

The error says "Object Expected" but when I try and pass in
document.getElementById("tbl#x#") that does not work either.

Any ideas? Thanks!

Mike 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




SOT: JS Question

2004-06-09 Thread Tangorre, Michael
I have a CFLOOP that outputs 10 tables. Think of the 10 tables as pairs of
5.

 
T1 / T2
T3 / T4
T5 / T6
T7 / T8
T9 / T10

 
There is a link in each top table (T1,T3,T5,T7,T9) that when clicked on
should display the table below it (T2,T4,T6,T8,T10 respectively.)

 
The HTML for the link is as follows:

 


 
  
false;">Company #x#
 

 
  trimmed off  

 


 
The JS is as follows:

 
toggleDrillDown(x){
 if(document.getElementById(x).style.display == 'block'){
    document.getElementById(x).style.display = 'inline';  
 }
 else{
    document.getElementById(x).style.display = 'block';  
 }
}

The error says "Object Expected" but when I try and pass in
document.getElementById("tbl#x#") that does not work either.

 
Any ideas? Thanks!

 
Mike
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: OT: HTML Form Desgin w/JS Question

2004-02-26 Thread Jim McAtee
That's exactly what I'm looking for.  Thanks, Steve.  (and Dan)

- Original Message - 
From: "Steve Nelson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 11:01 PM
Subject: Re: OT: HTML Form Desgin w/JS Question

> Oh. Now I see why you were thinking about hidden frames.
> 
> I think what you might want to try is Dan Switzer's "Client/Server
> Gateway". It'll handle all of the hidden frame stuff for you. Look at
> the Zip Code Demo #2 and it'll be instantly clear what it's doing.
> 
> http://www.pengoworks.com/workshop/js/gateway/
> 
> Steve Nelson
> 
> Jim McAtee wrote:
> 
> > Thanks, I see now.  That might come in handy but it's not what I was
> > looking
> > for.  I'd like to copy data from a record still on the database
> > server.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: OT: HTML Form Desgin w/JS Question

2004-02-26 Thread Steve Nelson
Oh. Now I see why you were thinking about hidden frames.

I think what you might want to try is Dan Switzer's "Client/Server
Gateway". It'll handle all of the hidden frame stuff for you. Look at
the Zip Code Demo #2 and it'll be instantly clear what it's doing.

http://www.pengoworks.com/workshop/js/gateway/

Steve Nelson

Jim McAtee wrote:

> Thanks, I see now.  That might come in handy but it's not what I was
> looking
> for.  I'd like to copy data from a record still on the database
> server.
>
> - Original Message -
> From: "Steve Nelson" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, February 26, 2004 10:39 PM
> Subject: Re: OT: HTML Form Desgin w/JS Question
>
> > This is what I was thinking, run this code in your browser. Click on
> one
> > of the input boxes, then copy it to another one. I have only tried
> in
> > IE6.
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: OT: HTML Form Desgin w/JS Question

2004-02-26 Thread Jim McAtee
Thanks, I see now.  That might come in handy but it's not what I was looking
for.  I'd like to copy data from a record still on the database server.

- Original Message - 
From: "Steve Nelson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, February 26, 2004 10:39 PM
Subject: Re: OT: HTML Form Desgin w/JS Question

> This is what I was thinking, run this code in your browser. Click on one
> of the input boxes, then copy it to another one. I have only tried in
> IE6.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




  1   2   3   >