...

View Full Version : Konqueror and Opera Problems



prattmic
12-16-2006, 10:28 PM
I am creating a chat script that uses PHP and Javascript. For part of it I need to empty one of the text boxes. The scripts I use work fine in IE and Firefox, however the the text box will not clear in Opera and Konqueror. I have tried the follwoing:

document.getElementById('commentbox').innerHTML = '';
and

document.chatform.comment.value = "";

Like I said they are both fine in IE and Firefox, but not in Konqueror or Opera. I have searched for hours looking for code that will work.

Thanks in advance.

Arbitrator
12-16-2006, 10:57 PM
What kind of element is commentbox? Have you tried document.getElementById("commentbox").value? Your first example makes use of code proprietary to Microsoft (innerHTML) and the second uses what I believe is the traditional, non‐standard method of selecting elements.

prattmic
12-16-2006, 11:01 PM
commentbox is a <textarea> with the id "commentbox".
document.getElementById("commentbox").value
does not work either.

vegu
12-16-2006, 11:03 PM
document.getElementById('elementid').value = '';

works for me in ie, moz and opera, cant test konqueror



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum