Jump to content

adding an image in a cell


muthulakshmi

Recommended Posts

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

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.

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...