something like:
opener.parent_form.inputfield.value = document.child_form.inputfield.value;
but if you reload the data is not submitted and thusly it comes back as a
reset form... so you will need to submit it...
opener.parent_form.submit();
//this will reload the parent page:
take a look at irt.org and thier JS faq. there are TONS of code snippets
there.
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 12:31 PM
To: CF-Talk
Thanks guys gals;
Many responses - they all work too! Just FYI - this method is the least
coding which is what I'm always after 8-)
Dave
- Original Message -
From: "Dylan Bromby" [EMAIL PROTECTED]
onLoad="document.formname.fieldname.focus()"
replace formname with the NAME of the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
hi Dave,
In the head of your page:
script
!--
function setfocus() {
document.form.focus();
}
// --/script
In the body:
onLoad=setfocus()
and your form...
form action="whatever.cfm" method=get name="form"
HTH
Aaron Johnson, MCSE, MCP+I
Is there a way to force the focus to a form field (text field) onLoad?
Yes
body onload="document.forms[0].fieldname.focus()"
Nick
**
Information in this email is confidential and may be privileged.
It is intended for the
Yes.
body onload="document.{formname}.{formfield}.focus()"
Formname is the name of the form or if you have more than one use the array
position for it such as form[0] for the first form, form[1] for the second
and so forth because js arrays start at 0. Formfield is the input field name
you want
script
document.formname.formfield.focus();
/script
Which gets me on a thought that has been bouncing around inside my skull for
the last couple days. Just ignore me if this sounds crazy, but I was
thinking of something along the lines of a "template" scope for CF would be
cool. It would work
window.onload = document.FORMNAME.FIELDNAME.focus
or sumthin like that
-Original Message-
From: David Hannum [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 10:13 AM
To: CF-Talk
Subject: OT: JS Question
Hello,
Is there a way to force the focus to a form field (text
This should do the trick. Of course, modify the object names using your
real form and form element names.
function init() {
document.myFormName.myFormElementName.focus();
}
body onSubmit="init();"
Jeff Beer
Senior Programmer Architect
Hydrogen Media, Inc
(727) 530-5500 x303
[EMAIL
ONE WAY WOULD BE:
html
head
titleUntitled/title
SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
!--
function forceFocus() {
document.myForm.myTextBox.focus();
}
--
/SCRIPT
/head
body onLoad="forceFocus();"
form name="myForm" action=""
onLoad="document.formname.fieldname.focus()"
replace formname with the NAME of the form and fieldname with the NAME of
the field you want to focus on.
--Dylan
-Original Message-
From: David Hannum [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 8:13 AM
To: CF-Talk
Subject:
ONE WAY WOULD BE:
html
head
titleUntitled/title
SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript"
!--
function forceFocus() {
document.myForm.myTextBox.focus();
}
--
/SCRIPT
/head
body onLoad="forceFocus();"
form name="myForm" action=""
Dave,
Try:
script language=javascript type="text/javascript"
!--
function onBodyLoad() {
document.formname.fieldname.focus();
}
// --
/script
Scott Brader
Prairie Software Development LLC
101 E. Sadd Street
PO Box 235
North Prairie, WI 53153-0235
Phone: 262.392.9173
Fax: 262.392.9174
yes.
onLoad="docment.form.controlname.focus();" in the BODY tag.
www.irt.org has GREAT JS resources.
chris olive, cio
cresco technologies
[EMAIL PROTECTED]
http://www.crescotech.com
-Original Message-
From: David Hannum [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 11:13
101 - 114 of 114 matches
Mail list logo