| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
There's as many ways to do this as there are developers. The answer in this case is yes, and...
You could also do this unobtrusively, with no need to mark anything up in the view.
//in the head
<script src="" type="text/_javascript_"></script>
<script type="text/_javascript_">
Event.observe(window,'load', function(){
new Form.Element.Observer('print_name',
0.3,
function(elm,value){
$('i_name').value = value;
}
);
});
</script>
//in the body
<input id="print_name" name="print_name" type="text" />
<input id="i_name" name="i_name" type="text" />
This sets up an observer that watches the first element for any changes, and every 300 milliseconds updates the second element with the current value of the first.
You can learn more about Prototype here: http://prototypejs.org
Walter
On Apr 3, 2008, at 7:37 PM, Robert Poland wrote:
Hi,http://lists.apple.com/mailman/options/web-dev/email@hidden
Maybe I'm misunderstanding all the kind help here.
Should a line like this work or do I need to call a function?
<input name="print_name" id="print_name" type="text" style="height:25px; width: 400px;" value="print_name" size="8" maxlength="32" = print_name.value" />
On Apr 3, 2008, at 3:21 PM, John Jarrard wrote:
Hi Bob,
Use an onkeyup or onblur event...
JJ
On Apr 3, 2008, at 3:20 PM, Robert Poland wrote:
Hi,
On a form I wish to fill field2 with a value I am typing into field1.
I realize I can do this with an onclick but isn't there a way to , for instance do it with onreturn?
Bob Poland - Fort Collins, CO
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden
This email sent to email@hidden
Bob Poland - Fort Collins, CO
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Web-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/web-dev/email@hidden
This email sent to email@hidden
_______________________________________________ Do not post admin requests to the list. They will be ignored. Web-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/web-dev/email@hidden This email sent to email@hidden
| References: | |
| >Fill another field, Javascript (From: Robert Poland <email@hidden>) | |
| >Re: Fill another field, Javascript (From: Robert Poland <email@hidden>) | |
| >Re: Fill another field, Javascript (From: Walter Lee Davis <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.