473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Click event of a dynamically created input box array

Hi,

Iam trying to invoke a javascript calendar in the click event of an input box.
The input box is an array created dynamically. But the clicking does not works correct. I think the problem is with the text which is made bold below.
Please help me.

Here is the code segment:

echo "<input name='eddate[]' id='eddate[]' type='text' size='15'
value='$ddt' onClick='displayCalendar(document.frmprocess.eddat e[],'yyyy-mm-dd',this)'>";

Pls tell me is it right to name it as 'eddate[]' .
thanx in advance...
appu
Dec 14 '07 #1
3 1907
acoder
16,027 Expert Mod 8TB
If you need to name your form elements with '[]' because of PHP, that's fine, but don't use them in IDs. You could just pass 'this' to the function.
Dec 14 '07 #2
If you need to name your form elements with '[]' because of PHP, that's fine, but don't use them in IDs. You could just pass 'this' to the function.

Hi,

Iam a beginner in web development..Pls tell me how to write that click event that means wht to specify after document.form.-----.

Thank u very much for the reply...
Dec 15 '07 #3
acoder
16,027 Expert Mod 8TB
Change the id to "eddate" and use document.getElementById("eddate") to access the element. However, since you're using onclick inline, you can just pass this and it should work. I don't know why you're also passing 'this' as the third argument.
Dec 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: NewmanBT | last post by:
As you can see from the code below, several textboxes will be dynamically created and each will be tied to an org. The ChangeComment function should allow for an update to the database whenever...
2
by: Liqun Xu | last post by:
Hallo NG, I created a Button with Click-Event dynamically: System.Web.UI.WebControls.Button bt_1 = new Button(); bt_1.Click += new EventHandler(bt_1_click); and I implemented the Funktion...
6
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new...
11
by: Terry Olsen | last post by:
How can I catch a right-click on a DropDownMenuItem?
11
by: skumar434 | last post by:
Hi everybody, I am faceing problem while assigning the memory dynamically to a array of structures . Suppose I have a structure typedef struct hom_id{ int32_t nod_de; int32_t hom_id;
4
by: assgar | last post by:
Hi I am stuck on a problem. I use 3 scripts(form, function and process). Development on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. The form displays...
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
4
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi, I have built a custom control button which inherits from WebControl and implements IPostBackEventHandler. The control also declares an event Click and provides a method OnClick which invokes...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
1
by: Appu2008 | last post by:
Hi, Iam trying to invoke a javascript calendar in the click event of an input box. The input box is an array created dynamically. But the clicking does not works correct. I think the problem...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.