Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
StokeyTCI #1
setting focus
K I got a huge form with multiple postbacks done in javascript, I hope im just
doing something stupid, or overlooking a simple CF trick. I need to set the
focus after the postback, only my function doesn't keep control after the
postback. here is my code example function postback1(){ if
(isblank(form1.actnum.value)){ alert('Must select a
account first!'); form1.actnum.focus();
return false; } else{ document.form1.action =
'orderformh4.cfm'; document.form1.submit(); document.form1.promo.focus;
} } and here is the page my code is on, don't be to brutal im
just now debugging it ;-)
[url]http://www.tirecenters.com/T3/form/orderformh4.cfm[/url] The end result of the input
is a print quality PDF for dealers to create there own coupons to be sent to
the newspapers. BTW suggestions would be nice
StokeyTCI Guest
-
Setting Focus in UserControl
I have an editable datagrid as part of a usercontrol. When I click the Edit button, I wish for focus to be set on the first control, a... -
setting focus from one textInput to another
Hello Everyone I am using flash mx 2004 professional. What I am trying to do is give focus to a text box based on some criteria of another text... -
setting and changing focus
I am having a brain dead day and can not remmember how to do the following: I have a Flash Form and I want to change and set the focus for fields... -
Setting focus..?
Hi all, I have a Webform with some textboxes on. How can I set the focus so that a user can start the input directly in the first textbox in... -
setting focus to textbox
Hello, Can someone tell me if/how I can set the focus to a textbox so when the page loads the cursor is placed in the textbox and the user can... -
StokeyTCI #2
Re: setting focus
O yeah postback1 fires after selecting an account I want focus to go the the promotion select
StokeyTCI Guest
-
StokeyTCI #3
Re: setting focus
Guess ill just wrap the body tag in cf if's and have focus set based on what fields are/are not defined, was hoping there was some cf way to do it
Cheers
Chris
StokeyTCI Guest
-
StokeyTCI #4
Re: setting focus
Well that didn't work says element postcount isn't defined in form but I don't
understand since it is wrapped in an isdefined
<body
<cfif isdefined(#form.postcount#)>
<cfif #form.postcount# is 0>
onLoad="document.form1.acolor.focus();"
</cfif>
</cfif>any ideas?>
StokeyTCI Guest
-
StokeyTCI #5
Re: setting focus
im assuming its beause im imbedding CF inside Javascript right?
so does that mean if I do the if in javascript instead of cf it should work?
guess Ill try that
StokeyTCI Guest
-
StokeyTCI #6
Re: setting focus
K so much for that, still won't allow me to assign focus,
function wfocus() {
alert("function called");
form1.acctnum.focus();
}
<body onLoad="wfocus();">
I get the alert, clear the alert and then I get a java error, I'm at my wits
end.
Any ideas ?
Anyone?
ECHO
ECHO
Cheers
Chris
StokeyTCI Guest
-
Kronin555 #7
Re: setting focus
the isDefined call doesn't work because you're supposed to pass it a string
representation of your variable, not the variable in pounds.
You put:
isDefined(#form.postcount#)
it should be:
isDefined('form.postcount')
Kronin555 Guest
-
StokeyTCI #8
Re: setting focus
OMG I can't believe I spent a day and a half, because of a typo
Thanks Bra
Chris
StokeyTCI Guest



Reply With Quote

