Solved

return false not working

Posted on 2012-04-02
2
264 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
[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 15

Accepted Solution

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

<a href="#" ...

Open in new window

0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 37796954
Try:

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…

730 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