?
Solved

onclick works in Internet Explorer and firefox but not chrome

Posted on 2013-11-06
2
Medium Priority
?
621 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

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

li class="sas"
0
 
LVL 84

Expert Comment

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…
Suggested Courses

762 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