muthulakshmi Posted March 28, 2006 Share Posted March 28, 2006 hi,How to add an image and a textbox in a same cell using javascript?i have a situation where i have to include a calendar image in a cell along with a textbox.note : when a date in the calendar is selected th date should appear in the textbox.Please helpThanksMuthulakshmi Link to comment Share on other sites More sharing options...
Rachit Shah Posted March 28, 2006 Share Posted March 28, 2006 Use <div id=myId> inside the cell.Now get div element in javascript using getElementById("myId").use .innerHTML = "<input><img >"If this is not a hint to the solution, I think you should be more clear on the problem. Link to comment Share on other sites More sharing options...
muthulakshmi Posted March 28, 2006 Author Share Posted March 28, 2006 Use <div id=myId> inside the cell.Now get div element in javascript using getElementById("myId").use .innerHTML = "<input><img >"If this is not a hint to the solution, I think you should be more clear on the problem.<{POST_SNAPBACK}> hi,Thanks.My code looks like.., var dateimg = document.createElement('input'); dateimg.setAttribute("type", "image"); dateimg.setAttribute("align", "absmiddle"); dateimg.setAttribute("name", "dateimg"); dateimg.setAttribute("id", "dateimg"); dateimg.setAttribute("src", "dynCalendar.gif"); cellRightIndex.appendChild(dateimg);Now i have a Calendar image in a cell. i want to add a textbox and when a date is selected , the textbox should show the date.ThanksMuthu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now