Thanks Colin, but, there is a space, if you check the source code
page, It didn't fit to well into the post.
As you can see, it works as a HTMLDOM style, almost the same code..
border: this.olc_divborder+'px' +this.olc_bordercol+ 'solid'
there is one space on each side.
The way I read it from the DOCS is that if it works as a HTMLDOM
shorthand method, it should work in setStyle(); ???
The W3 page doesn't show any value/rule references...
I'll try the backgroundImage without the extras - I'm sure I saw an
example somewhere using all though.
The extra $$('head') is not really there, I tried to use that at the
beginning, but it did not work as expected, I just pasted it there on
the end instead of deleting it, just ignore it please....
The actual problem there is that IE wont append data into the the
<style> tag. Firefox woks OK.
-> headElement.appendChild(styleElement); (fails in IE)
I tried the headElement = $$('head') thinking it would extend some
methods on the <head> object to help prototype deal with the IE
business, but to no avail??
I'm wonder is there a way Prototype can deal with this IE
appendTextNode problem??
THat popup is the 4th one down on the right on the sample page if you
want to try it out live..
http://www.imbi.com.au/overlib-clone-mini-prototype-class/overlib-clone-sample.php
Apart from that she works quite well
Can't say more than that.....
Regards and Thanks,
Gilbert R
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
On Jun 1, 11:19 pm, ColinFine <[email protected]> wrote:
> On May 31, 1:37 pm, "Imbi Rehling" <[email protected]> wrote:
>
>
>
> > if(this.olc_divborder) {
> > $(id).style.border=this.olc_divborder+'px solid '+this.olc_bordercol;
> > /* $(id).setStyle({ border: this.olc_divborder+'px' +this.olc_bordercol+
> > 'solid' }); */
> > this.diagnostics('div border set to '+this.olc_divborder+'px');
> > }
>
> In the commented-out code there are no spaces after 'px' or before
> 'solid'.
>
> > The commented out code is not working. Any thoughts???
> > Second Part:
> > if(this.olc_background){
> > $('textDiv').style.backgroundImage="url("+this.olc_background+")";
> > /* $('textDiv').setStyle({ backgroundImage:
> > 'url('+this.olc_background+') top left' }); */
> > this.diagnostics('text area background set!');
> > }
>
> backgroundImage wants only the image. If you want to give more than
> one property, you need to use the other 'backgroundXxx' properties, or
> use 'background' to give them all together.
>
>
>
>
>
>
>
> > No2:
> > I created a method to add a <style> tag into the head and add some
> > selector-rules code into it. Firstly its for the (Click to Close Link) and
> > for generating fixed classes for various popup elements including the new
> > (Feature Selector) method...
> > It works OK in firefox, but, apparently IE has some issues adding a
> > 'textnode' into a style element (tag). I had hoped that prototype would
> > have
> > circumvented this problem??
> > The method called 'add_style" is on line 504..
> > Here is the code I'm using within the method:
>
> > var headElement = document.getElementsByTagName("head")[0], styleElement =
> > document.createElement("style"), selector, rule; /* headElement =
> > document.getElementsByTagName("head")[0], headElement = $$('head') */
>
> In your commented code you're setting 'headElement' twice, and the
> second time you're setting it to an Array, not an Element.
>
> Why not use just use "var headElement = head;" (or window.head if you
> prefer) since there's only one of them?
>
> I haven't looked to see if there are any other errors: these are just
> the obvious ones at the start.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---