I must accept a color from a textbox and on button click must set new color as the background color. I tried onKlick="document.AppletName.setBackgroundColordocument.form1.textBox.value) I am getting an error : Object does not support this property. i had just started working with LiveConnect , r there any good links for this. Thank You.
I assume that's just a typo, and you really have (i.e., there is an opening parenthesis): document.AppletName.setBackgroundColor(document.form1.textBox.value)
I'm not sure if the error message is about the HTML form or the applet. Do an "alert(document.form1.textBox.value)" before you call the applet method, just to see if the correct value is transmitted.
Also, the setBackgroundColor method must be declared public for this to work.
The Applet FAQ -linked in my signature- has a section on LiveConnect which will get you started. [ January 02, 2006: Message edited by: Ulf Dittmer ]
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
The setBackground color is declared as public and the alert statements are displaying the correct values entered in textboxes.
but still i am getting an error java.lang.Exception:setBackgroundColor(0): no such method exists;
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35232
7
posted
0
What type has the parameter of setBackgroundColor? I'm not sure how well passing integers works - try declaring it as a String, and converting that to int in the Java code.
Venkata Kiran
Ranch Hand
Joined: Sep 06, 2005
Posts: 30
posted
0
ok got an excellent link which almost suits my requirement at www.experts-exchange.com Thnaks You for the Help.
[ link edited by UD to keep the formatting readable ] [ January 03, 2006: Message edited by: Ulf Dittmer ]