0
Good afternoon guys, wanted to know how I step 2 values for a Function, I expect to send an id and the message. I did reading some forums on the net, but it’s not working.
<a href="#" onClick="answer('+ objeto.idForum +',' objeto.message')" id="answer" >Responder</a>
function answer(id, mensagem) {
alert(id);
alert(mensagem);
}
I ran the same code in Codepen and ran colleague. Open the Developer console and see if there is an error together that does not perform the function, or something like that. If you copy this snippet to a jsfiddle vera that is ok.
– Bruno
thanks Bruno, I’ll take a look at the console, thank you very much.
– Fernando
Where this object comes from
objeto
?– Sergio
id comes from the bank, which is from a question, and the message would be the relevant answer to the question.
– Fernando
but this
objeto
is in the global space? where is the code? it would be interesting to show, you will have more interesting answers– Sergio