Advertisement

05.10.2008 at 01:51PM PDT, ID: 23392029
[x]
Attachment Details

Integrating "onclick" inside <ul>

Asked by olivierarbez in Cascading Style Sheets (CSS), JavaScript, Internet Explorer Web Browser

Hello,

I would like to create an onclick inside <ul> with <li> in it.  In my first example it won't work in IE, is fine in Firefox. In my second example it works in both browsers.
I want to fix the first example, because I need to keep <li></li> inside onclick.

Please, advise

Thank youStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
<div style=" width:400px"><ul>
<li>chicken</li>
<li>horse</li>
<div id="item3">
<a href="#" onclick="document.getElementById('item3more').style.display=='none' ? document.getElementById('item3more').style.display='' : document.getElementById('item3more').style.display = 'none';return false" style="float:right">+</a></div>
<div id="item3more" style="display:none;">
<li>dog</li>
<li>cat</li>
</div></ul></div>
<br />
<br />
<br />
<div style=" width:400px"><ul>
<li>chicken</li>
<li>horse</li>
<div id="item4">
<a href="#" onclick="document.getElementById('item4more').style.display=='none' ? document.getElementById('item4more').style.display='' : document.getElementById('item4more').style.display = 'none';return false" style="float:right">+</a></div>
<div id="item4more" style="display:none;">
dog<br/>
cat<br/>
</div></ul></div>
[+][-]05.10.2008 at 02:28PM PDT, ID: 21540532

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.

 
[+][-]05.10.2008 at 11:30PM PDT, ID: 21541625

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.

 
[+][-]05.11.2008 at 02:33AM PDT, ID: 21541947

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.

 
[+][-]05.11.2008 at 03:11AM PDT, ID: 21542002

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.

 
[+][-]05.11.2008 at 06:21PM PDT, ID: 21544175

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.

 
[+][-]05.11.2008 at 10:09PM PDT, ID: 21544760

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.

 
[+][-]05.12.2008 at 01:10AM PDT, ID: 21545255

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.

 
[+][-]05.12.2008 at 03:20AM PDT, ID: 21545660

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.

 
[+][-]05.12.2008 at 06:54AM PDT, ID: 21546977

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.

 
[+][-]05.12.2008 at 09:01AM PDT, ID: 21548105

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.

 
[+][-]05.12.2008 at 10:14AM PDT, ID: 21548749

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: Cascading Style Sheets (CSS), JavaScript, Internet Explorer Web Browser
Sign Up Now!
Solution Provided By: rlively
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.12.2008 at 10:15AM PDT, ID: 21548763

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