Cheers for the advice, I'll use those methods in future. :) 2008/10/13 Jason Morris <[EMAIL PROTECTED]>: > > As a rule of thumb, never setAttribute, when there is a property for that > element that does the same job. For example, use setClassName() instead of > setAttribute("class", ...), and getStyle().setProperty() instead of > setAttribute("style"). > > IE has problems handing setAttribute with any "special" values. So even when > it > comes to setting the URL for an image, rather use the setSrc() method in > ImageElement. > > I wish someone had told me this earlier when I started coding JavaScript :P > > darkflame wrote: >> That method worked, I wasnt aware of that method of doing it. >> Cheers! :) >> >> My own method, incidently, always worked in Firefox, and firebug >> simply showed "opacity: 0.65;" for the style, without the >> "alpha(opacity=65);" for IE present at all. >> >> >> On Oct 13, 2:10 am, Paul Robinson <[EMAIL PROTECTED]> wrote: >>> What happens if you try: >>> >>> Style style = temp.getElement().getStyle(); >>> style.setProperty("filter", "alpha(opacity=65)"); >>> style.setProperty("opacity", "0.65"); >>> >>> firebug will tell you what style is in force for each element >>> >>> HTH >>> Paul >>> >>> >>> >>> darkflame wrote: >>>> I'm trying to make a standard image have a code-dependant uniform >>>> transparency background, and for it to work across all browsers. >>>> Doing this in css is easy, and works, but GWT seems to not be having >>>> it. >>>> I'm using simply; >>>> temp.getElement().setAttribute("style", "filter: alpha(opacity=65); >>>> opacity: 0.65"); >>>> Where temp is just an image. >>>> This doesn't seem to have any effect, but I'm not sure why. >>>> The same style code in CSS works, does it have to be different when >>>> applied this way? And what referance do I look at to see the changes >>>> made? >> > >> > > > > >
-- ~~~~~~ Reviews of anything, by anyone; www.rateoholic.co.uk Please try out my new site and give feedback :) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---