Beginners question: Variable in Javascript

Posted by Andreas on Stack Overflow See other posts from Stack Overflow or by Andreas
Published on 2010-06-18T10:46:17Z Indexed on 2010/06/18 10:53 UTC
Read the original article Hit count: 252

Filed under:
|

Hello everybody!

I'm new to javascript and cant get this little thing to work. (all external scripts a of course loaded)

I have this jQuery script:

$('a.Link').click(function(){
    autoComp('City');
});


function autoComp(strFormName) {
    var Company = 'Adobe Apple Microsoft'.split(" ");
    var City = 'London Paris Berlin'.split(" ");
    $('#'+strFormName).autocomplete(strFormName) 
}

I cant get it to work. I've discovered that the problem is the last "strFormName" after .autocomplete

Appreciate all the help I can get.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery