[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

onclick works in Internet Explorer and firefox but not chrome

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>

Open in new window

I just need to ensure it works in Chrome also
1 Solution
Nothing wrong with the code you have posted bar a missing opening tag (<) here

li class="sas"
Dave BaldwinFixer of ProblemsCommented:
The second <li> has a different function listed for the onclick... getHighest()

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now