If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Basic Ajax Routine (get & post) : basic question

3) Describe problem:
I'm successfully calling a perl script using post method. So far so good.
I'm not a javascript programmer and using sample, the result is displayed using an alert command/box.
Knowing I have defined a div section with id=postresult, how do you replace the javascript alert command with another one to put myajax.responseText in postresult.
I tested
document.getElementById(mercimsg).innerHTML=myajax.responseText and many other thing ....

Going further: how do you test the first word in myajax.responseText is "Error" so you can display the response in an alert box (as it does now) otherwise display it in div