my dog learned polymorphism*
The moose likes HTML, CSS and JavaScript and the fly likes Load text field based on another Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Load text field based on another" Watch "Load text field based on another" New topic
Author

Load text field based on another

lakshmi sridharan
Greenhorn

Joined: Nov 01, 2011
Posts: 3
Hi

Consider the following scenario:
Textbox1 button
Textbox2

When i click the button calendar pops up and i select a date which gets load in the textbox1.
After this happens i want textbox2 also to be filled with the a date automatically without user clicking in textbox2.

please help to resolv this.I tried with OnChange() function but it didn work.

thanks
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

There is this library with good samples that may help you: http://javascriptcalendar.org/javascript-date-picker.php


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
lakshmi sridharan
Greenhorn

Joined: Nov 01, 2011
Posts: 3
Hebert Coelho wrote:There is this library with good samples that may help you: http://javascriptcalendar.org/javascript-date-picker.php


Hi,

I don wan calendar objects..instead i need a solution for automatically loading a value in textbox2 when textbox1 is loaded with a value.

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61450
    
  67

Where's your code? What have you tried so far?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
lakshmi sridharan
Greenhorn

Joined: Nov 01, 2011
Posts: 3
Bear Bibeault wrote:Where's your code? What have you tried so far?




In the above code i m using a buttton for second input box which i dont want.
Instead when the first button is clicked i want the value loaded in textbox2.
I tried calling the checkExpirationDate() in first button onclick but it didn work
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61450
    
  67

document.layers? Is this code from 1998? You really need to update your JavaScript knowledge. That's an antiquated reference that simply doesn't exist in most browsers.

And using document.write() is likely the wrong approach as well.

What are you trying to achieve by using these ancient techniques?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Load text field based on another