Wednesday, December 13, 2006

Error: Object doesn't support this property or method

I was wondering for quite a while when I hit a javascript error. It stated "Error: Object doesn't support this property or method". The error was in this function, the line which has the word action:

function InsertRecord(){

var myForm = document.form1;

myForm.action="xxxxxxxxxxxx";
myForm.submit();
}

Lucky for me, my sifu, Steven, helped me out on this. My problem was actually a simple and silly error. What I done wrong was:

<button name="action" value="Attachment">

I have actually define one of my button in the form with the name of "action". After changing the name to a more meaningful one, it works once again. :-)

6 comments:

steven said...

pls accept the fact that i'm not qualified to be ur sifu, furthermore, u can be my sifu. anyway, if you really need a sifu, i got a good recommendation for u.

Gary Chee said...

Sifu (師傅 or 師父; Pinyin: shīfu) is a Cantonese term for a master or teacher. It is most commonly used in martial arts schools. The character 師 means “teacher”. The meaning of 傅 is “tutor” and of 父 “father”, both characters are read fu with the same tones in Cantonese and Mandarin, creating some ambiguity. (from wikipedia)

So Steven, see the 傅? It means tutor... so if compare your experience with me, you are so much more eligible. Just a tutor, why so 介意?

Anonymous said...

wuahaha...

steven said...

i will be damn happy to be anyone sifu if i'm qualified to be one, but i feel bad when people call me sifu while i'm not

Gary Chee said...

Don't get it wrong. While the Chicken Rice man calls you "Ah Sai", it doesn't make you a boss too. He respect you as a buying customer, so he call you "Ah Sai".

As well as we call you "Sifu" because we respect you and you are giving us advice, not because you are qualify or not.

Anonymous said...

Steven, chinese said......一天为师, 终身为师!