Posted By


erintechspired on 02/12/10

Tagged


Statistics


Viewed 407 times
Favorited by 0 user(s)

getElementBySimilarId


/ Published in: JavaScript
Save to your folder(s)

A simple, non-recursive function that I use to return the first element with an ID that contains a certain ID string.
Sometimes, APS.NET appends the Naming Container ID to the IDs of controls, and in instances where the ClientID of a control you want is not available, you can use this script to find the element you want by similar id.
Dirty, but works most of the time for me.

URL: http://techspired.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.