Click here to Skip to main content
15,905,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Scenario: My Client is having a HTML drag and drop editor. I have to implement something that differentiates a particular set of HTML controls on his webpage(into which he enters our address tag) from already existing controls(belongs to his company).

My Idea:Give him a custom control which always has specific Tag or Id to differentiate from already existing controls on webpage.

Question:
Can i create custom HTML controls (all elements like textbox, table, input field etc) and submit the control to him, so that when ever he drags and drops the custom control, the ID is always CustomTextBox1, CustomTextBox2...; CustomTable1, CustomTable2...; CustomFile1, CustomField2 depending upon n no of elements he drags and drops?

How can i create it, please give me an example.
Posted
Updated 18-Jul-12 3:01am
v2

1 solution

This is not a HTML question. You can't do this using only HTML, you'd have to use javascript at least. But, if your javascript is creating controls, you can set them with any id you like, clearly.
 
Share this answer
 
Comments
amarasat 18-Jul-12 9:05am    
I understand what you were saying, i can change the id of the control in runtime, but how would i know which controls id to change, i need to differentiate in which control he enters our address tag.

I think my question is to know how to create a custom HTML control and submit the control to them, so that whenever he drags and drops that control, i should set the id?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900