Need help with Ajax and Javascript interface

Z

zirconx9

I am working on creating my first ajax enabled interface. I have some
elements on the page that I want to become editable when the Edit
button near them is clicked.

What I have so far works great in Firefox and Opera. Of course IE is
giving me problems.

What happens when the edit button is clicked is that the values that
were being displayed area read from the TD cells by the innerHTML
attribute. The innerHTML of that cell is then replaced with an <input
type='text'> field, with a uniqie ID attribute. When the save button
is clicked, I read from the input element using getElementByID('the
newly created input ID').

The error I get in IE is Object doesn't support this property or
method. It comes from this line: title_input =
document.getElementById("title_input"); title_input is the input tag I
create when I switch to edit mode.

I'm thinking I might need to be doing something with microft's
document.createElement() method. I'm just not sure what. Thanks for
any tips.
 
Z

zirconx9

Sorry, I figured it out. Thought I would post the answer in case
someone else comes across this problem in the future. IE wants a form
tag around the elements in order for it to recognize them. I am not
submitting a 'form' in the traditional sense; the data will be
submitted via the XML http request object. Anyway I put an empty
<form></form> tag around the whole thing and it works in IE now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top