Solved

onclick works in Internet Explorer and firefox but not chrome

Posted on 2013-11-06
2
589 Views
Last Modified: 2013-11-06
I have a simple function and some online code in with boostrap

Here is the function

	
		 function getList() {
		 	alert("this is list");
		 }

Open in new window

and here is the inline code

				

<div class="btn-group pull-right">				
	 <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">Get list</button>
  <ul class="dropdown-menu" role="menu" style="z-index:4;">
	<li class="sas" onclick="getList()">All List</li>
	li class="sas" onclick="getHighest()">Highest Price</li>
</ul>				
</div>

Open in new window


I just need to ensure it works in Chrome also
0
Comment
Question by:debbieau1
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39628824
Nothing wrong with the code you have posted bar a missing opening tag (<) here

li class="sas"
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39628984
The second <li> has a different function listed for the onclick... getHighest()
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question