Advertisement

06.04.2008 at 03:51PM PDT, ID: 23458666
[x]
Attachment Details

getElementBy Dynamic ID?

Asked by awinstead in Active Server Pages (ASP), Cascading Style Sheets (CSS)

Tags: ASP, CSS

Hello everyone,
I have div tag that basically when you click it will show a hidden div. Pretty simple it references a ID tag to decide to hid or show etc..

Is there a way to assign this to dynamic ID? basically something like
  invID = (Missing_Paperwk_Listings.Fields.Item("Invoice_Number").Value)
 
Then when the id is called it uses
onclick="document.getElementById(invID & '_Sub').style.display='';

So if I use this on a recordset then I can associate each record a unique ID

My code is belowStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
<% Dim invID
  invID = (Missing_Paperwk_Listings.Fields.Item("Invoice_Number").Value)
  'Response.Write(invID & "<br/>")
%> 
<div align="center" id="show_emerg_cont" onclick="document.getElementById('emerg_cont_Sub').style.display=''; document.getElementById('show_emerg_cont').style.display='none'; document.getElementById('hide_emerg_cont').style.display=''" ><a href""><img src="../../../../_resources/images/icons/plus1.gif" alt="update info" /></a></div>
                        <div align="center" id="hide_emerg_cont"onClick="document.getElementById('emerg_cont_Sub').style.display='none'; document.getElementById('show_emerg_cont').style.display=''; document.getElementById('hide_emerg_cont').style.display='none'" style="display:none"><a href""><img src="../../../../_resources/images/icons/minus1.gif"></a></div>
 
<Div id="emerg_cont_Sub" onclick="document.getElementById('emerg_cont_Sub').style.display=''" style="display:none; border: solid;">Hidden Area</Div>
[+][-]06.04.2008 at 04:12PM PDT, ID: 21715046

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 04:15PM PDT, ID: 21715064

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 04:32PM PDT, ID: 21715196

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 04:49PM PDT, ID: 21715344

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), Cascading Style Sheets (CSS)
Tags: ASP, CSS
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 1
Solution Grade: B
 
 
[+][-]06.04.2008 at 04:57PM PDT, ID: 21715409

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:01PM PDT, ID: 21715441

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:07PM PDT, ID: 21715489

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:10PM PDT, ID: 21715500

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:14PM PDT, ID: 21715519

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:27PM PDT, ID: 21715578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 05:32PM PDT, ID: 21715598

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 09:44PM PDT, ID: 21716447

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628