This is a really newbie question.
I’ve managed to get some jQuery stuff running quite smootly but i ended up having many
events like this one..
<div class="aClass" id="B436" onclick="updateSearch('B436', '','Brand','193557', 0)">My Name</div>
Now i’m wondering if it’s “safe” to put all my necessary function variables in this way. I check everything in the function so even if with firebug someone change some values they can’t hurt much but… is this the correct way to do ?
Thanks
It’s most likely safe. However, it’s not considered very good practice to put handlers in
onclickor any other attribute of an element, especially considering you have jQuery. You should do it using.click()instead:for example.
If, however, anything of any remote security concern can be done using JavaScript, it probably shouldn’t be done in JavaScript.