#637 ✓not_for_core
Ankur Raiyani

document.getElementsByName method

Reported by Ankur Raiyani | April 1st, 2009 @ 08:37 AM

I found a replacement ('$') for document.getElementById in prototype. But there is no replacement for document.getElementsByName in prototype.

So, i have tried and made below function. I have tested it and currently using in my application. I think we can add this into prototype.


function $N(element)
{
  if (typeof element == 'string')
    element = document.getElementsByName(element);
  return Element.extend(element);
}

Thanks for sharing great framework.

Thanks, Ankur

Comments and changes to this ticket

  • Tobie Langel

    Tobie Langel April 1st, 2009 @ 04:56 PM

    • State changed from “new” to “not_for_core”

    Thanks for your ticket. We think this might be better implemented as a plugin rather than in the framework itself.

    Don't forget to register your plugin on Scripteka once it's completed so that the community can benefit from it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Attachments

Pages