[jQuery] Need help dealing with duplicate ID's in different forms
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=000222322-03012007>I am working on an
application which uses a jquery to show and hide preloaded layers sort of like
netvibes.com. Another aspect of my application involves dynamic creation of
forms. When these forms are created, they are given an ID based on an ID
in the database. </SPAN></DIV>
<DIV><SPAN class=000222322-03012007><FONT
color=#000080></FONT></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>It all worked out great before I went with
the layering idea. The problem now is that I am often loading
the same form elements on different layers, and therefore the standard
selector method of $("#InputElementID") will not work since there are
duplicate ID's hidden in the background (in forms with different
ID's).</SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>So, </SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>1) Do you think it will be reasonable to use
a different selector method to access the Input elements based on a combination
of form ID and element ID, rather than strictly by element id? If so, what
syntax should I use? I have tried the context selector $('#InputID',
myFormObj) without much success. Is there a better method?</SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007> Or,</SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>2) Am I crazy to be creating a page
containing duplicate elements even though they are contained in different
forms?</SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>Thanks,</SPAN></DIV>
<DIV><SPAN class=000222322-03012007></SPAN> </DIV>
<DIV><SPAN class=000222322-03012007>Jeremy</SPAN></DIV></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/