Thanks for the comment, I wrote this in notepad and did not check for,
or .. didn't care if it complied with standards, instead of name tag
any tag can be used.like ID etc.
The whole point was to provide an example on which someone could
expand on.

On Aug 21, 7:31 pm, SeViR <[EMAIL PROTECTED]> wrote:
> You have the response. If you read quietly the xhtml11-strict.dtd you
> will find that
> name attribute is not correct for a div, and only is for a input. You
> can use a class by
> example if your elements are repeated.
>
> So your example is not correct. Also, name in form elements is
> deprecated to using
> in JavaScript, is only for submit forms. In JavaScript you must use ID's.
>
> NccWarp9 escribió:
>
>
>
> > Tried to find an example how to do this but found none.
>
> > Search for DIV by NAME tag while typing
> > Hide all divs but show only the ones that contain the search string.
>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> >www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
> > <head>
> >            <script type="text/javascript" src="jquery.js"></script>
> >            <script type="text/javascript">
> >                    function search(val2){
> >                            $("div").hide();
> >                            $("[EMAIL PROTECTED]"+val2+"]").show();
> >                            $("#lop").html(val2);
> >                    }
> >            </script>
>
> >    </head>
> >    <body>
>
> > <form>
> > <input onkeyup="search(this.value);" >
> > </form>
> > <div id="lop"></div><br>
>
> > <div name="abc">ABC</div>
> > <div name="fds">FSD</div>
> > <div name="rwe">REW</div>
> > <div name="aba">ABA</div>
>
> > </body>
> > </html>
>
> --
> Best Regards,
>  José Francisco Rives Lirola <sevir1ATgmail.com>
>
>  SeViR CW   Computer Design
>  http://www.sevir.org
>
>  Murcia - Spain

Reply via email to