Solved

onclick works in Internet Explorer and firefox but not chrome

Posted on 2013-11-06
2
569 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 82

Expert Comment

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Today I would like to talk about localizing (Internationalization) JavaScript applications. Introduction When creating an application that is going to be used by many people around the globe, it is important to remember that not everyone speak…
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now