0
function abc(a,b,c)
{
    alert('a :'+a+' b:'+ b);
    xyz(c);
}

function xyz(c)
{
   alert('c :' + c);
}


<a href="javascript:abc(1,2,3)" >click here to check value of abc </a>
2
  • 8
    This is standard javascript and will work with jQuery, what do you need jQuery to do? Commented Nov 9, 2009 at 7:56
  • @beggs: Don't you mean without jQuery? Commented Nov 9, 2009 at 8:06

3 Answers 3

4

This is a wild guess but I think you might want to rename link to something like

<a id='myId'>click here ...</a>

And do the following in jquery

$(document).ready(function(){$('#myId').click(function(){
  abc(1,2,3)})});

Jquery is a javascript framework, not a programming language.

Sign up to request clarification or add additional context in comments.

1 Comment

great thanx where can i get jquery basic fundas
3

You could fire the event using this:

$(document).ready(function(){$('some-id').click(abc(1, 2, 3))});

function abc(a,b,c) { 
   alert('a :'+a+' b:'+ b);
   xyz(c);
}

function xyz(c) {
   alert('c :' + c);
}

...

<a id="some-id">click here to check value of abc </a>

Comments

1

jQuery is a JavaScript library whose purpose is to make some browser scripting tasks easier. It is not a replacement for JavaScript. Don't try to use it for everything.

Also, using onclick is preferable to using the javascript: pseudo-protocol in a link, and you should provide a real URL for the link to take the user when they have JavaScript turned off:

<a href="non_js_alternative.html" onclick="abc(1, 2, 3);">click here to check value of abc </a>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.