Oh, sorry. Senior moment here...

Walter

On Apr 20, 2010, at 12:43 PM, T.J. Crowder wrote:

@walter:

It's a shame that Firefox doesn't allow this. I was hoping to style an
input type=search using this trick.

Just the normal styling rule works find on my copy of Firefox (v.
3.6.3)

input[type=search]
{
        background-color: red;
}

-- T.J. :-)

On Apr 20, 5:18 pm, Walter Lee Davis <wa...@wdstudio.com> wrote:
It's a shame that Firefox doesn't allow this. I was hoping to style an
input type=search using this trick.

Walter

On Apr 20, 2010, at 12:11 PM, T.J. Crowder wrote:





@Jelks:

What Alex is saying that IE has the ability to let you *tell it* that
that's really an element. At the very beginning of your doc (in the
head section, ideally), put in this script element:

<script type='text/javascript'>
document.createElement("AsyncException");
</script>

It may seem surprising, but your doing that adds to IE's element
vocabulary. Now, for the rest of the parsing of that page, IE will
know that "AsyncException" is a valid tagname for an element and will treat it as one. Note that the script needs to be inline and evaluated at the beginning, because this affects how IE parses the document (if
you do it after that bit's already been parsed, you'll still get the
structure you've been fighting with).

And once it's a normal element, it's a normal element susceptible to
styling, discovery by tag name, etc.:

<style type='text/css'>
AsyncException
{
   display: none;
}
</style>

<script type='text/javascript'>
document.observe("dom:loaded", function() {
   $$('AsyncException').invoke('remove');
});
</script>

So what I'd do is put in the style rule (so there isn't even a brief
moment people will see the text), and put in a script tag at the
beginning with the `createElement` call and setting up the dom:loaded
handler to actually remove it when the DOM is ready.

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com

On Apr 20, 4:44 pm, Jelks <jelks.caban...@gmail.com> wrote:
On Apr 20, 10:41 am, Alex Wallace <alexmlwall...@gmail.com> wrote:

The non-HTML element can be tricked into appearing to be an actual
HTML
element if you use:

document.create("fakeElementTagName"); somewhere on the page. Once
that's
done, IE will treat <fakeElementTagName>foo-bar</
fakeElementTagName> as an
actual DOM element, and you should be able to remove it using
regular DOM
helpers. (e.g. parentNode.removeChild, or Prototype's .remove();)

Thanks Alex, so you're saying that with this toward the beginning of
the <form ...>:

    <AsyncException>Error occured during AsyncInvocation.</
AsyncException>

which appears in the IE DOM as

    ASYNCEXCEPTION
    #text  ("Error occured during AsyncInvocation.")
    /ASYNCEXCEPTION

(where those are *three nodes* (!) and not *one element*), and which
shows this at the top of the page:

    Error occured during AsyncInvocation.

that if I do

    document.createElement("ASYNCEXCEPTION");

it will somehow overwrite those three nodes???

Thanks,

Jelks

--
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 prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en
.

--
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 prototype-scriptaculous@googlegroups.com
.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
.
For more options, visit this group 
athttp://groups.google.com/group/prototype-scriptaculous?hl=en
.

--
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 prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group athttp://groups.google.com/group/prototype-scriptaculous?hl=en .

--
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 prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en .


--
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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to