J
Jeremy Felt
Newbie here. I'm sure I'm missing something EXTREMELY simple, but an
hour of searching has led to nothing.
I'm playing around with ajax and trying to pass a variable to a
function.
If I do:
onclick="myFunction(12345)"
It works fine. If I do:
onclick="myFunction($variable)"
It doesn't work at all and IE gives an error stating that $variable is
undefined.
$variable is given a value right before the onclick statement with PHP
as:
$variable=12345;
There's more code involved, but I'm guessing this is something simple
for somebody with experience. Can anybody help?
Thanks Much!
hour of searching has led to nothing.
I'm playing around with ajax and trying to pass a variable to a
function.
If I do:
onclick="myFunction(12345)"
It works fine. If I do:
onclick="myFunction($variable)"
It doesn't work at all and IE gives an error stating that $variable is
undefined.
$variable is given a value right before the onclick statement with PHP
as:
$variable=12345;
There's more code involved, but I'm guessing this is something simple
for somebody with experience. Can anybody help?
Thanks Much!