RE: (ot) JavaScript detecting foreign scripts

2015-04-01 Thread UXB Internet

  Please don't do it off-list, several of us could be interested.

In case anyone is interested, as Claude recommended, It was relatively easy
to check for the foreign script injection by myturfads.com.   There is a
test page with the code located at http://www.uxb.net/adtest/ that will look
to see if your client is seeing the Google ad being replaced by the
myturfads.com 

In case you are wondering what I am talking about.   Some ISP's are using a
proxy technology that in real time intercepts the Google Ad JavaScript code
and replaces it with their own advertising from a company (MyTurf -
www.myturfads.com) that specializes in injecting local advertising into
existing ad spaces for Local ISP's.They replace the google or double
click JS code with their own and can add/inject  pop-up and video ads into
sites that only use text or image advertising from Google. Very Annoying!

Based on the testing I have done with one of my more trafficked sites that
have ads on them (hce.halomaps.org) there are at least two ISP's that are
using the ad-replacement proxy technology in three different regions:
Brewster NY, Denver CO.  and  Boise ID.  NY and CO were Comcast and  ID was
CenturyLink.  I am seeing multiple IPS from each area, mostly in the same B
and C blocks.

The way the test page works is that after loading it looks for any script
called from myturfads.com on the page and then lists the scripts and warns
if one was found.  If one was found it performs an AJAX call and sends me an
email with the client IP. 

I have contacted and opened a case with Google about this and they were very
interested, but of course I only get to deal with the front line support
person so I have no idea what they intend.  I also contacted a copyright law
firm and they were interested but because it is Google's Code and not mine
that is being replaced an infringement case would be tough.  Not only that
but apparently there is no case law that says the ISP cannot replace or
inject scripts. To proceed further it would require I cover legal research
costs to see  if there was a case to be had.It gets all muddy,
especially now with the FCC's new Net Neutrality regulations still not fully
defined and already under legal attack.

I find this behavior on the part of the ISP's abhorrent and dangerous.
Right now they are replacing advertising and stealing revenue from the
advertiser and Web Publisher. But they could just as easily replace articles
or any real content on the fly as well.  And the worst of it is that there
is apparently no legal precedent to the contrary. 

Thanks for listening.


Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com



~|
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:360348
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: (ot) JavaScript detecting foreign scripts

2015-03-03 Thread UXB Internet

  Just throwing ideas out there. :)

All my pontificating aside for this particular purpose I am just trying to
detect if the string adx.myturfads.com exists anywhere on the DOM.  

For my sister, I've already stopped it from loading by editing the hosts
file on the PC to disallow that domain.  

Including the reasons you stated trying to stop it with a purely technical
solution is just an arms race. This requires legal action.  I am trying to
find a way to collect data to support that.

They may have stepped over a line here because they are not just adding but
removing and replacing content.



Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com



  


~|
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:360190
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: (ot) JavaScript detecting foreign scripts

2015-03-03 Thread Dave Watts

   Second, if you use TLS (SSL) exclusively, you should be able to prevent
  this.

 I tested for this and yes it does prevent it.  However that is not actually
 the point.  The point is much bigger than the pennies they sole from my
 websites ad revenue.  Maybe I am the only one but to me this practice,
 replacing the content of a webpage with their own content, is a heinous
 affront to the idea of an open Internet.

 Maybe I am going off the rails here but isn't this exactly what the Net
 Neutrality fight was all about? Not fast lanes and slow lanes but data
 integrity!

 Thanks for the pointer on the JS code I will look into it and take a step
 down off my soapbox.

I agree with you that Comcast should die in a fire, but it'll take a
while for the FCC to fix that problem I'm sure. In the meantime,
rent-seekers gonna rent-seek, I guess.

I like Jochem's solution, of which I was unaware, but still recommend
you use HTTPS.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business
(SDVOSB) on GSA Schedule, and provides the highest caliber vendor-
authorized instruction at our training centers, online, or onsite.

~|
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:360185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: (ot) JavaScript detecting foreign scripts

2015-03-03 Thread UXB Internet

  I agree with you that Comcast should die in a fire,

So I'm not crazy then.  I have to wonder some times.

  I like Jochem's solution, of which I was unaware, but still 
 recommend you use  HTTPS.

Actually I can also prevent it by switching to a different/newer ad type
with a different script but that wasn't the goal for this request.  The goal
was to collect data on where (the IP) the script was being injected.
Stopping it with a technical solution is an arms race.


Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com


  -Original Message-
  From: Dave Watts [mailto:dwa...@figleaf.com]
  Sent: Tuesday, March 3, 2015 8:08 AM
  To: cf-talk
  Subject: Re: (ot) JavaScript detecting foreign scripts
  
  
 Second, if you use TLS (SSL) exclusively, you should be able to
prevent this.
  
   I tested for this and yes it does prevent it.  However that is not
   actually the point.  The point is much bigger than the pennies they
   sole from my websites ad revenue.  Maybe I am the only one but to me
   this practice, replacing the content of a webpage with their own
   content, is a heinous affront to the idea of an open Internet.
  
   Maybe I am going off the rails here but isn't this exactly what the
   Net Neutrality fight was all about? Not fast lanes and slow lanes but
   data integrity!
  
   Thanks for the pointer on the JS code I will look into it and take a
   step down off my soapbox.
  
  I agree with you that Comcast should die in a fire, but it'll take a
while for the
  FCC to fix that problem I'm sure. In the meantime, rent-seekers gonna
rent-
  seek, I guess.
  
  I like Jochem's solution, of which I was unaware, but still recommend you
use
  HTTPS.
  
  Dave Watts, CTO, Fig Leaf Software
  1-202-527-9569
  http://www.figleaf.com/
  http://training.figleaf.com/
  
  Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business
  (SDVOSB) on GSA Schedule, and provides the highest caliber vendor-
  authorized instruction at our training centers, online, or onsite.
  
  
  ~|
  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:360185
  Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
  Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


~|
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:360187
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: (ot) JavaScript detecting foreign scripts

2015-03-03 Thread DURETTE, STEVEN J

Using HTTPS may not be able to solve the problem completely either.  A lot of 
companies, and now apparently ISPs, do a man in the middle certificate and have 
access to the whole encrypted stream.  Companies do it to ensure that their 
work product isn't being ex-filtrated, ISPs seem to do it for advertising.  
There are ways to verify your direct connection to a server, but it requires 
diligence on the part of the browser user.

I was thinking at first that you could generate a hash of the page being send 
and append it in http headers and then use javascript to hash the DOM and 
compare it, but I don't think that would work because of add-ins like LastPass 
that inject javascript that the user wants.

Just throwing ideas out there. :)


-Original Message-
From: UXB Internet [mailto:denn...@uxbinternet.com] 
Sent: Tuesday, March 03, 2015 9:23 AM
To: cf-talk
Subject: RE: (ot) JavaScript detecting foreign scripts


  I agree with you that Comcast should die in a fire,

So I'm not crazy then.  I have to wonder some times.

  I like Jochem's solution, of which I was unaware, but still 
 recommend you use  HTTPS.

Actually I can also prevent it by switching to a different/newer ad type
with a different script but that wasn't the goal for this request.  The goal
was to collect data on where (the IP) the script was being injected.
Stopping it with a technical solution is an arms race.


Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com


  -Original Message-
  From: Dave Watts [mailto:dwa...@figleaf.com]
  Sent: Tuesday, March 3, 2015 8:08 AM
  To: cf-talk
  Subject: Re: (ot) JavaScript detecting foreign scripts
  
  
 Second, if you use TLS (SSL) exclusively, you should be able to
prevent this.
  
   I tested for this and yes it does prevent it.  However that is not
   actually the point.  The point is much bigger than the pennies they
   sole from my websites ad revenue.  Maybe I am the only one but to me
   this practice, replacing the content of a webpage with their own
   content, is a heinous affront to the idea of an open Internet.
  
   Maybe I am going off the rails here but isn't this exactly what the
   Net Neutrality fight was all about? Not fast lanes and slow lanes but
   data integrity!
  
   Thanks for the pointer on the JS code I will look into it and take a
   step down off my soapbox.
  
  I agree with you that Comcast should die in a fire, but it'll take a
while for the
  FCC to fix that problem I'm sure. In the meantime, rent-seekers gonna
rent-
  seek, I guess.
  
  I like Jochem's solution, of which I was unaware, but still recommend you
use
  HTTPS.
  
  Dave Watts, CTO, Fig Leaf Software
  1-202-527-9569
  http://www.figleaf.com/
  http://training.figleaf.com/
  
  Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business
  (SDVOSB) on GSA Schedule, and provides the highest caliber vendor-
  authorized instruction at our training centers, online, or onsite.
  
  
  ~|
  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:360185
  Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
  Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm




~|
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:360188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: (ot) JavaScript detecting foreign scripts

2015-03-03 Thread Jochem van Dieten

On Mon, Mar 2, 2015 at 8:52 PM, UXB Internet denn...@uxbinternet.com
wrote:

 I apologize for this off topic post.  A while back someone posted a thread
 where they were working on a script that would enumerate the DOM and detect
 foreign JS scripts running or loaded.  I am looking to consult with that
 person off-list because I have a case where I need to do the same.


Nowadays most browsers support having a Content Security Policy which IMHO
offers a much better mechanism to do so in its reporting functionality:
http://www.w3.org/TR/CSP/

Jochem

-- 
Jochem van Dieten
http://jochem.vandieten.net/


~|
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:360184
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: (ot) JavaScript detecting foreign scripts

2015-03-02 Thread Claude Schnéegans

 I am looking to consult with that person off-list

Please don't do it off-list, several of us could be interrested.
I developped a client side javascript error trackink tool and it helped me a 
lot to debug my scripts, but I get many errors happening in foreign JS scripts.
I fixed my program to detect 5 or 6 of them and now the system is almost 
perfect.


~|
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:360179
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: (ot) JavaScript detecting foreign scripts

2015-03-02 Thread UXB Internet

  I developped a client side javascript error trackink tool and it helped
me a lot
  to debug my scripts, but I get many errors happening in foreign JS
scripts.
  I fixed my program to detect 5 or 6 of them and now the system is almost
  perfect.

Should have known it was you smile.  What is happening is that Comcast has
engaged the company MyTurfads.com that on the fly replaces Google and other
ads with their own.   They intercept the call to the script and return JS of
their own that inserts a script from their domain (adx.myturfads.com)  into
the DOM.  That script then calls others to handle the ads.

I have proven this using a test page http://www.uxb.net/adtest/ that only
has a single Google ad and no other scripts.  The content of the single
script on that page gets  replaced at my sisters in NY (Comcast)  but not in
CT (Comcast) .  

I want to find out how wide spread this is because 3 data points do not make
an argument. I only found out about it because my sister complained about
getting pop-up and self-running modal video ads on one of my websites and
that should not occur.

What I want to do is write a script that can detect if the domain
myturfads.com is located anywhere in the DOM.  I intend to place it on the
simple test page so that once detected I can initiate an Ajax call and
record the user IP on my server.   I can hack at JS code with enough
examples but sadly need a little help on this one.



Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com


 


~|
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:360181
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: (ot) JavaScript detecting foreign scripts

2015-03-02 Thread Dave Watts

 It appears as if in some locations Comcast's proxies are intercepting
 advertising scripts (google/doubleclick) and replacing them with their own
 JS that substitutes their own contracted ads.   I am looking for a way to
 detect this on a test page to determine how wide spread the practice is.

 I would be greatly appreciative if that person would contact me directly
 either by email or phone.

I'm not that person, but I have some suggestions.

First, my understanding is that this only happens for users of Comcast
public access hotspots, not for subscribed users:

http://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad-injections-threaten-security-net-neutrality/

Second, if you use TLS (SSL) exclusively, you should be able to
prevent this. Google/Doubleclick support this, and I really think it's
the way of the future. We recommend exclusive TLS use for all of our
customers. Not specifically just for this problem, but because it
limits exposure generally and because it may positively affect SEO in
the near future:

http://googlewebmastercentral.blogspot.com/2014/08/https-as-ranking-signal.html

Third, there's an IEEE paper that provides some sample code for
handling this problem. I haven't read it myself, and it's not a free
paper, but it may be worth the money to you:

http://ieeexplore.ieee.org/xpl/login.jsp?tp=arnumber=6032221url=http%3A%2F%2Fieeexplore.ieee.org%2Fxpls%2Fabs_all.jsp%3Farnumber%3D6032221

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business
(SDVOSB) on GSA Schedule, and provides the highest caliber vendor-
authorized instruction at our training centers, online, or onsite.

~|
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:360182
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: (ot) JavaScript detecting foreign scripts

2015-03-02 Thread UXB Internet

Thanks Dave I do appreciate the information.

  First, my understanding is that this only happens for users of Comcast
public
  access hotspots, not for subscribed users:
  
  http://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad-
  injections-threaten-security-net-neutrality/

In my research I did see that article but alas they are indeed rolling it
out to actual subscribers.

  Second, if you use TLS (SSL) exclusively, you should be able to prevent
this.

I tested for this and yes it does prevent it.  However that is not actually
the point.  The point is much bigger than the pennies they sole from my
websites ad revenue.  Maybe I am the only one but to me this practice,
replacing the content of a webpage with their own content, is a heinous
affront to the idea of an open Internet.

Maybe I am going off the rails here but isn't this exactly what the Net
Neutrality fight was all about? Not fast lanes and slow lanes but data
integrity!

Thanks for the pointer on the JS code I will look into it and take a step
down off my soapbox.


Dennis Powers
UXB Internet - A website Design and Hosting Company 
P.O. Box 6028, Wolcott, CT 06716 - T:203-879-2844
W: http://www.uxbinternet.com
W: http://www.ctbusinesslist.com



~|
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:360183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: OT javascript

2009-07-30 Thread JediHomer

You could set different IDs for them, then reference these...

Something like

select name=ID id=sel1
option value=Please Select/option
option value=11/option
/select

select name=ID id=sel2
option value=Please Select/option
option value=11/option
/select

document.getElementById(sel1).options
and
document.getElementById(sel2).options

2009/7/30 Chad Gray cg...@careyweb.com:

 Say I have two select inputs on one page and they are named the same.

 select name=ID
 option value=Please Select/option
 option value=11/option
 /select

 select name=ID
 option value=Please Select/option
 option value=11/option
 /select

 I want to write javascript to check that both of these are not left blank or 
 in their default stage of Please Select.

 Can I do this in javascript ID[0] to get the value of the first one?

 var 
 ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedIndex].value;
 var 
 ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIndex].value;


 

~|
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:325119
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT javascript

2009-07-30 Thread Cutter (ColdFusion)

Why would you have two selects with the same name? Radio Buttons? Sure. 
But not selects...

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 7/30/2009 10:19 AM, Chad Gray wrote:
 Say I have two select inputs on one page and they are named the same.

 select name=ID
 option value=Please Select/option
 option value=11/option
 /select

 select name=ID
 option value=Please Select/option
 option value=11/option
 /select

 I want to write javascript to check that both of these are not left blank or 
 in their default stage of Please Select.

 Can I do this in javascript ID[0] to get the value of the first one?

 var 
 ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedIndex].value;
 var 
 ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIndex].value;


 

~|
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:325120
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 javascript

2009-07-30 Thread Adrian Lynch

You can in FF3.

You have some typos that'll stop it working though.

A closing double quote for the name attribute in your selects.

You need a . in between the [0] options.

Have a look at using jQuery though. It'll make this code a lot smaller.

Adrian

 -Original Message-
 From: Chad Gray [mailto:cg...@careyweb.com]
 Sent: 30 July 2009 16:20
 To: cf-talk
 Subject: OT javascript
 
 
 Say I have two select inputs on one page and they are named the same.
 
 select name=ID
 option value=Please Select/option
 option value=11/option
 /select
 
 select name=ID
 option value=Please Select/option
 option value=11/option
 /select
 
 I want to write javascript to check that both of these are not left
 blank or in their default stage of Please Select.
 
 Can I do this in javascript ID[0] to get the value of the first one?
 
 var
 ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedInd
 ex].value;
 var
 ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIn
 dex].value;


~|
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:325121
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 javascript

2009-07-30 Thread Andy Matthews

Are you the originator of the code? I mean can you change the source code?
Because having two objects on the page with the same ID is bad mojo. I think
you're going to run into lots of problems, and inconsistencies in different
browsers if you keep them named the same.


andy 

-Original Message-
From: Chad Gray [mailto:cg...@careyweb.com] 
Sent: Thursday, July 30, 2009 10:20 AM
To: cf-talk
Subject: OT javascript


Say I have two select inputs on one page and they are named the same.

select name=ID
option value=Please Select/option
option value=11/option
/select

select name=ID
option value=Please Select/option
option value=11/option
/select

I want to write javascript to check that both of these are not left blank or
in their default stage of Please Select.

Can I do this in javascript ID[0] to get the value of the first one?

var
ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedIndex].v
alue;
var
ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIndex].
value;




~|
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:325122
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: OT javascript

2009-07-30 Thread Chad Gray

When you submit it makes a comma delimited list of ID's that we loop over and 
use.

Some pages have one select on them, some pages have 10 selects on them.  So 
rather than making them uniquely named and tracking how many of them we just 
loop over the comma delimited list.




 -Original Message-
 From: Cutter (ColdFusion) [mailto:cold.fus...@cutterscrossing.com]
 Sent: Thursday, July 30, 2009 11:38 AM
 To: cf-talk
 Subject: Re: OT javascript
 
 
 Why would you have two selects with the same name? Radio Buttons? Sure.
 But not selects...
 
 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 7/30/2009 10:19 AM, Chad Gray wrote:
  Say I have two select inputs on one page and they are named the same.
 
  select name=ID
  option value=Please Select/option
  option value=11/option
  /select
 
  select name=ID
  option value=Please Select/option
  option value=11/option
  /select
 
  I want to write javascript to check that both of these are not left
 blank or in their default stage of Please Select.
 
  Can I do this in javascript ID[0] to get the value of the first one?
 
  var
 ID=document.orderForm.ID[0]options[document.orderForm.ID[0].selectedIndex]
 .value;
  var
 ID2=document.orderForm.ID[1]options[document.orderForm.ID[1].selectedIndex
 ].value;
 
 
 
 
 

~|
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:325123
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 javascript

2009-07-30 Thread Andy Matthews

Chad...

Here's what I'd suggest...leave the name value as is, even though that's not 
the best idea. Add an ID attribute to each, with an increasing numeric value:

cb1, cb2, cb3, etc.

Give each combobox the same class, comboBox or something like that.

Then, you could try something like this:

var $boxes = $('.comboBox') // gives you as many comboboxes as exist on the 
page 
$boxes.each(function(){
$elem = $(this); // the current combo box
if ($elem.val() == '' || $elem.val() == 0) {
// do something here
}
});

 select name=ID
 option value=Please Select/option
 option value=11/option
 /select
 
 select name=ID
 option value=Please Select/option
 option value=11/option
 /select 

~|
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:325124
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 javascript

2009-07-30 Thread Adrian Lynch

That's ok. Having duplicate names is cool.

Adrian

 -Original Message-
 From: Chad Gray [mailto:cg...@careyweb.com]
 Sent: 30 July 2009 16:46
 To: cf-talk
 Subject: RE: OT javascript
 
 
 When you submit it makes a comma delimited list of ID's that we loop
 over and use.
 
 Some pages have one select on them, some pages have 10 selects on them.
 So rather than making them uniquely named and tracking how many of them
 we just loop over the comma delimited list.
 
 
 
 
  -Original Message-
  From: Cutter (ColdFusion) [mailto:cold.fus...@cutterscrossing.com]
  Sent: Thursday, July 30, 2009 11:38 AM
  To: cf-talk
  Subject: Re: OT javascript
 
 
  Why would you have two selects with the same name? Radio Buttons?
 Sure.
  But not selects...


~|
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:325125
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) Javascript Help

2009-07-09 Thread James Holmes

There's probably something in jquery that'll do it on one line of
cross browser code...

mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

2009/7/9 Michael Muller mich...@mullertech.com:

 Ok, I need some Javascript help.

 I just cannot get this script (residing in an iframe)...


 script
 parent.thisMovie('studio_loader_embed').reloadClipart();
 parent.thisMovie('studio_loader_embed').showTab(2);
 /script


 ...to go through this script...

 script
 function thisMovie(movieName) {
 if (navigator.appName.indexOf(Microsoft) != -1) {
 return HTMLCollection.namedItem(movieName)
 } else {
 return document[movieName]
 }
 }
 /script


 ...to function on this object...


 div style=margin:0px; padding:5px; width:670px; float:left;

 object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354
 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0;
 width=670 height=550

 param name=allowScriptAccess value=sameDomain /
 param name=allowFullScreen value=false /
 param name=movie value=/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0 /
 param name=quality value=high /
 param name=bgcolor value=white /

 embed src=/flash/studio_loader.swf?urlvars=1264,0,0,0,0,0
 quality=high bgcolor=white width=670 height=550
 id=studio_loader_embed
 align=middle allowScriptAccess=sameDomain
 allowFullScreen=false type=application/x-shockwave-flash
 pluginspage=http://www.macromedia.com/go/getflashplayer; /

 /object

 /div

 -

 For the thisMovie() function I have tried all these combinations for IE:

 HTMLCollection.namedItem(movieName)  // HTMLCollection is undefined
 namedItem(movieName)  // Object expected
 document.getElementById //  'parent.thisMovie(...)' is null or not an object



 You can see this functionality work in FF by going here...

 http://www.silverscreendesign.com/designlab.cfm?proid=1264

 ... and clicking on the Your Cart button in the right.  Clicking that 
 button should make the flash movie's tab go to Add Art

 It does not work in IE.

 Someone told me that IE cannot talk to an embed tag, only an object tag, but 
 I believe the ID vs NAME issue is tripping me up.

 I would be more than happy to send a PayPal payment for your time.

 Thanks,

 Mik



 
 Michael Muller
 office (413) 863-6455
 cell (413) 320-5336
 skype: michaelBmuller
 http://MontagueWebWorks.com

 Information is not knowledge
 Knowlege is not wisdom

 Eschew Obfuscation


 

~|
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:324386
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: (ot) Javascript Help

2009-07-09 Thread Dave Watts

 Someone told me that IE cannot talk to an embed tag, only an object tag, but 
 I believe
 the ID vs NAME issue is tripping me up.

I don't think IE uses the EMBED tag at all. Give your OBJECT an ID of
its own, and use that when you're in IE.

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:324387
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 JavaScript question.

2008-11-12 Thread Cutter (CFRelated)
var myObj = {
  variableA: 'some value',
  variableB: 12,
  variableC: function(){
   // a function
  }
};

I think, you'll want to test.

Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com

Ian Skinner wrote:
 Quick question that I just can not think of the right terms to find in 
 Google.
 
 There is a syntax short cut in JavaScript if you are assigning several 
 properties to the same object.  What is it?
 
 
 
 

~|
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:315159
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 JavaScript question.

2008-11-12 Thread Andy Matthews
You can do this:

Var something = somethingelse = onemorething = 0;

-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2008 1:34 PM
To: cf-talk
Subject: OT JavaScript question.

Quick question that I just can not think of the right terms to find in 
Google.

There is a syntax short cut in JavaScript if you are assigning several 
properties to the same object.  What is it?





~|
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:315160
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: OT JavaScript question.

2008-11-12 Thread Adrian Lynch
Or do you mean with?

with someObject {
var1 = not;
var2 = sure;
var3 = about;
var4 = this;
var5 = syntax;
var6 = or;
var7 = whether;
var8 = it's a JavaScript;
var9 = thing or not;
}

alert(someObject.var1);

Adrian
Building a database of ColdFusion errors at http://cferror.org/

-Original Message-
From: Ian Skinner
Sent: 12 November 2008 19:34
To: cf-talk
Subject: OT JavaScript question.


Quick question that I just can not think of the right terms to find in 
Google.

There is a syntax short cut in JavaScript if you are assigning several 
properties to the same object.  What is it?

~|
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:315161
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 JavaScript question.

2008-11-12 Thread Ian Skinner
Adrian Lynch wrote:
 Or do you mean with?

 with someObject {
   var1 = not;
   var2 = sure;
   var3 = about;
   var4 = this;
   var5 = syntax;
   var6 = or;
   var7 = whether;
   var8 = it's a JavaScript;
   var9 = thing or not;
 }

 alert(someObject.var1);

Yes that is the one I was looking for!.  I found 'with' to be a very 
poor search term on Google, or any search engine for that matter.


~|
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:315167
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT JavaScript question.

2008-11-12 Thread Charlie Griefer
On Wed, Nov 12, 2008 at 1:14 PM, Ian Skinner [EMAIL PROTECTED] wrote:


 Yes that is the one I was looking for!.  I found 'with' to be a very
 poor search term on Google, or any search engine for that matter.


heh.  reminds me of http://bash.org/?514353 :)

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


~|
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:315168
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: OT JavaScript question.

2008-11-12 Thread Jim Davis
 -Original Message-
 From: Ian Skinner [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2008 4:15 PM
 To: cf-talk
 Subject: Re: OT JavaScript question.
 
 Adrian Lynch wrote:
  Or do you mean with?
 
  with someObject {
  var1 = not;
  var2 = sure;
  var3 = about;
  var4 = this;
  var5 = syntax;
  var6 = or;
  var7 = whether;
  var8 = it's a JavaScript;
  var9 = thing or not;
  }
 
  alert(someObject.var1);
 
 Yes that is the one I was looking for!.  I found 'with' to be a very
 poor search term on Google, or any search engine for that matter.

The actual, factual name of this is Object Literal Notation - Google
should be more cooperative with that.  ;^)

Jim Davis


~|
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:315176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: (ot) javascript problem

2008-07-12 Thread Sonny Savage
I use this:
http://tredosoft.com/Multiple_IE

You can install 3.0 through 6.0 as stand-alone.  I then have IE 7 as my
system install.

On Fri, Jul 11, 2008 at 6:30 PM, Claude Schneegans 
[EMAIL PROTECTED] wrote:

  You might want to take a look at IE7 stand alone.

 I will sure do.
 Thanks.

 --
 ___
 REUSE CODE! Use custom tags;
 See http://www.contentbox.com/claude/customtags/tagstore.cfm
 (Please send any spam to this address: [EMAIL PROTECTED])
 Thanks.


 

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

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


Re: (ot) javascript problem

2008-07-11 Thread Claude Schneegans
 You can try this.
http://www.debugbar.com/


Hi, are you using it yourself?
I tried it, there are a lot of interesting options, however two main flaws:
1º the error message is still the same stupidity:
- it does not give the true file name the error occurs,
- it gives the line number, but does not show the content of the line.
2º it shows source code of all files, fine, but with no line numbers :-(

Any setup or so I'm missing?

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.



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

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


Re: (ot) javascript problem

2008-07-11 Thread Gerald Guido
Actually I have it installed but I rarely use IE except for cross browser
css issues. (i.e. after I work out all the gremlins using Firebug). I have
yet to run into a IE only JS bug.

Here try CompanionJS. It is geared more toward JS debugging:
http://www.my-debugbar.com/wiki/CompanionJS/HomePage

I tried messing up a js include to throw an error and CompanionJS went to
the correct file and line.

 2º it shows source code of all files, fine, but with no line numbers :-(

You can turn on line numbers by  right click in the middle frame   Show
Lines
Same deal with CompanionJS.
HTH,
~G~

On Fri, Jul 11, 2008 at 12:14 PM, Claude Schneegans 
[EMAIL PROTECTED] wrote:

  You can try this.
 http://www.debugbar.com/


 Hi, are you using it yourself?
 I tried it, there are a lot of interesting options, however two main flaws:
 1º the error message is still the same stupidity:
- it does not give the true file name the error occurs,
- it gives the line number, but does not show the content of the line.
 2º it shows source code of all files, fine, but with no line numbers :-(

 Any setup or so I'm missing?

 --
 ___
 REUSE CODE! Use custom tags;
 See http://www.contentbox.com/claude/customtags/tagstore.cfm
 (Please send any spam to this address: [EMAIL PROTECTED])
 Thanks.



 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308943
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) javascript problem

2008-07-11 Thread Claude Schneegans
 Actually I have it installed but I rarely use IE except for cross browser
css issues.

I see. In my case, most my Javascript is used in my CMS used by 
administrators,
and none of them use FF, so developing for IE is a must.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


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

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


Re: (ot) javascript problem

2008-07-11 Thread Gerald Guido
Did you try CompanionJS?  I think it is just what you need.

http://www.my-debugbar.com/wiki/CompanionJS/HomePage



~G~


On Fri, Jul 11, 2008 at 1:29 PM, Claude Schneegans 
[EMAIL PROTECTED] wrote:

  Actually I have it installed but I rarely use IE except for cross
 browser
 css issues.

 I see. In my case, most my Javascript is used in my CMS used by
 administrators,
 and none of them use FF, so developing for IE is a must.

 --
 ___
 REUSE CODE! Use custom tags;
 See http://www.contentbox.com/claude/customtags/tagstore.cfm
 (Please send any spam to this address: [EMAIL PROTECTED])
 Thanks.


 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308947
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) javascript problem

2008-07-11 Thread Claude Schneegans
 Did you try CompanionJS?  I think it is just what you need.

Ah ha! Now this looks better ;-)
Thanks.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


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

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


RE: (ot) javascript problem

2008-07-11 Thread Stephens, Larry V
I haven't worked with DebugBar itself, yet, but Companion.JS that works with it 
was helpful in my case - not perfect but helpful. (Better than nothing, 
certianly.)

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Friday, July 11, 2008 12:14 PM
To: CF-Talk
Subject: Re: (ot) javascript problem

 You can try this.
http://www.debugbar.com/


Hi, are you using it yourself?
I tried it, there are a lot of interesting options, however two main flaws:
1º the error message is still the same stupidity:
- it does not give the true file name the error occurs,
- it gives the line number, but does not show the content of the line.
2º it shows source code of all files, fine, but with no line numbers :-(

Any setup or so I'm missing?

--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.





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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308950
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) javascript problem

2008-07-11 Thread Gerald Guido
I haven't worked with DebugBar itself, yet, but Companion.JS that works
with it was helpful in my case - not perfect but helpful. (Better than
nothing, certianly.)

If you are not already aware of it, the tool of choice for many developers
is Firebug: http://getfirebug.com/

It is absolutely indispensable. Especially when debugging ajax calls to the
server and debugging css.

There is a port for debugging CF apps called coldfire
http://coldfire.riaforge.org/

~G~

On Fri, Jul 11, 2008 at 4:07 PM, Stephens, Larry V [EMAIL PROTECTED]
wrote:

 I haven't worked with DebugBar itself, yet, but Companion.JS that works
 with it was helpful in my case - not perfect but helpful. (Better than
 nothing, certianly.)



-- 
If everything seems under control, you're not going fast enough
-- Mario Andretti


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

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


Re: (ot) javascript problem

2008-07-11 Thread Claude Schneegans
 Companion.JS that works with it was helpful in my case - not perfect 
but helpful. (Better than nothing, certianly.)

I tried it, but unfortunately it requires the MS debugger, and for some 
reason,
I've never been able to get this piece od ?%$! to work under IE6.
All I get is a new window with nothing in it.

I know, IE7 have been around for some time, but about half of visitors 
are still using IE6,
and I still need to have my apps working under IE6.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308952
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) javascript problem

2008-07-11 Thread Gerald Guido
You might want to take a look at IE7 stand alone. It allows you to run IE 6
and 7 on the same machine.

http://tredosoft.com/IE7_standalone

I need to support both IE 6 and 7. This allows you to run both side by side.
Very handy.

~G~


On Fri, Jul 11, 2008 at 4:57 PM, Claude Schneegans 
[EMAIL PROTECTED] wrote:

  Companion.JS that works with it was helpful in my case - not perfect
 but helpful. (Better than nothing, certianly.)

 I tried it, but unfortunately it requires the MS debugger, and for some
 reason,
 I've never been able to get this piece od ?%$! to work under IE6.
 All I get is a new window with nothing in it.

 I know, IE7 have been around for some time, but about half of visitors
 are still using IE6,
 and I still need to have my apps working under IE6.

 --
 ___
 REUSE CODE! Use custom tags;
 See http://www.contentbox.com/claude/customtags/tagstore.cfm
 (Please send any spam to this address: [EMAIL PROTECTED])
 Thanks.


 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308953
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) javascript problem

2008-07-11 Thread Claude Schneegans
 You might want to take a look at IE7 stand alone.

I will sure do.
Thanks.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308954
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) javascript problem

2008-07-09 Thread Stephens, Larry V
On Tue, Jul 8, 2008 at 6:42 AM, Stephens, Larry V wrote:
 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in 
 Mozilla (shows no errors in the error console). The sample works fine in IE 
 but my revision (no


Thanks again for all the suggestions.

I figured it out by taking the working page and inserting the non-working 
script piece by piece. This code allows sub-menus and the doc either didn't say 
or I missed what elements were required with a sub-menu. After the first entry 
in a menu tree some elements become optional in successive elements at the same 
level. Everytime you add a sub-level those optional elements become required 
for the first entry of the sub level:

Menu1(1, 2, 3, 4, 5)
Menu2(1, 2, 3)
Menu3(1, 2, 3)
Menu3_1(1, 2, 3, 4 5)

Etc.

Turns out I had a sub-menu where I left out the ,4, 5 in the first entry. For 
whatever reason it still displayed fine in Mozilla and just threw warnings but 
it choked and died in IE. As soon as I fixed that all began working again.

I will add that the tools I mentioned earlier for debugging IE were a great 
help.


Larry V. Stephens
Indiana University
Office of Risk Management
[EMAIL PROTECTED]
812-855-9758




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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308805
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) javascript problem

2008-07-08 Thread Gerald Guido
You can try this.
http://www.debugbar.com/



On Tue, Jul 8, 2008 at 8:42 AM, Stephens, Larry V [EMAIL PROTECTED]
wrote:

 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in
 Mozilla (shows no errors in the error console). The sample works fine in IE
 but my revision (no revision to code other than adding menu elements) won't
 even show up in IE.

 I see an error icon but it tells me absolutely nothing useful.
 Line 348
 Char: 3
 Error: Invalid argument
 Code: 0

 As best I can tell - looking at the page source - line 348 is past the end
 of the source code so I infer that the problem is in one of the referenced
 javascript sources.

 I've tried the IE Developer's Toolbar but don't see anything like the
 Mozilla error console.

 I do get warnings in the Mozilla error console but they don't track to a
 specific line of code.

 Any clues on how to trace javascript errors in IE?

 A sample page is http://www.cincinnaticc.org/newweb/


 Larry V. Stephens
 Indiana University
 Office of Risk Management
 [EMAIL PROTECTED]
 812-855-9758


 

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

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


RE: (ot) javascript problem

2008-07-08 Thread Adrian Lynch
If things aren't working after you made a change, show us a before and after
sample of the code.

Adrian

-Original Message-
From: Stephens, Larry V [mailto:[EMAIL PROTECTED]
Sent: 08 July 2008 13:43
To: CF-Talk
Subject: (ot) javascript problem


I'm using a DHTML javascript menu (from DynamicDrive) that works fine in
Mozilla (shows no errors in the error console). The sample works fine in IE
but my revision (no revision to code other than adding menu elements) won't
even show up in IE.

I see an error icon but it tells me absolutely nothing useful.
Line 348
Char: 3
Error: Invalid argument
Code: 0

As best I can tell - looking at the page source - line 348 is past the end
of the source code so I infer that the problem is in one of the referenced
javascript sources.

I've tried the IE Developer's Toolbar but don't see anything like the
Mozilla error console.

I do get warnings in the Mozilla error console but they don't track to a
specific line of code.

Any clues on how to trace javascript errors in IE?

A sample page is http://www.cincinnaticc.org/newweb/


Larry V. Stephens
Indiana University
Office of Risk Management
[EMAIL PROTECTED]
812-855-9758


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

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


Re: (ot) javascript problem

2008-07-08 Thread Claude Schneegans
 Any clues on how to trace javascript errors in IE?

Error messages in IE are simply retarded.
The error could be in any file, and it does not even give the file name.
Furthermore, the line number is always one unit higher.
Then your error must be in one of the included files, at line 347.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


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

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


RE: (ot) javascript problem

2008-07-08 Thread Stephens, Larry V
Thanks - installing now.

-Original Message-
From: Gerald Guido [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 08, 2008 8:58 AM
To: CF-Talk
Subject: Re: (ot) javascript problem

You can try this.
http://www.debugbar.com/



On Tue, Jul 8, 2008 at 8:42 AM, Stephens, Larry V [EMAIL PROTECTED]
wrote:

 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in
 Mozilla (shows no errors in the error console). The sample works fine in IE
 but my revision (no revision to code other than adding menu elements) won't
 even show up in IE.

 I see an error icon but it tells me absolutely nothing useful.
 Line 348
 Char: 3
 Error: Invalid argument
 Code: 0

 As best I can tell - looking at the page source - line 348 is past the end
 of the source code so I infer that the problem is in one of the referenced
 javascript sources.

 I've tried the IE Developer's Toolbar but don't see anything like the
 Mozilla error console.

 I do get warnings in the Mozilla error console but they don't track to a
 specific line of code.

 Any clues on how to trace javascript errors in IE?

 A sample page is http://www.cincinnaticc.org/newweb/


 Larry V. Stephens
 Indiana University
 Office of Risk Management
 [EMAIL PROTECTED]
 812-855-9758






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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308728
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) javascript problem

2008-07-08 Thread Loathe
The best means I have found of working out JS errors in IE is to create 
a project in Visual Web Developer 2008 (free).  Launch the project which 
will open a browser window (IE needs to be set as your default browser) 
then navigate to your page.  When the error occurs choose to debug the 
error, and VS will give you better information, and take you directly to 
the offending bit of JS.

Stephens, Larry V wrote:
 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in 
 Mozilla (shows no errors in the error console). The sample works fine in IE 
 but my revision (no revision to code other than adding menu elements) won't 
 even show up in IE.
 
 I see an error icon but it tells me absolutely nothing useful.
 Line 348
 Char: 3
 Error: Invalid argument
 Code: 0
 
 As best I can tell - looking at the page source - line 348 is past the end of 
 the source code so I infer that the problem is in one of the referenced 
 javascript sources.
 
 I've tried the IE Developer's Toolbar but don't see anything like the Mozilla 
 error console.
 
 I do get warnings in the Mozilla error console but they don't track to a 
 specific line of code.
 
 Any clues on how to trace javascript errors in IE?
 
 A sample page is http://www.cincinnaticc.org/newweb/
 
 
 Larry V. Stephens
 Indiana University
 Office of Risk Management
 [EMAIL PROTECTED]
 812-855-9758
 
 
 

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

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


RE: (ot) javascript problem

2008-07-08 Thread Andy Matthews
IE JS errors suck...it's almost impossible to debug. Your best bet then is
to start commenting out lines, or chunks, of code (including JS includes).

At the very least it should help you narrow down your issue. You could also
extract the content from your included files one at a time, and replace the
include call with an actual script block. Then IE might tell you where in
that file the error is.


andy 

-Original Message-
From: Stephens, Larry V [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 08, 2008 7:43 AM
To: CF-Talk
Subject: (ot) javascript problem

I'm using a DHTML javascript menu (from DynamicDrive) that works fine in
Mozilla (shows no errors in the error console). The sample works fine in IE
but my revision (no revision to code other than adding menu elements) won't
even show up in IE.

I see an error icon but it tells me absolutely nothing useful.
Line 348
Char: 3
Error: Invalid argument
Code: 0

As best I can tell - looking at the page source - line 348 is past the end
of the source code so I infer that the problem is in one of the referenced
javascript sources.

I've tried the IE Developer's Toolbar but don't see anything like the
Mozilla error console.

I do get warnings in the Mozilla error console but they don't track to a
specific line of code.

Any clues on how to trace javascript errors in IE?

A sample page is http://www.cincinnaticc.org/newweb/


Larry V. Stephens
Indiana University
Office of Risk Management
[EMAIL PROTECTED]
812-855-9758




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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308730
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) javascript problem

2008-07-08 Thread denstar
Look for a trailing comma in a javascript array perhaps?  That one
gets me in IE every once in a while.

On Tue, Jul 8, 2008 at 6:42 AM, Stephens, Larry V wrote:
 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in 
 Mozilla (shows no errors in the error console). The sample works fine in IE 
 but my revision (no

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308738
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) javascript problem

2008-07-08 Thread Stephens, Larry V
On Tue, Jul 8, 2008 at 6:42 AM, Stephens, Larry V wrote:
 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in 
 Mozilla (shows no errors in the error console). The sample works fine in IE 
 but my revision (no


Thanks for all the suggestions.

I installed the debug bar that was recommended and, on the same site, saw 
.Jscript (I think that's the name) and installed it. Both seem very helpful 
additions to IE.

The latter program promptly highlighted the offending line of code. 
Unfortunately, I'm still mystified at why it's choking in IE but not Mozilla; 
seems both will go to the same code section..

I know this won't be helpful by itself, but:

function CntnrSetUp(Wdth,Hght,NoOff){
var x=RcrsLvl==1?BorderColor:BorderSubColor;
this.FrstMbr=null;
this.OrgLeft=this.OrgTop=0;
if(x)this.bgColor=x;
if(Nav4){   this.visibility='hide';
this.resizeTo(Wdth,Hght)}
else{   if(x)this.style.backgroundColor=x;
this.style.width=Wdth+P_X;
this.style.height=Hght+P_X;
this.style.fontFamily=FontFamily;
this.style.fontWeight=FontBold?'bold':'normal';
this.style.fontStyle=FontItalic?'italic':'normal';
this.style.fontSize=FontSize+'pt';
this.style.zIndex=RcrsLvl+Ztop}}

The script works fine off one page someone set up as a demo but crashes here on 
another page. The offending line(s) of code seem to be either, one or both of 
the ones in red, but I can't see where I've made a mistake in anything above 
this. When I did some investigation both Wdth and Hght returned integers. P_X 
is widely used in other parts of the script (= 'px').

But, this is far too involved a script for me to debug. At this point - barring 
an answer from the author - I'm trying a different script.

Thanks.



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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308740
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) javascript problem

2008-07-08 Thread denstar
Maybe:

this.resizeTo(Wdth,Hght)}

to

this.resizeTo(Wdth,Hght);
}

and

 this.style.zIndex=RcrsLvl+Ztop}

to

 this.style.zIndex=RcrsLvl+Ztop;
}

On Tue, Jul 8, 2008 at 11:53 AM, Stephens, Larry V [EMAIL PROTECTED] wrote:
 On Tue, Jul 8, 2008 at 6:42 AM, Stephens, Larry V wrote:
 I'm using a DHTML javascript menu (from DynamicDrive) that works fine in 
 Mozilla (shows no errors in the error console). The sample works fine in IE 
 but my revision (no


 Thanks for all the suggestions.

 I installed the debug bar that was recommended and, on the same site, saw 
 .Jscript (I think that's the name) and installed it. Both seem very helpful 
 additions to IE.

 The latter program promptly highlighted the offending line of code. 
 Unfortunately, I'm still mystified at why it's choking in IE but not Mozilla; 
 seems both will go to the same code section..

 I know this won't be helpful by itself, but:

 function CntnrSetUp(Wdth,Hght,NoOff){
var x=RcrsLvl==1?BorderColor:BorderSubColor;
this.FrstMbr=null;
this.OrgLeft=this.OrgTop=0;
if(x)this.bgColor=x;
if(Nav4){   this.visibility='hide';
this.resizeTo(Wdth,Hght)}
else{   if(x)this.style.backgroundColor=x;
this.style.width=Wdth+P_X;
this.style.height=Hght+P_X;
this.style.fontFamily=FontFamily;
this.style.fontWeight=FontBold?'bold':'normal';
this.style.fontStyle=FontItalic?'italic':'normal';
this.style.fontSize=FontSize+'pt';
this.style.zIndex=RcrsLvl+Ztop}}

 The script works fine off one page someone set up as a demo but crashes here 
 on another page. The offending line(s) of code seem to be either, one or both 
 of the ones in red, but I can't see where I've made a mistake in anything 
 above this. When I did some investigation both Wdth and Hght returned 
 integers. P_X is widely used in other parts of the script (= 'px').

 But, this is far too involved a script for me to debug. At this point - 
 barring an answer from the author - I'm trying a different script.

 Thanks.

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

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


Re: (ot) javascript help

2008-06-11 Thread Barney Boisvert
try document.getElementById(FTDTYPEe).  And then go get some library
that will take care of all that for you (jQuery, Prototype, etc.).

cheers,
barneyb

On Wed, Jun 11, 2008 at 10:34 AM, Chad Gray [EMAIL PROTECTED] wrote:
 Can any javascript gurus tell me why this does not work?  I want the br tag 
 to display on the page so I get a carriage return between the two pieces of 
 text Foo and Moo.  I get this error in Firbug:
 document.tabbedTicket.FTDTYPEe has no properties


 script
 function makeNewEntry() {
 document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
 document.tabbedTicket.FTDTYPEe.style.display = '';
 }
 /script

 form action=preferences.cfm method=post id=tabbedTicket 
 name=tabbedTicket

 input value=+ type=button style=font-size:9px; 
 onclick=makeNewEntry(); title=Add New FTD

 Typebr /
 Foo
 br id=FTDTYPEe style=visibility:hidden; display: none; /
 Moo
 /form


 

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

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


Re: (ot) javascript help

2008-06-11 Thread Greg Morphis
because br isn't an element of form?
try removing the tabbedTicket or use getElementById

On Wed, Jun 11, 2008 at 12:34 PM, Chad Gray [EMAIL PROTECTED] wrote:
 Can any javascript gurus tell me why this does not work?  I want the br tag 
 to display on the page so I get a carriage return between the two pieces of 
 text Foo and Moo.  I get this error in Firbug:
 document.tabbedTicket.FTDTYPEe has no properties


 script
 function makeNewEntry() {
 document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
 document.tabbedTicket.FTDTYPEe.style.display = '';
 }
 /script

 form action=preferences.cfm method=post id=tabbedTicket 
 name=tabbedTicket

 input value=+ type=button style=font-size:9px; 
 onclick=makeNewEntry(); title=Add New FTD

 Typebr /
 Foo
 br id=FTDTYPEe style=visibility:hidden; display: none; /
 Moo
 /form


 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307258
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) javascript help

2008-06-11 Thread Dawson, Michael
I may be way off-base, but do you need that trailing e in FTDTYPEe?
Could it be the missing e from Firbug?

m!ke

On Wed, Jun 11, 2008 at 10:34 AM, Chad Gray [EMAIL PROTECTED] wrote:
 Can any javascript gurus tell me why this does not work?  I want the
br tag to display on the page so I get a carriage return between the
two pieces of text Foo and Moo.  I get this error in Firbug:
 document.tabbedTicket.FTDTYPEe has no properties

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307259
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) javascript help

2008-06-11 Thread Andy Matthews
There's an easier way to do this...

Rather than using a br and assigning an id to it, use a div. Divs have built
in properties that aren't included in br tags. 

-Original Message-
From: Chad Gray [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 11, 2008 12:34 PM
To: CF-Talk
Subject: (ot) javascript help

Can any javascript gurus tell me why this does not work?  I want the br
tag to display on the page so I get a carriage return between the two pieces
of text Foo and Moo.  I get this error in Firbug:
document.tabbedTicket.FTDTYPEe has no properties


script
function makeNewEntry() {
document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
document.tabbedTicket.FTDTYPEe.style.display = ''; } /script

form action=preferences.cfm method=post id=tabbedTicket
name=tabbedTicket

input value=+ type=button style=font-size:9px;
onclick=makeNewEntry(); title=Add New FTD 

Typebr /
Foo
br id=FTDTYPEe style=visibility:hidden; display: none; / Moo /form




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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307260
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) javascript help

2008-06-11 Thread Josh Nathanson
Quite a few issues there...

First off, you can generally use one or the other of visibility or 
display properties.  In your case you'd probably want to use display 
since this will actually create or destroy the space that the br occupies.

Then, in makeNewEntry you'd want this one line:
document.getElementById('FTDTYPEe').style.display = 'block';
// since it is an id, you can reference it directly, independent of the form

Finally, you can remove the visibility property from the br:
br id=FTDTYPEe style=display: none; /

That should get you where you need to be.

-- Josh



- Original Message - 
From: Chad Gray [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Wednesday, June 11, 2008 10:34 AM
Subject: (ot) javascript help


 Can any javascript gurus tell me why this does not work?  I want the br 
 tag to display on the page so I get a carriage return between the two 
 pieces of text Foo and Moo.  I get this error in Firbug:
 document.tabbedTicket.FTDTYPEe has no properties


 script
 function makeNewEntry() {
 document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
 document.tabbedTicket.FTDTYPEe.style.display = '';
 }
 /script

 form action=preferences.cfm method=post id=tabbedTicket 
 name=tabbedTicket

 input value=+ type=button style=font-size:9px; 
 onclick=makeNewEntry(); title=Add New FTD

 Typebr /
 Foo
 br id=FTDTYPEe style=visibility:hidden; display: none; /
 Moo
 /form


 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307262
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) javascript help

2008-06-11 Thread Chad Gray
Ah... that makes sense.

Thanks everyone for the help!

 -Original Message-
 From: Greg Morphis [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 11, 2008 1:39 PM
 To: CF-Talk
 Subject: Re: (ot) javascript help
 
 because br isn't an element of form?
 try removing the tabbedTicket or use getElementById
 
 On Wed, Jun 11, 2008 at 12:34 PM, Chad Gray [EMAIL PROTECTED] wrote:
  Can any javascript gurus tell me why this does not work?  I want the
 br tag to display on the page so I get a carriage return between the two
 pieces of text Foo and Moo.  I get this error in Firbug:
  document.tabbedTicket.FTDTYPEe has no properties
 
 
  script
  function makeNewEntry() {
  document.tabbedTicket.FTDTYPEe.style.visibility = 'visible';
  document.tabbedTicket.FTDTYPEe.style.display = '';
  }
  /script
 
  form action=preferences.cfm method=post id=tabbedTicket
 name=tabbedTicket
 
  input value=+ type=button style=font-size:9px;
 onclick=makeNewEntry(); title=Add New FTD
 
  Typebr /
  Foo
  br id=FTDTYPEe style=visibility:hidden; display: none; /
  Moo
  /form
 
 
 
 
 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307265
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) Javascript Question...

2008-05-16 Thread Bobby Hartsfield
window.open()

most popup blockers will block it though.

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


-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 16, 2008 4:14 PM
To: CF-Talk
Subject: (ot) Javascript Question...

I have a form that posts to itself. Once submitted, I create a dynamic url
on the fly.
Using javascript, how can I submit the form to itself and open the new url
in another browser window?

Can this be done w/o creating a 'go between' cf template?

Thanks, Che




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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305524
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) Javascript Question...

2008-05-16 Thread Che Vilnonis
Thanks. Because of popup blockers I guess a regular href will have to do. 

-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 16, 2008 4:21 PM
To: CF-Talk
Subject: RE: (ot) Javascript Question...

window.open()

most popup blockers will block it though.

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


-Original Message-
From: Che Vilnonis [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 4:14 PM
To: CF-Talk
Subject: (ot) Javascript Question...

I have a form that posts to itself. Once submitted, I create a dynamic url
on the fly.
Using javascript, how can I submit the form to itself and open the new url
in another browser window?

Can this be done w/o creating a 'go between' cf template?

Thanks, Che






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

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


Re: OT Javascript - when is an element visible

2008-02-12 Thread Rey Bango
In Ext, the Element class has built-in methods to get just about 
anything you need from an element, including position info.

http://extjs.com/deploy/dev/docs/?class=Ext.Element

jQuery, out of the box, can provide offset, width and height only and 
enhanced capabilities via the dimensions plugin.

Rey...


Massimo Foti wrote:
 Doesn't sound fun though-- maybe someone will post and show us a
 pre-built function in the prototype library or something.  :)
 
 Many libraries include a method to get the coordinates of any element.
 Right now I am thinking just about the one available in Mootools:
 http://docs.mootools.net/Element/Element-Dimensions.js#Element.getCoordinates
 
 Prototype should help too:
 http://www.prototypejs.org/api/position
 
 But I am sure there are many alternatives, hope others will fill the blanks 
 (Ext, jQuery, YUI etc)
 
 
 Massimo Foti, web-programmer for hire
 Tools for ColdFusion and Dreamweaver developers:
 http://www.massimocorner.com
 
 
 
 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298815
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 Javascript - when is an element visible

2008-02-12 Thread Massimo Foti
 Doesn't sound fun though-- maybe someone will post and show us a
 pre-built function in the prototype library or something.  :)

Many libraries include a method to get the coordinates of any element.
Right now I am thinking just about the one available in Mootools:
http://docs.mootools.net/Element/Element-Dimensions.js#Element.getCoordinates

Prototype should help too:
http://www.prototypejs.org/api/position

But I am sure there are many alternatives, hope others will fill the blanks 
(Ext, jQuery, YUI etc)


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298812
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 Javascript - when is an element visible

2008-02-12 Thread Jim Davis
 -Original Message-
 From: Rey Bango [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 12, 2008 3:50 PM
 To: CF-Talk
 Subject: Re: OT Javascript - when is an element visible
 
 In Ext, the Element class has built-in methods to get just about
 anything you need from an element, including position info.
 
 http://extjs.com/deploy/dev/docs/?class=Ext.Element

For what it's worth my PanelManager will do this as well:

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

You do have to make each element into a panel - this extends the element
with a ton of methods including getPosition() which returns the element's
position from the top/left of the canvas.

To be easy tho' the method provides a hasCollisionWith() method which can
determine if one element overlaps another.  So (once you've made panels of
the elements) you can just say something like:

if ( MyElement.hasCollisionWith(MyContainer) ) {
In View!
} else {
Not in View!
};

This would return true if any part of MyElement is overlapping
MyContainer - to figure out how much they overlap you might use the
getDistanceFrom() method - this returns zero if the elements are touching
(but not overlapping), positive numbers if they're apart and negative
numbers if they're overlapping.

The panelManager itself provides general methods to get canvas and window
size and mouse position allowing you to easily determine if the parent
container is visible.

Lastly the component supports a fully cross-platform event manager/model so
you can easily react to collisions.

It's small, doesn't pollute host code and I've found it insanely useful.

Jim Davis 


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

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


Re: OT Javascript - when is an element visible

2008-02-12 Thread s. isaac dealey
I'm not sure if scrollTop is part of the spec for DOM (or widely
supported -- innerHTML for example is not but widely supported).
Assuming that scrollTop is supported in the browser though, I'd think
something like this might work: 

var ct = container.scrollTop; 
var ch = container.offsetHeight; 

var t = mydiv.offsetTop; 
var h = mydiv.offsetHeight; 

if (t  ct  t  (ct + ch)) {
  // top of the div is visible 
} else if ((t+h)  ct  (t+h)  (ct + ch)) {
  // bottom of the div is visible 
}

hth,
ike


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

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;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298829
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 Javascript - when is an element visible

2008-02-12 Thread Brad Wood
I know there is a JS method called .scrollIntoView() (IE only??) which
will cause the an element to scroll to where it is visible.  Not sure
how to tell if it is visible though.  I suppose if you know the edges of
the viewable area, you can calculate the position of the element in
question via its coordinates and size.

Doesn't sound fun though-- maybe someone will post and show us a
pre-built function in the prototype library or something.  :)

~Brad

What I'm trying to work out, is a way to find out when one of those
child
divs is visible and when it's not.

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

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


Re: OT: javascript to keep a user from navigating away

2008-02-01 Thread s. isaac dealey
 I would like to make javascript that when the window.onUnload is
 fired to pop up a confirm() saying hey if you leave now your form
 information will not be saved.  Do you wish to continue?. But I think
 once onUnload fires there is no stopping the user from leaving the
 page.  Can you cancel onUnload once it fires?

I believe it's doable... not necessarily the best case for usability... 

however... 

in order to work across both IE and firefox/moz you have to use two
event handlers. In moz, onunload can be cancelled

body onunload=return confirm('Lose your work?');

in IE, the onunload event doesn't fire until after the browser is
already closed, however, they have a prioprietary onbeforeunload event,
so you can use that one instead to do the same thing for IE. Iirc you
don't have to do any special checking or anything, just copy whatever
you put in onunload into onbeforeunload also and you'll get the result
you want. 

I was asked to do this several years ago for a company in Ft Lauderdale.

hth,
ike

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

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;160198600;22374440;w

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


RE: OT: javascript to keep a user from navigating away

2008-02-01 Thread Chad Gray
Thanks again Isaac!

Here is my final code so people can enjoy (add the script tags around the 
javascript).  It does not fire when submit is clicked, but if you refresh or 
use the back/forward button or try to close the browser it fires.

function unloadMessage(){
message = Dont go.. what you typed in the form will be lost!
return message;
}

function setBeforeUnload(on){
window.onbeforeunload = (on) ? unloadMessage : null;
}

setBeforeUnload(true);

form
input type=text 
input type=submit onClick=setBeforeUnload(false);
/form


-Original Message-
From: s. isaac dealey [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 01, 2008 3:49 PM
To: CF-Talk
Subject: Re: OT: javascript to keep a user from navigating away

 I would like to make javascript that when the window.onUnload is
 fired to pop up a confirm() saying hey if you leave now your form
 information will not be saved.  Do you wish to continue?. But I think
 once onUnload fires there is no stopping the user from leaving the
 page.  Can you cancel onUnload once it fires?

I believe it's doable... not necessarily the best case for usability... 

however... 

in order to work across both IE and firefox/moz you have to use two
event handlers. In moz, onunload can be cancelled

body onunload=return confirm('Lose your work?');

in IE, the onunload event doesn't fire until after the browser is
already closed, however, they have a prioprietary onbeforeunload event,
so you can use that one instead to do the same thing for IE. Iirc you
don't have to do any special checking or anything, just copy whatever
you put in onunload into onbeforeunload also and you'll get the result
you want. 

I was asked to do this several years ago for a company in Ft Lauderdale.

hth,
ike

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

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;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297966
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: Javascript MouseOver

2007-08-21 Thread Matt Williams
missing a comma after left=450   ?

On 8/21/07, Steve LaBadie [EMAIL PROTECTED] wrote:
 I have created a mouse over effect and it works fine.  The only problem
 I am having is that the top= in the below example does not work in
 Firefox.  Are there any ideas to resolve this issue? The window stay at
 the top instead of coming down 350px.





 Code:

 script type=text/javascript
 !--
 function openWindow(url, name) {
 myWin = window.open(,, width=200,height=100,left=450 top=350);
 myWin.document.write (bodyfont style='font-size: 11px; font-family:
 verdana;'Blah Blah Blah./font);
 myWin.document.write (/body/html);
 myWin.document.close();
 }
 function closeIt() {
 if (!myWin.closed)
 myWin.self.close()
 }
 //--
 /script





 Calling Link:

 a href=https://ssl.esu.edu/1card/; target=_blank
 onMouseOver=openWindow() onMouseOut=closeIt() onClick=return
 falseLink/a





 Steve LaBadie, Web Manager
 East Stroudsburg University
 200 Prospect St.
 East Stroudsburg, Pa 18301
 570-422-3999
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 http://www.esu.edu http://www3.esu.edu





 

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

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


Re: OT: javascript

2007-05-17 Thread Charlie Griefer
in this case, you don't need 'foo'.  just 'moo'.  even though they
could be in different forms, an id value should not be repeated on a
page.

so...

function disabler(textInputID) {
   document.getElementById(textInputID).style.disabled=true;
}

form id=foo
input type=text id=moo /
input type=button onclick=disabler('moo'); /
/form

On 5/17/07, Chad Gray [EMAIL PROTECTED] wrote:
 I want to write a javascript function that I can use on all of my forms and 
 inputs to disable a text input.  So I want to pass to the function the form's 
 ID and the text input's ID to be disabled.

 How do I append the functions attributes to my document command?

 My javascript below does not work.


 Function disabler(formID,textInputID) {

 document.formID.textInputID.disabled=true;

 }

 form id=foo
 input type=text id=moo
 input type=button onClick=disabler('foo','moo');
 /form



 

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278456
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: javascript

2007-05-17 Thread Daniel Baughman
I'm pretty sure you want 
document.getElementById(textInputID).disabled  =
true 
not 
document.getElementById(textInputID).style.disabled
= true;



-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 17, 2007 9:26 AM
To: CF-Talk
Subject: Re: OT: javascript


in this case, you don't need 'foo'.  just 'moo'.  even though they could be
in different forms, an id value should not be repeated on a page.

so...

function disabler(textInputID) {
   document.getElementById(textInputID).style.disabled=true;
}

form id=foo
input type=text id=moo /
input type=button onclick=disabler('moo'); / /form

On 5/17/07, Chad Gray [EMAIL PROTECTED] wrote:
 I want to write a javascript function that I can use on all of my forms
and inputs to disable a text input.  So I want to pass to the function the
form's ID and the text input's ID to be disabled.

 How do I append the functions attributes to my document command?

 My javascript below does not work.


 Function disabler(formID,textInputID) {

 document.formID.textInputID.disabled=true;

 }

 form id=foo
 input type=text id=moo
 input type=button onClick=disabler('foo','moo'); /form



 



~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278461
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: javascript

2007-05-17 Thread Charlie Griefer
On 5/17/07, Daniel Baughman [EMAIL PROTECTED] wrote:
 I'm pretty sure you want
 document.getElementById(textInputID).disabled  =
 true
 not
 document.getElementById(textInputID).style.disabled
 = true;

indeed.  sorry 'bout that.  haven't had coffee yet :)

-- 
Charlie Griefer


...All the world shall be your enemy, Prince with a Thousand Enemies,
and whenever they catch you, they will kill you. But first they must catch
you, digger, listener, runner, prince with a swift warning.
Be cunning and full of tricks and your people shall never be destroyed.

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278462
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: javascript to prevent a normal link from working

2006-12-19 Thread Charlie Griefer
return false in your a href tag.

a href=# onclick=doFunction(args); return false;foo/a

On 12/19/06, Joshua Cyr [EMAIL PROTECTED] wrote:
 I am playing with YUI and spry and have a fun task of having content from
 other pages load into a tab system in spry.  All is working well so far.
 Next I have event listener code to check for the click of any link in that
 tab content area (which is a separate file).  Those links are just normal
 links with no onclick or anything.  If you click on it load that linked
 pages data into the tab.  That also works.

 What I am stuck on now is how to get the page to then stop going to the new
 page.  In other words if the link goes to 'aboutus.cfm' I can get the
 content of aboutus.cfm to load into the tab content area, but the page then
 reloads fully to go to the aboutus.cfm page.

 Basically clicking on a link will trigger the function below which needs to
 stop the default behavior of opening a new page.

 I use return false; in my function, but that only cancel's things in IE7 and
 not firefox.  I also tried return(false); with same result.

 Relevant JS is:

 function clickHandler(e) {
   var elTarget = YAHOO.util.Event.getTarget(e); // sets the var with the
 href of the new page
   Spry.Utils.updateContent('apDiv1',elTarget);  // updates my div with new
 content
   return(false);  // try to stop browser from opening new page
 }
 YAHOO.example.init = function() {
 YAHOO.util.Event.on(YAHOO.util.Dom.getElementsByClassName('joshua',
 'div')[0], click, clickHandler);
 }


 Joshua Cyr
 Savvy Software
 866.870.6358
  http://www.besavvy.com/ www.besavvy.com





 

~|
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:264480
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: OT: javascript to prevent a normal link from working

2006-12-19 Thread Joshua Cyr
Ah, but these are links I have no control over from other pages.  The trick
is that they are just normal pages that are pulled in to the tab. 


Joshua Cyr
Savvy Software
866.870.6358
www.besavvy.com

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 1:48 PM
To: CF-Talk
Subject: Re: OT: javascript to prevent a normal link from working

return false in your a href tag.

a href=# onclick=doFunction(args); return false;foo/a

On 12/19/06, Joshua Cyr [EMAIL PROTECTED] wrote:
 I am playing with YUI and spry and have a fun task of having content 
 from other pages load into a tab system in spry.  All is working well so
far.
 Next I have event listener code to check for the click of any link in 
 that tab content area (which is a separate file).  Those links are 
 just normal links with no onclick or anything.  If you click on it 
 load that linked pages data into the tab.  That also works.

 What I am stuck on now is how to get the page to then stop going to 
 the new page.  In other words if the link goes to 'aboutus.cfm' I can 
 get the content of aboutus.cfm to load into the tab content area, but 
 the page then reloads fully to go to the aboutus.cfm page.

 Basically clicking on a link will trigger the function below which 
 needs to stop the default behavior of opening a new page.

 I use return false; in my function, but that only cancel's things in 
 IE7 and not firefox.  I also tried return(false); with same result.

 Relevant JS is:

 function clickHandler(e) {
   var elTarget = YAHOO.util.Event.getTarget(e); // sets the var with 
 the href of the new page
   Spry.Utils.updateContent('apDiv1',elTarget);  // updates my div with 
 new content
   return(false);  // try to stop browser from opening new page } 
 YAHOO.example.init = function() { 
 YAHOO.util.Event.on(YAHOO.util.Dom.getElementsByClassName('joshua',
 'div')[0], click, clickHandler);
 }


 Joshua Cyr
 Savvy Software
 866.870.6358
  http://www.besavvy.com/ www.besavvy.com





 



~|
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:264481
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: OT: javascript to prevent a normal link from working

2006-12-19 Thread Joshua Cyr
Just to close the loop, I found a way to do it with the yahoo event handler.


Basically I have tabs that pull data from other files, and if those files
have links and the link is to an internal document open the liked doc in the
tab, if an external document link like normal.  Sort of like using an iframe
but no iframes. 

Working example here.  Click on 'don' to open other files.  Actually tab 1
is a separate .htm file as well.

http://dev.besavvy.com/Spry_P1_4_1214/samples/tabbedpanels/tabbed_panel_samp
le.htm#



Joshua

-Original Message-
From: Joshua Cyr [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 2:00 PM
To: CF-Talk
Subject: RE: OT: javascript to prevent a normal link from working

Ah, but these are links I have no control over from other pages.  The trick
is that they are just normal pages that are pulled in to the tab. 


Joshua Cyr
Savvy Software
866.870.6358
www.besavvy.com

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 19, 2006 1:48 PM
To: CF-Talk
Subject: Re: OT: javascript to prevent a normal link from working

return false in your a href tag.

a href=# onclick=doFunction(args); return false;foo/a

On 12/19/06, Joshua Cyr [EMAIL PROTECTED] wrote:
 I am playing with YUI and spry and have a fun task of having content 
 from other pages load into a tab system in spry.  All is working well 
 so
far.
 Next I have event listener code to check for the click of any link in 
 that tab content area (which is a separate file).  Those links are 
 just normal links with no onclick or anything.  If you click on it 
 load that linked pages data into the tab.  That also works.

 What I am stuck on now is how to get the page to then stop going to 
 the new page.  In other words if the link goes to 'aboutus.cfm' I can 
 get the content of aboutus.cfm to load into the tab content area, but 
 the page then reloads fully to go to the aboutus.cfm page.

 Basically clicking on a link will trigger the function below which 
 needs to stop the default behavior of opening a new page.

 I use return false; in my function, but that only cancel's things in
 IE7 and not firefox.  I also tried return(false); with same result.

 Relevant JS is:

 function clickHandler(e) {
   var elTarget = YAHOO.util.Event.getTarget(e); // sets the var with 
 the href of the new page
   Spry.Utils.updateContent('apDiv1',elTarget);  // updates my div with 
 new content
   return(false);  // try to stop browser from opening new page } 
 YAHOO.example.init = function() { 
 YAHOO.util.Event.on(YAHOO.util.Dom.getElementsByClassName('joshua',
 'div')[0], click, clickHandler);
 }


 Joshua Cyr
 Savvy Software
 866.870.6358
  http://www.besavvy.com/ www.besavvy.com





 





~|
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:264511
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT: Javascript - Refresh a window

2006-09-20 Thread Jim Wright
Dave Francis wrote:
 Hi,
   I have a window from which I open pop-up with JS window.open();. When I
 close this pop-up - self.close(); - is there any way to force a refresh of
 the parent window?
 

opener.window.location.reload()

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253601
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: Javascript - Refresh a window

2006-09-20 Thread Dave Francis
Well, that was quick. Thanks Jim

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 9:43 AM
To: CF-Talk
Subject: Re: OT: Javascript - Refresh a window


Dave Francis wrote:
 Hi,
   I have a window from which I open pop-up with JS window.open();. When I
 close this pop-up - self.close(); - is there any way to force a refresh of
 the parent window?


opener.window.location.reload()



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


RE: OT: Javascript - Refresh a window

2006-09-20 Thread Andy Matthews
Make sure the refresh line goes before the self.close line or else it won't
work.

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Jim Wright [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 20, 2006 8:43 AM
To: CF-Talk
Subject: Re: OT: Javascript - Refresh a window


Dave Francis wrote:
 Hi,
   I have a window from which I open pop-up with JS window.open();. When I
 close this pop-up - self.close(); - is there any way to force a refresh of
 the parent window?


opener.window.location.reload()



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253614
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: Javascript Menu that Displays Over IFrames

2006-07-18 Thread Mingo Hagen
I should have replied earlier, but for the sake of completeness, the 
Brainjar.com menu has always helped me out, we've even integrated it in 
our CMS. Check it out at: http://www.brainjar.com/dhtml/menubar/ There 
are other menu's out ther that have a smaller footprint, or some that 
have an insane amount of options. This one however had the right balance 
for me. Fast, explained well, validates through w3c.

Mingo.

Ali Awan wrote:
 Thanks for all the fish
 Actually I kind of figured this out. 
 I found some free CSS menus, which via-css convert an Unordered List to an 
 invisible Iframe, so now the drop-downs display over the select boxes an 
 IFrames.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246848
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT: Javascript Menu that Displays Over IFrames

2006-07-18 Thread Ali Awan
Mingo,

Thanks, that looks really nice.  I'll keep that in mind for the future.
But for right now, I found something really simple.  An almost entirely CSS 
solution, which much less Javascript to worry about.

Ali
 I should have replied earlier, but for the sake of completeness, the 
 Brainjar.com menu has always helped me out, we've even integrated it 
 in 
 our CMS. Check it out at: http://www.brainjar.com/dhtml/menubar/ There 
 
 are other menu's out ther that have a smaller footprint, or some that 
 
 have an insane amount of options. This one however had the right 
 balance 
 for me. Fast, explained well, validates through w3c.
 
 Mingo.
 
 Ali Awan wrote:
  Thanks for all the fish
  Actually I kind of figured this out. 
  I found some free CSS menus, which via-css convert an Unordered List 
 to an invisible Iframe, so now the drop-downs display over the select 
 boxes an IFrames.
 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246974
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT: Javascript Menu that Displays Over IFrames

2006-07-18 Thread Matt Robertson
The Brain Jar menu carries a GNU General Public License.  To quote from it:

2. b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.

This and the text that immediately follows gives someone off the
street a legal claim to a copy of the source for your work.  Not
something a customer or employer wants to hear about the programming
they paid for.

http://www.fsf.org/licensing/licenses/gpl.txt

Sorry for the downer,

-- 
[EMAIL PROTECTED]
Janitor, MSB Web Systems
mysecretbase.com

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246978
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT: Javascript Menu that Displays Over IFrames

2006-07-18 Thread Mingo Hagen
Matt Robertson wrote:
 The Brain Jar menu carries a GNU General Public License.  To quote from it:

 2. b) You must cause any work that you distribute or publish, that in
 whole or in part contains or is derived from the Program or any
 part thereof, to be licensed as a whole at no charge to all third
 parties under the terms of this License.

 This and the text that immediately follows gives someone off the
 street a legal claim to a copy of the source for your work.  Not
 something a customer or employer wants to hear about the programming
 they paid for.

 http://www.fsf.org/licensing/licenses/gpl.txt

 Sorry for the downer,
Hmm... has that always been there? I seem to remember different, because 
I specifically chose this one because of it's license (or lack 
thereof)... To bad the robots.txt doesn't allow me to see it in the Way 
back machine...

So perhaps it's time to either release the CMS in the wild (and all 
websites with it) or replace it with the one Ali found. Care to share it 
with the community, Ali? Or roll my own...

Mingo.


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247005
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: OT: Javascript Menu that Displays Over IFrames

2006-07-17 Thread Ali Awan
Thanks for all the fish
Actually I kind of figured this out. 
I found some free CSS menus, which via-css convert an Unordered List to an 
invisible Iframe, so now the drop-downs display over the select boxes an 
IFrames.

Ali

Ali,

I've used a trick to get drop downs to float over select boxes in IE.
The trick is to put an relatively positioned empty iframe behind each
one of your drop down menu.





On 7/14/06, Ali Awan [EMAIL PROTECTED] wrote:


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246835
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: OT: Javascript Menu that Displays Over IFrames

2006-07-14 Thread Zaphod Beeblebrox
Ali,

I've used a trick to get drop downs to float over select boxes in IE.
The trick is to put an relatively positioned empty iframe behind each
one of your drop down menu.





On 7/14/06, Ali Awan [EMAIL PROTECTED] wrote:
 I know this is not a CF question, but since this list has a lot more
 activity than the Javascript one, I never get any questions answered there,
 I figured there are many more people on here that are more well-versed in
 javascript than I.



 I am looking for a free DHTML/Javascript Drop-Down navigation that will
 display over i-frames.

 If anyone knows of any, or even how to get a Javascript drop-down menu to
 display over i-frames in the first place, I would be extremely grateful.



 Thanks,

 Ali



 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246603
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: OT: Javascript right click menu, only over object, can accept parameters

2006-06-02 Thread Denny Valliant
jsdomenu from dynamic drive does that, I think.

It's pretty cool, but leaks memory, I think.

One option is to use hidden fields and mouseovers to have dynamic variables.

Let me know if you want more info, I've done something similar.
:D

On 6/2/06, Andy Matthews [EMAIL PROTECTED] wrote:

 I've spent all morning looking for this sort of thing. I've found a few
 possible candidates but nothing that matches, so I'm going to ask around.

 I'm looking a right click context menu script which will allow me to
 indicate which objects on the page trigger the script AND allow me to pass
 parameters to the script so that each link on the menu does something
 different.

 Example

 Andy (id=34,wife=jaime)
 Shawn (id=32,wife=leslie)

 The menu would be the same, but when I right click on Andy, then select
 go
 to andy's page, the link would take me to the page indicated by the id
 parameter. The same for if I clicked the what's his wife's name link,
 which would fire off an alert box displaying the word jaime.

 Does anyone have something like this?

 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-


 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242176
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


NEVERMIND, thanks! Re: OT: Javascript question

2006-05-25 Thread Tony
nevermind, it works now, i guess i had another problem the day i was testing
this, and that was not the issue.

it works all good.

thanks!
tony

On 5/25/06, Tony [EMAIL PROTECTED] wrote:
 Hi there... this should be quick and easy for you Jscript ninja's...

 in this line:
 marker.openInfoWindowHtml(#url.address# #url.city# #url.state#
 #url.zip# Report time: #url.time# Report Date: #url.date# );

 i want to put BR's so that the text, line breaks, and the pop up
 window isnt huge.

 any idea how to add that into the string, so that it doesnt break it?


 script type=text/javascript
 //![CDATA[
 cfoutput
 function load() {
   if (GBrowserIsCompatible()) {
 var map = new GMap2(document.getElementById(map));
 map.setCenter(new GLatLng(#insert('.',url.lat,2)#,
 #insert('.',url.lon,3)#), 13);
 map.addControl(new GLargeMapControl ());
 map.addControl(new GMapTypeControl());
 // Creates a marker at the given point with 
 the given number label
 function createMarker(point, number) {
   var marker = new GMarker(point);
   GEvent.addListener(marker, click, 
 function() {
 marker.openInfoWindowHtml(#url.address# 
 #url.city#
 #url.state# #url.zip# Report time: #url.time# Report Date: #url.date#
 );
   });
   return marker;
 }
 // Add 1 markers to the map
 for (var i = 0; i  1; i++) {
   var point = new 
 GLatLng(#insert('.',url.lat,2)#, #insert('.',url.lon,3)#);
   map.addOverlay(createMarker(point, i + 1));
 }
   }
 }
 /cfoutput
 //]]
/script


 thanks!
 tony


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241497
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: OT: Javascript question

2006-05-25 Thread Michael Traher
try dropping #chr(10)# into the string, I think that will work.

might be nicer to set one display variable earlier
cfset infoText = url.address  chr(10)  url.city  chr(10)
then you can just refer to #infoText in the js.

On 5/25/06, Tony [EMAIL PROTECTED] wrote:

 Hi there... this should be quick and easy for you Jscript ninja's...

 in this line:
 marker.openInfoWindowHtml(#url.address# #url.city# #url.state#
 #url.zip# Report time: #url.time# Report Date: #url.date# );

 i want to put BR's so that the text, line breaks, and the pop up
 window isnt huge.

 any idea how to add that into the string, so that it doesnt break it?


 script type=text/javascript
 //![CDATA[
 cfoutput
 function load() {
   if (GBrowserIsCompatible()) {
 var map = new GMap2(document.getElementById
 (map));
 map.setCenter(new GLatLng(#insert('.',url.lat
 ,2)#,
 #insert('.',url.lon,3)#), 13);
 map.addControl(new GLargeMapControl ());
 map.addControl(new GMapTypeControl());
 // Creates a marker at the given point
 with the given number label
 function createMarker(point, number) {
   var marker = new GMarker(point);
   GEvent.addListener(marker, click,
 function() {
 marker.openInfoWindowHtml(#url.address#
 #url.city#
 #url.state# #url.zip# Report time: #url.time# Report Date: #url.date#
 );
   });
   return marker;
 }
 // Add 1 markers to the map
 for (var i = 0; i  1; i++) {
   var point = new GLatLng(#insert('.',
 url.lat,2)#, #insert('.',url.lon,3)#);
   map.addOverlay(createMarker(point, i +
 1));
 }
   }
 }
 /cfoutput
 //]]
/script


 thanks!
 tony

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241498
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: OT: Javascript question

2006-05-25 Thread Tony
true.

its still very alpha stage...
but its very simple to change to that!

good idea.

tw

On 5/25/06, Michael Traher [EMAIL PROTECTED] wrote:
 try dropping #chr(10)# into the string, I think that will work.

 might be nicer to set one display variable earlier
 cfset infoText = url.address  chr(10)  url.city  chr(10)
 then you can just refer to #infoText in the js.

 On 5/25/06, Tony [EMAIL PROTECTED] wrote:
 
  Hi there... this should be quick and easy for you Jscript ninja's...
 
  in this line:
  marker.openInfoWindowHtml(#url.address# #url.city# #url.state#
  #url.zip# Report time: #url.time# Report Date: #url.date# );
 
  i want to put BR's so that the text, line breaks, and the pop up
  window isnt huge.
 
  any idea how to add that into the string, so that it doesnt break it?
 
 
  script type=text/javascript
  //![CDATA[
  cfoutput
  function load() {
if (GBrowserIsCompatible()) {
  var map = new GMap2(document.getElementById
  (map));
  map.setCenter(new GLatLng(#insert('.',url.lat
  ,2)#,
  #insert('.',url.lon,3)#), 13);
  map.addControl(new GLargeMapControl ());
  map.addControl(new GMapTypeControl());
  // Creates a marker at the given point
  with the given number label
  function createMarker(point, number) {
var marker = new GMarker(point);
GEvent.addListener(marker, click,
  function() {
  marker.openInfoWindowHtml(#url.address#
  #url.city#
  #url.state# #url.zip# Report time: #url.time# Report Date: #url.date#
  );
});
return marker;
  }
  // Add 1 markers to the map
  for (var i = 0; i  1; i++) {
var point = new GLatLng(#insert('.',
  url.lat,2)#, #insert('.',url.lon,3)#);
map.addOverlay(createMarker(point, i +
  1));
  }
}
  }
  /cfoutput
  //]]
 /script
 
 
  thanks!
  tony
 
 

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:241537
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: OT: Javascript help

2006-04-20 Thread Zaphod Beeblebrox
the most I can think of is to evaluate the value right at the function
declaration:

objA.onclick = eval ('function(){ alert( ' + intI + ' ); };');



On 4/20/06, Ben Nadel [EMAIL PROTECTED] wrote:

 Not really for CF, but though someone here could lend some insight

 There is one problem in Javascript that I cannot seem to get a handle on
 and
 it is killling me! I can't seem to get variables to pass by value as I
 would
 hope. Take the following example:

 for (var intI = 0 ; intI  10 ; intI++){
 var objA = document.createElement( div );

 // Set the click for the link.
 objA.onclick = function(){ alert( intI ); };

 // Set the link into the body div.
 objDiv.appendChild( objA );
 }

 Now, in my head, each one of those links, when clicked should alert the
 appropriate intI value (0, 1, 2, 3, etc.); however, each of them will
 alert
 10 which is the value that broke the FOR loop. It's like they all point to
 one variable and then get updated for each loop of the FOR iteration.

 I can't seem to find a good solution to this. One method that seems to
 work,
 but is poop is something along the lines of:

 // Define a function INSIDE this function.
 function GetI( intX ){
 return(
 function(){ alert(intX); };
 );
 }

 for (var intI = 0 ; intI  10 ; intI++){
 var objA = document.createElement( div );

 // Set the click for the link.
 objA.onclick = GetI( intX );

 // Set the link into the body div.
 objDiv.appendChild( objA );
 }

 This method works as would be expected, though I seem to think that it is
 doing the exact same thing. It must be something to do with the scoping.
 Since the intI value is getting passed to a local scope (int GetI()), and
 then getting passed back, it must be unique (since the local scope of the
 GetI() method is created unique of each FOR iteration.

 This solution seems truly ganky to me. There has to be a better way. And
 this is just a simple example. I have many places where I want to be doing
 this with object reference and dynamic event handling. This one simple
 bumb
 is really holding me back!

 Please help!!!
 ...
 Ben Nadel
 www.bennadel.com


 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238286
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: OT: Javascript help

2006-04-20 Thread Ben Nadel
Zaphod,

I think that solution works for strings/numbers, but I would also like this
to work with object refrences ... Something like:

objMenu.onmouseover = function(){
objMenuSystem.Show(this);
} 


The problem here is the same... When the mouse over fires, objMenuSystem
is no undefined since it tries to find it reference to the Menu, not the
varaible reference. But then again, if I wanted it to work my way, this
would be off too, since it would point to the housing method... Not the
objMenu... Hmmm .. .and ... Dangy!

...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 20, 2006 10:31 AM
To: CF-Talk
Subject: Re: OT: Javascript help

the most I can think of is to evaluate the value right at the function
declaration:

objA.onclick = eval ('function(){ alert( ' + intI + ' ); };');



On 4/20/06, Ben Nadel [EMAIL PROTECTED] wrote:

 Not really for CF, but though someone here could lend some insight

 There is one problem in Javascript that I cannot seem to get a handle 
 on and it is killling me! I can't seem to get variables to pass by 
 value as I would hope. Take the following example:

 for (var intI = 0 ; intI  10 ; intI++){ var objA = 
 document.createElement( div );

 // Set the click for the link.
 objA.onclick = function(){ alert( intI ); };

 // Set the link into the body div.
 objDiv.appendChild( objA );
 }

 Now, in my head, each one of those links, when clicked should alert 
 the appropriate intI value (0, 1, 2, 3, etc.); however, each of them 
 will alert 10 which is the value that broke the FOR loop. It's like 
 they all point to one variable and then get updated for each loop of 
 the FOR iteration.

 I can't seem to find a good solution to this. One method that seems to 
 work, but is poop is something along the lines of:

 // Define a function INSIDE this function.
 function GetI( intX ){
 return(
 function(){ alert(intX); };
 );
 }

 for (var intI = 0 ; intI  10 ; intI++){ var objA = 
 document.createElement( div );

 // Set the click for the link.
 objA.onclick = GetI( intX );

 // Set the link into the body div.
 objDiv.appendChild( objA );
 }

 This method works as would be expected, though I seem to think that it 
 is doing the exact same thing. It must be something to do with the
scoping.
 Since the intI value is getting passed to a local scope (int GetI()), 
 and then getting passed back, it must be unique (since the local scope 
 of the
 GetI() method is created unique of each FOR iteration.

 This solution seems truly ganky to me. There has to be a better way. 
 And this is just a simple example. I have many places where I want to 
 be doing this with object reference and dynamic event handling. This 
 one simple bumb is really holding me back!

 Please help!!!
 ...
 Ben Nadel
 www.bennadel.com


 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238288
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: OT: Javascript help

2006-04-20 Thread Cutter (CFRelated)
Asking your question of my javascipt list, the responses were as follows:

Repsonse 1 
Have you tried this?

objA.onclick = new Function (alert( + intI + ) );

Response 2 
 for (var intI = 0 ; intI  10 ; intI++){
  var objA = document.createElement( div );


Place one var objA; before the loop then remove the var inside.
Redeclaring a variable is a bad practice that will bite you in other
languages.


  objA.onclick = function(){ alert( intI ); };


It's doing its job, it's alerting the value of intI, which is what you left
it. The easiest solution is to add a custom property to the object to hold
the current value of intI:

objA.currentI = intI;
objA.onclick = function(){ alert( this.currentI ); };

Response 3 
 objA.onclick = new Function (alert( + intI + ) );


This should work, but from what I understand new Function (like eval) must
be compiled on the spot, so there's a (however slight) performance hit.
http://userjs.org/help/tutorials/efficient-code


Hope some of this helps

Cutter

Ben Nadel wrote:
 Not really for CF, but though someone here could lend some insight 
 
 There is one problem in Javascript that I cannot seem to get a handle on and
 it is killling me! I can't seem to get variables to pass by value as I would
 hope. Take the following example:
 
 for (var intI = 0 ; intI  10 ; intI++){
 var objA = document.createElement( div );
 
 // Set the click for the link.
 objA.onclick = function(){ alert( intI ); };
 
 // Set the link into the body div.
 objDiv.appendChild( objA );
 }
 
 Now, in my head, each one of those links, when clicked should alert the
 appropriate intI value (0, 1, 2, 3, etc.); however, each of them will alert
 10 which is the value that broke the FOR loop. It's like they all point to
 one variable and then get updated for each loop of the FOR iteration.
 
 I can't seem to find a good solution to this. One method that seems to work,
 but is poop is something along the lines of:
 
 // Define a function INSIDE this function.
 function GetI( intX ){
 return(
 function(){ alert(intX); };
 );
 }
 
 for (var intI = 0 ; intI  10 ; intI++){
 var objA = document.createElement( div );
 
 // Set the click for the link.
 objA.onclick = GetI( intX );
 
 // Set the link into the body div.
 objDiv.appendChild( objA );
 }
 
 This method works as would be expected, though I seem to think that it is
 doing the exact same thing. It must be something to do with the scoping.
 Since the intI value is getting passed to a local scope (int GetI()), and
 then getting passed back, it must be unique (since the local scope of the
 GetI() method is created unique of each FOR iteration.
 
 This solution seems truly ganky to me. There has to be a better way. And
 this is just a simple example. I have many places where I want to be doing
 this with object reference and dynamic event handling. This one simple bumb
 is really holding me back!
 
 Please help!!!
 ...
 Ben Nadel 
 www.bennadel.com
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238310
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: OT: Javascript help

2006-04-20 Thread Tanguy Rademakers
Hi Ben,

I ran into this problem recently - these really helped me out:

http://joust.kano.net/weblog/archive/2005/08/08/a-huge-gotcha-with-javascript-closures

and

http://jibbering.com/faq/faq_notes/closures.html

/t

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238312
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: OT: Javascript help

2006-04-20 Thread Ben Nadel
Cutter,

I like this suggestion:

 objA.currentI = intI;
 objA.onclick = function(){ alert( this.currentI ); }; 

This is actually how I deal with this same problem in Flash Action Script
sometimes. However, in Flash I do it on objects, and in JS it always makes
me nervous to try adding data to an object that doesn't inherently have that
attribute.

...
Ben Nadel 
www.bennadel.com
-Original Message-
From: Cutter (CFRelated) [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 20, 2006 1:00 PM
To: CF-Talk
Subject: Re: OT: Javascript help

Asking your question of my javascipt list, the responses were as follows:

Repsonse 1 
Have you tried this?

objA.onclick = new Function (alert( + intI + ) );

Response 2 
 for (var intI = 0 ; intI  10 ; intI++){   var objA =
document.createElement( div );


Place one var objA; before the loop then remove the var inside.
Redeclaring a variable is a bad practice that will bite you in other
languages.


  objA.onclick = function(){ alert( intI ); };


It's doing its job, it's alerting the value of intI, which is what you left
it. The easiest solution is to add a custom property to the object to hold
the current value of intI:

objA.currentI = intI;
objA.onclick = function(){ alert( this.currentI ); };

Response 3 
 objA.onclick = new Function (alert( + intI + ) );


This should work, but from what I understand new Function (like eval) must
be compiled on the spot, so there's a (however slight) performance hit.
http://userjs.org/help/tutorials/efficient-code


Hope some of this helps

Cutter

Ben Nadel wrote:
 Not really for CF, but though someone here could lend some insight 
 
 There is one problem in Javascript that I cannot seem to get a handle 
 on and it is killling me! I can't seem to get variables to pass by 
 value as I would hope. Take the following example:
 
 for (var intI = 0 ; intI  10 ; intI++){ var objA = 
 document.createElement( div );
 
 // Set the click for the link.
 objA.onclick = function(){ alert( intI ); };
 
 // Set the link into the body div.
 objDiv.appendChild( objA );
 }
 
 Now, in my head, each one of those links, when clicked should alert 
 the appropriate intI value (0, 1, 2, 3, etc.); however, each of them 
 will alert 10 which is the value that broke the FOR loop. It's like 
 they all point to one variable and then get updated for each loop of the
FOR iteration.
 
 I can't seem to find a good solution to this. One method that seems to 
 work, but is poop is something along the lines of:
 
 // Define a function INSIDE this function.
 function GetI( intX ){
 return(
 function(){ alert(intX); };
 );
 }
 
 for (var intI = 0 ; intI  10 ; intI++){ var objA = 
 document.createElement( div );
 
 // Set the click for the link.
 objA.onclick = GetI( intX );
 
 // Set the link into the body div.
 objDiv.appendChild( objA );
 }
 
 This method works as would be expected, though I seem to think that it 
 is doing the exact same thing. It must be something to do with the
scoping.
 Since the intI value is getting passed to a local scope (int GetI()), 
 and then getting passed back, it must be unique (since the local scope 
 of the
 GetI() method is created unique of each FOR iteration.
 
 This solution seems truly ganky to me. There has to be a better way. 
 And this is just a simple example. I have many places where I want to 
 be doing this with object reference and dynamic event handling. This 
 one simple bumb is really holding me back!
 
 Please help!!!
 ...
 Ben Nadel
 www.bennadel.com
 
 
 



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238315
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: OT: Javascript help

2006-04-20 Thread Ben Nadel
TanGuy,

Thanks, I think that first link helped a lot. I see what the guy is saying
(and I forgot that var's all get moved up to the highest scope - its sad
that I used to aide a web-dev class). 

So now, I have something that works in terms of passing around variables
that make sense:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
  titleJavascript Dynamic Variables/title
  script type=text/javascript

function TestClass( strName ){
  this.Name = strName;
}

TestClass.prototype.AlertValue = function( anyValue ){
  alert( this.Name +  is alerting:  + anyValue );
}


function Init(){
  var objContentDiv = document.getElementById( content );
  var objA = null;
  var objTest = new TestClass( Tester );

  // This runs the for loop using a LOCAL scope for each iteration. 
  (function loop( intI ){
var intX = intI;
  
if (intI  10){

  // Create new A element.
  objA = document.createElement( a );
  
  // Set A display properties.
  objA.style.display = block;
  objA.style.backgroundColor = #F8F8F8;
  objA.style.border = 1px solid #33;
  objA.style.padding = 10px 10px 10px 10px;
  objA.style.color = #33;
  objA.style.marginBottom = 15px;
  
  // Create text for the link.
  objA.appendChild( document.createTextNode( I should alert  +
intX +  when clicked ) );
  
  // Set the href.
  objA.setAttribute( href, ## );

  // Set the onclick method.
  objA.onclick = function(){ objTest.AlertValue( intX ) };
  
  // Attach the A to the content.
  objContentDiv.appendChild( objA );


  loop(intI + 1);
}
  
  })(0);
  
}
  
  
// Is the tester class available here (just testing).
alert( objTest is of type:  + typeof(objTest));
  
  /script
/head
body onload=Init();

  div id=content/div

/body
/html 



Thanks for everyone's help. I think I now see the local scoping issue that I
was dealing with before. I will try to return with a better example.

...
Ben Nadel 
www.bennadel.com

-Original Message-
From: Tanguy Rademakers [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 20, 2006 1:19 PM
To: CF-Talk
Subject: Re: OT: Javascript help

Hi Ben,

I ran into this problem recently - these really helped me out:

http://joust.kano.net/weblog/archive/2005/08/08/a-huge-gotcha-with-javascrip
t-closures

and

http://jibbering.com/faq/faq_notes/closures.html

/t



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238316
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Ian Skinner

Does anyone have any ideas about this? I've talked to two other js guys and 
none of us can figure out what's going wrong. I'd really appreciate some input. 
Thanks.


You have to be careful what IE and Firefox calls a child node.  IE only makes 
element child nodes, FF makes everything, including blank lines child node.  
Obviously these types of child node would not have a style, or any other kind 
of, property. 

The fix is to test for the existence of the property, or the type of the child 
node before applying changes to it.

IE View:
div

p--- child node 1 of parent div.

/div

FF view:

div
--- child node 1 of parent div.
p--- child node 2 of parent div.
--- child node 3 of parent div.
/div


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-
| 1 |   |
-  Binary Soduko
|   |   |
-
 
C code. C code run. Run code run. Please!
- Cynthia Dunning



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231203
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Steve Brownlee
I'd suggest adding in an additional check. 


if ( ci.name != undefined  ci.style )
ci.style.display = none;


 -Original Message-
 From: Andy Matthews [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, February 02, 2006 4:17 PM
 To: CF-Talk
 Subject: OT javascript Q: Show/hide divs...works in IE, not in FF.
 
 I've got some code with which I'm working:
 http://www.andyandjaime.com/uploads/div.html
 
 
 function switchDiv(pNode,name) {
   var pNode = document.getElementById(pNode);
   for (i=0;ipNode.childNodes.length;i++) {
   ci = pNode.childNodes[i];
   if (ci.name != undefined) {
   ci.style.display = none;
   if (ci.name == name) {
   ci.style.display = block;
   }
   }
   }
 }
 
 The goal is when I mouseover each of the links, the DIV 
 specified in the
 function call gets shown while all other DIVs get hidden. The 
 code works in
 IE perfectly, but in FF generates the error listed below:
 
 Error: ci.style has no properties
 Line: 23
 
 line 23 being this line: ci.style.display = none;
 
 Does anyone have any ideas about this? I've talked to two 
 other js guys and
 none of us can figure out what's going wrong. I'd really 
 appreciate some
 input. Thanks.
 
 !//--
 andy matthews
 web developer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 
 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231204
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Andy Matthews
So can you test for node.name?

!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 3:24 PM
To: CF-Talk
Subject: RE: OT javascript Q: Show/hide divs...works in IE, not in FF.



Does anyone have any ideas about this? I've talked to two other js guys and
none of us can figure out what's going wrong. I'd really appreciate some
input. Thanks.


You have to be careful what IE and Firefox calls a child node.  IE only
makes element child nodes, FF makes everything, including blank lines child
node.  Obviously these types of child node would not have a style, or any
other kind of, property.

The fix is to test for the existence of the property, or the type of the
child node before applying changes to it.

IE View:
div

p--- child node 1 of parent div.

/div

FF view:

div
--- child node 1 of parent div.
p--- child node 2 of parent div.
--- child node 3 of parent div.
/div


--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-
| 1 |   |
-  Binary Soduko
|   |   |
-

C code. C code run. Run code run. Please!
- Cynthia Dunning





~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231205
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Ian Skinner
So can you test for node.name?


Yes I often do something like:

if (something.childnode[i].nodeName == P)
do something to a paragraph node.

You can also use the test suggested by Steve.
if ( ci.name != undefined  ci.style )
ci.style.display = none;

Or of couse combine both methods if it helps.

--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-
| 1 |   |
-  Binary Soduko
|   |   |
-
 
C code. C code run. Run code run. Please!
- Cynthia Dunning



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231211
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Jochem van Dieten
Andy Matthews wrote:
 
 function switchDiv(pNode,name) {
   var pNode = document.getElementById(pNode);
   for (i=0;ipNode.childNodes.length;i++) {
   ci = pNode.childNodes[i];
   if (ci.name != undefined) {
   ci.style.display = none;
   if (ci.name == name) {
   ci.style.display = block;
   }
   }
   }
 }
 
 The goal is when I mouseover each of the links, the DIV specified in the
 function call gets shown while all other DIVs get hidden.

function switchDiv(pNode,name)
{
var pNode = document.getElementById(pNode);
var cDivs = pNode.getElementsByTagName(div);
var tDiv = document.getElementByName(name);

for (i=0;icDivs.length;i++)
{
cDivs[i].style.display = none;
}

tDiv[0].style.display = block;
}

Jochem

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231216
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: OT javascript Q: Show/hide divs...works in IE, not in FF.

2006-02-02 Thread Andy Matthews
That's VERY elegant Jochem.

Thank you for that code!

!//--
andy matthews
web developer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 4:10 PM
To: CF-Talk
Subject: Re: OT javascript Q: Show/hide divs...works in IE, not in FF.


Andy Matthews wrote:

 function switchDiv(pNode,name) {
   var pNode = document.getElementById(pNode);
   for (i=0;ipNode.childNodes.length;i++) {
   ci = pNode.childNodes[i];
   if (ci.name != undefined) {
   ci.style.display = none;
   if (ci.name == name) {
   ci.style.display = block;
   }
   }
   }
 }

 The goal is when I mouseover each of the links, the DIV specified in the
 function call gets shown while all other DIVs get hidden.

function switchDiv(pNode,name)
{
var pNode = document.getElementById(pNode);
var cDivs = pNode.getElementsByTagName(div);
var tDiv = document.getElementByName(name);

for (i=0;icDivs.length;i++)
{
cDivs[i].style.display = none;
}

tDiv[0].style.display = block;
}

Jochem



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231218
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: OT: Javascript XML parsing

2005-10-04 Thread Robert Munn
try this:

var xmlFile=C:\\test\\menu.xml;

I am successfully parsing an XML document using the javascript below.  I am
running into trouble, however, when I try to parse an xml file that doesn't
exist in the same directory as the calling page.  See inline comments below.

 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:220032
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: OT: Javascript XML parsing

2005-10-04 Thread Paul
Good suggestion, but no dice; same error as the C:/\test/\menu.xml
attempt...

-Original Message-
From: Robert Munn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 04, 2005 10:28 AM
To: CF-Talk
Subject: Re: OT: Javascript XML parsing

try this:

var xmlFile=C:\\test\\menu.xml;



~|
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:220036
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: OT: Javascript XML parsing

2005-10-04 Thread Robert Munn
Oh, brain fart, sorry. Your browser doesn't know about the drive paths. You'll 
need to put the file in a Web accessible folder and refer to it using a Web 
path,
e.g. /test/menu.xml


Good suggestion, but no dice; same error as the C:/\test/\menu.xml
attempt...

-Original Message-
From: Robert Munn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 04, 2005 10:28 AM
To: CF-Talk
Subject: Re: OT: Javascript XML parsing

try this:

var xmlFile=C:\\test\\menu.xml;

~|
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:220043
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: OT: Javascript XML parsing

2005-10-04 Thread Paul
Well that certainly makes sense now that I consider it.  Thanks!

-Original Message-
From: Robert Munn [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 04, 2005 12:12 PM
To: CF-Talk
Subject: Re: OT: Javascript XML parsing

Oh, brain fart, sorry. Your browser doesn't know about the drive paths.
You'll need to put the file in a Web accessible folder and refer to it using
a Web path,
e.g. /test/menu.xml



~|
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:220050
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: OT: Javascript browser compatibility question.

2005-08-11 Thread Jim Campbell
Does it matter if you put the element ID in quotes?

getElementById(CurrentHighlightedCell)...

- Jim

Jeff W wrote:

Can anyone tell me WHY this won't work in NS6.1 but work fine in ie5-6, 
firefox and NS8??

document.getElementById(CurrentHighlightedCell).style.background='#006600';

CurrentHighlightedCell is a variable that contains the current id of the 
TD background color I am changing. 

Thanks..
Jeff




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214584
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: OT: Javascript browser compatibility question.

2005-08-11 Thread Barney Boisvert
NS6 was a bastard that didn't work.  Did you try backgroundColor?

cheers,
barneyb

On 8/11/05, Jeff W [EMAIL PROTECTED] wrote:
 Can anyone tell me WHY this won't work in NS6.1 but work fine in ie5-6,
 firefox and NS8??
 
 document.getElementById(CurrentHighlightedCell).style.background='#006600';
 
 CurrentHighlightedCell is a variable that contains the current id of the
 TD background color I am changing.
 
 Thanks..
 Jeff
 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214585
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: OT: Javascript browser compatibility question.

2005-08-11 Thread Charlie Griefer
if it's a literal ID value, then yes, he'd need quotes.  I'm guessing
it's a variable.

Try backgroundColor (note the casing) instead of background.

On 8/11/05, Jim Campbell [EMAIL PROTECTED] wrote:
 Does it matter if you put the element ID in quotes?
 
 getElementById(CurrentHighlightedCell)...
 
 - Jim
 
 Jeff W wrote:
 
 Can anyone tell me WHY this won't work in NS6.1 but work fine in ie5-6,
 firefox and NS8??
 
 document.getElementById(CurrentHighlightedCell).style.background='#006600';
 
 CurrentHighlightedCell is a variable that contains the current id of the
 TD background color I am changing.
 
 Thanks..
 Jeff
 
 
 
 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:214586
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


  1   2   3   4   >