Anoop Pillai

Greenhorn
+ Follow
since Oct 05, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anoop Pillai

You can apply a style="display:none;" to the hidden field. By doing this it won't take up the extra space.
Ex: <input type="hidden" value="text" name="hid1" id="hid1" style="display:none;">
Hi ,
I have been using GWT from last 3-4 months. One of the problem I faced a lot initially was of debugging.
I was able to debug the code in development mode for GWT1.7, but for GWT2.0 it didn't allowed me to debug.
The breakpoint was always ignored. So we have to move back to GWT1.7.
Is there any way to debug the code in GWT2.0 and above?

Thanks in advance
14 years ago
GWT
Hi Li,

This is a bug in IE7. Basically in IE7 the browser doesn't generate the name attribute for radio button when its created dynamically.
To check that, just open the HTML file in your IE7 browser and after the file is loaded just type in address bar(in one line):
javascript:alert(document.getElementById('radioDiv').innerHTML);

Now you can observe in the alert that the radio input element doesn't have the name attribute; so its not behaving properly.

I suggest if you want to create radio buttons dynamically either go by Eric's suggestion:

This code here [view source] solves the browser quirk: http://www.pascarello.com/examples/createElement.html



Or you can simply use innerHTML, for ex:



Hi Kalyen,

You can surround the code for sending email and sms with 2 different try-catch blocks.
Ex:



14 years ago
Can you copy the code into a separate HTML file and see whether its working, may be the file in which you are including this code have other javascript errors and because of this the radio button code is not executing properly. So just trying copying this into a separate HTML file and see whether it works.

This code works fine with me; I have tested it on Mozilla Firefox 3.6.3 and Internet Explorer 8

Can you let us know which browser(along with version) are you testing it on?

Li Jenny wrote:thanks for your help.


but when i check another radiobutton, it seems can't appear checked.
the checked always appear in the first radio button. can't choose second one.
why?




In the code the first radio button was checked using:


Similarly for checking the second radio button you would have to put:


Also you would have to remove the check code from the first radio button otherwise both the radio buttons will be checked by default.
Hi Li,

Try the below javascript code.


Thanks all for the help..
I was trying to call displayClass() using the super class object in the subclasses.
For Ex:
//in class C
A obj=new A();
obj.displayClass();

instead of calling it as
C obj=new C();
obj.displayClass();

that's why it was not working for me...


thanks all for replying.
16 years ago
Hi,
I have a superclass which is extended by 'N' number of classes. Now I have modified a method in the superclass to get the name of the calling subclass.
Is there any way through which my superclass method shall get its subclasses class name?

(Note: I can't modify my subclasses code; I can only modify the existing method written in the superclass which is called by all other subclasses.)

For Ex:



Here when class B,C & D is executed, it calls the super class method displayClass() and it should print the name of the respective class which is calling the method i.e., Class B,C & D respectively.

Can anybody tell me how will I achieve this in the superclass method displaClass() without overriding the method in the subclass or passing anything as argument to the superclass method i.e., without touching the code in the subclasses?

Thanks in advance.
16 years ago