View Full Version : No Error No Process No Function

12-21-2010, 10:49 PM
I have multiple things happening on a page and they all were working but now nothing happens for one of them and I'm not sure why. Firebug, safari inspector/ chrome inspector are bringing up no error messages which leaves me with nothing to go on. The problem is here, or earlier on (I notice it here):

<h1><a href="javascript:saveAuthor();" onclick="ajax(request = 3); return false;">Save Author</a><a href="javascript:cancelAuthor();" onclick="cancel_form(); return false;">Cancel</a></h1>

The cancel functions but the onclick doesn't trigger I tried an alert to confirm this part. This button does work when a different function reveals it ( there are two options to get this to show).

Are there any other JS debugging options I can try or a way to turn on error reporting?

12-21-2010, 11:20 PM
Is there a page you can link to with this script active?

12-22-2010, 05:49 PM
I'll try and make a static version of it. The current version is on a live db and results must be entered to see the action.

12-22-2010, 08:09 PM
I'm not sure if this helps, but your second function (including "return false") will block the first:
<a href="javascript:cancelAuthor();" onclick="cancel_form(); return false;">

Remove 'return false' from the second one and you will be able to do both. Or you could add both functions to the onclick followed by 'return false', and leave the href as # or another null value.

12-23-2010, 11:43 AM
That actually is a "null" value. Using # though isn't null, it's the page itself. Once you return false onclick you can use anything you want for the href, it will never fire. Using a javascript: thing there makes it so it won't fire even if javascript is disabled. And with or without javascript, most users will see the href in the status bar. Even though it's not what's getting fired, it gives them a clue as to what will happen when those links are clicked.

Anyways, the code looks fine. Since there's no error, then either:

ajax(request = 3)



or both are not getting fired. Or if they are, conditions within them tell them to do nothing at the time they are fired.

There could be several reasons, we would need to see a live version that demonstrates the problem(s) in order to be more specific.