Solved

return false not working

Posted on 2012-04-02
2
260 Views
Last Modified: 2012-04-02
Hi, I don't know what I am doing wrong here but return false is not working:

php:
		$id = 1;
	      $action  = 'avail';	

$availstock .= "<div >   
			<a href= '' id='1'  onclick= 'handleanchor($action,this.id); return false ' > $usav  </a>  </div>";

Open in new window


generated javascript :

8250466]
<a href="" id="1" onclick="handleanchor(avail,1);return false"> 10  </a>

Open in new window

0
Comment
Question by:Rozamunda
2 Comments
 
LVL 15

Accepted Solution

by:
StingRaY earned 500 total points
Comment Utility
put # into href="", like this:

<a href="#" ...

Open in new window

0
 
LVL 25

Expert Comment

by:Lee Savidge
Comment Utility
Try:

$availstock .= "<div >  
                  <a href= '' id='1'  onclick= 'handleanchor('$action',this.id); return false;' > $usav  </a>  </div>";
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now