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
_
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
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
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);
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
-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
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
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
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:
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
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
Mark:
Is the innerHTML property an option? that'd handle the br /s much easier.
On 5/10/05, Mark A Kruger [EMAIL PROTECTED] wrote:
I want to manipulate the innerText property of a div tag. It works fine
except that I can't seem to put in a linefeed or break. I tried all the
following
(not tested) :)
div id=displayValue/div
select name=FrameWidth1 style=font-family:arial, helvetica;
font-size:11px; onchange=changeDisplay(this.options[this.selectedIndex
].value);
cfloop index=i from=0 to=40
option value=#i##i#/option
/cfloop
script type=text/javascript
function
You're exactly right. It's kind of like the IIF() function in CF.
(condition) ? (do if true) : (do if false);
cheers,
barneyb
On Mon, 24 Jan 2005 10:33:30 -0800, Rebecca Wells
[EMAIL PROTECTED] wrote:
Can anyone tell me please what do question marks and colon symbols
signify in a javascript
F.value = S 0 ? ?? + F.value : (new Date(2000, 0, 1, S[0],
S[1])).USlocaltimeStr();
IIRC, if the bit before the ? is true, return the value before the
colon; else return the bit after the colon.
--Ben
~|
Find out how
My guess is that this is some kind of shorthand for an if-then-else
Your guess is right.
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
Javascript supports what they call, the trenary operator (hopely called it
right).
var result = comparison ? true value : false value;
So you can do
if(a == b){
return true;
}else{
return false;
}
or
return a == b ? true : false;
or for the diehard javascript lovers.. *wink*
I'd say each select should have the same onchange call (
) where the checkSels() function will
check every select box and validate that they didn't duplicate a
selection. If they did, then send them back to the one they came from
(which is why you're passing the changed select box into the
Because your needs are so specific. I think you're going to have to create your own JS Functions that will prevent these select menus from displaying certain values.
It's too complex to do it inline like that.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User
I have a money field that needs to be greater than $0.01.
The field may
or may not contain a dollar sign ($) and may or may not
contain a period
(.) as a dollar/cents split. When the form loads the
default value is
$0.00
What would be the easiest way to verify the amount is
greater than
You should be able to just change screenX and screenY to place the upper
left hand corner of the popup anywhere you want.
--Ben Doom
Eric Creese wrote:
Here is the code I use to call a popupwindow. I want to beable to place the smaller
popup window where I want, pereferabley in the lower
Mario,
try doing this.
document.selectedIndex == null
I believe that will tell check if the user has selected anything in the
drop-down box.
Hope this helps.
From: Ciliotta, Mario [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: OT: JavaScript
Mario,
try doing this.
document.selectedIndex == null
I believe that will tell check if the user has selected anything in the
drop-down box.
Hope this helps.
From: Ciliotta, Mario [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: OT: JavaScript
Subject: Re: OT: JavaScript question??
Mario,
try doing this.
document.selectedIndex == null
I believe that will tell check if the user has selected anything in the
drop-down box.
Hope this helps.
From: Ciliotta, Mario [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk
Mario,
try doing this.
document.selectedIndex == null
I believe that will tell check if the user has selected anything in the
drop-down box.
Hope this helps.
From: Ciliotta, Mario [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: OT: JavaScript
Hand is not valid css2, use pointer, ie
IMG {
cursor : pointer;
}
I'm pretty sure 'hand' only works on ie. It deffinatley doesn't work on
Mozilla/NS6+
-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]
Sent: 22 July 2003 22:20
To: CF-Talk
Subject: Re: OT JavaScript
Yeah, it's the only one I could think of without opening Topstyle. I guess
I'm colonised by Microsoft.
- Original Message -
From: Craig Dudley [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, July 24, 2003 1:04 AM
Subject: RE: OT JavaScript question
Hand is not valid
supps. you can with css
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=css+mouse+pointer
s
gives you this
http://www.stewshack.com/css/mouse.asp
tony weeg
uncertified advanced cold fusion developer
tony at navtrak dot net
www.navtrak.net
office 410.548.2337
fax 410.860.2337
Well, the default behaviour is that you define a cursor e.g.
IMG {
cursor : hand;
}
in your stylesheet so that anything pointing to given screen element will
use that pointer. Or do you want the pointer to stay permanently changed?
Matthew Walker
Electric Sheep Web
, safe spam protection at http://www.cloudmark.com/spamnetsig/}
-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 22, 2003 2:20 PM
To: CF-Talk
Subject: Re: OT JavaScript question
Well, the default behaviour is that you define a cursor e.g.
IMG
At 11:41 AM 01/16/03 -0500, Lofback, Chris wrote:
Use formField.focus();
I tried this. No soap. Interestingly enough, it works in NS 4.8, but not
in IE 6.0.2800.1106 (love that numbering scheme.)
And I just tried it on another machine with IE 5.5, and the same
thing. The alert displays, but
: -OT- Javascript Question - follow up
At 11:41 AM 01/16/03 -0500, Lofback, Chris wrote:
Use formField.focus();
I tried this. No soap. Interestingly enough, it works in NS
4.8, but not
in IE 6.0.2800.1106 (love that numbering scheme.)
And I just tried it on another machine with IE 5.5
say your What do you name the variable in your function definition?
function VerifyCode(thisField){
alert(thisField.name);
}
That should work.
Tim
-Original Message-
From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 9:13 AM
To: CF-Talk
Subject:
you can use this.name
Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Company (VICO) Application Demo
www.scorpiosoft.com/vicodemo/login.cfm
- Original Message -
From: Thane Sherrington [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent:
tAt 09:16 AM 01/16/03 -0500, Timothy Heald wrote:
say your What do you name the variable in your function definition?
function VerifyCode(thisField){
alert(thisField.name);
}
That should work.
Excellent. Thanks.
T
At 09:16 AM 01/16/03 -0500, Timothy Heald wrote:
function VerifyCode(thisField){
alert(thisField.name);
}
This worked, but now I'm having a problem with the focus. I'm using the
following script.
SCRIPT language=Javascript
function VerifyCode(formField)
{
Use formField.focus();
Chris Lofback
Sr. Web Developer
TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL 33761
www.trxi.com
-Original Message-
From: Thane Sherrington [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 10:40 AM
To: CF-Talk
Subject: RE: -OT- Javascript
The to programming is not to repeat. Anyway, you can call a function from
a function.
function a (){
b();
}
function b (){
alert hi;
}
On Wed, 12 Dec 2001, Double Down wrote:
I have several different Java Scripts that I want to run at once. All of
them have to deal with
function master(){
f1();
f2();
..
fn();
}
or am I missing something?
- Original Message -
From: Double Down [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 6:31 PM
Subject: OT JavaScript Question
I have several different Java
Javascript is client side so it is executed on after all CF code is
executed, so cflocations are irrelavant to javascript. It doesn't matter
if you cflocated, meta refreshed, or teleported to the currently loaded
document. The document.location property will always return the current
url.
Try
function test(controlnum) {
var theObject = eval( document.forms[0].interest + interest );
theObject.value = theObject.value + 1;
}
If it's a text input that you're using, you might have to convert the values
between string and integer, something like
theObject.value =
Andy
Does this work?
function test(controlnum) {
elt = document.forms[0][interest + interest];
elt.value = parseInt(elt.value) + 1;
}
Nick
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 12:18 PM
To: CF-Talk
Subject: OT Javascript
[mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 12:32
To: CF-Talk
Subject: RE: OT Javascript question
Andy
Does this work?
function test(controlnum) {
elt = document.forms[0][interest + interest];
elt.value = parseInt(elt.value) + 1;
}
Nick
-Original Message-
From: Andy Ewings [mailto
parseInt() is a method of the String object, so try
elt.value = elt.value.parseInt() + 1;
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 13:58
To: CF-Talk
Subject: RE: OT Javascript question
MopeI tried this Nick but it kept complaining
To: CF-Talk
Subject: RE: OT Javascript question
parseInt() is a method of the String object, so try
elt.value = elt.value.parseInt() + 1;
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: 24 May 2001 13:58
To: CF-Talk
Subject: RE: OT Javascript question
MopeI tried
I had to do a lot of form mathematics with javascript, and in order to
force the fields to recognize the fields as numerics instead of strings, I
had to parsefloat() around the value.
So my form fields looked like this.
parseFloat(document.form.field.value) + 1;
In your case, you may have
Yes you can, it's call the 'Event Object'. Although NN and MSIE are
dramatically different in the way that they handle this currently (not sure
about Netscape 6).
Steven Semrau
SRA International, Inc.
Senior Member, Professional Staff
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Com: (703) 805-1095
i know there is in NS but i'm not sure about IE
in NS you can enable event capturing and inherent to that is the type of
event. i.e., a key stroke and the key depressed
see developer.netscape.com for more on this
script
document.captureEvents(ONKEYPRESS);
function myHandler(e){ //where e is
In IE4 and up event.keyCode(13) is the enter key
- Original Message -
From: [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Friday, April 20, 2001 12:45 PM
Subject: Re: OT Javascript question
i know there is in NS but i'm not sure about IE
in NS you can en
You have to use Style sheets.
select name="selectfield" style="font-size:xx"
Stuart Duncan
MaracasMedia Inc.
At 12:41 PM 9/15/00 -0500, you wrote:
Anyone know how code the size of the font for text in a dropdown box.
I know it works for Netscape.but I'm looking for an IE solutions.
ubject: RE: (OT) Javascript Question
Now will this make it so they can't click the sumit image again?
Bob Everland
-Original Message-
From: John Andrichak IV [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 12:54 PM
To: [EMAIL PROTECTED]
Subject: Re: (OT) Javascript Quest
Now will this make it so they can't click the sumit image again?
Bob Everland
-Original Message-
From: John Andrichak IV [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 12:54 PM
To: [EMAIL PROTECTED]
Subject: Re: (OT) Javascript Question
Why don't you check to see
Since you're using dynamic pages I would just add
the current template to the href as in location.href =
"index_test.cfm?page=pageyoureon
and then use that param to decide what pages to include in your frame
you could probably even use the cgi_referer in the index.cfm if you don't
like the idea
53 matches
Mail list logo