Welcome Guest, Not a member yet? Register   Sign In
ask about onchange and onclick php
#1

[eluser]C_Line[/eluser]
i have a problem with onchange and onclick
i wan enter a value in textbox and call the function
like this :

========================================================
<input onchange="here()" type=“text"name=“qty”>

<?php
function here()
{
echo “hello”;
}
?>
=========================================================

but, when i entered the value, here() function didn’t call
please help me, and sorry my bad english Big Grin
thx
#2

[eluser]CroNiX[/eluser]
onchange/onclick are javascript events. You can't execute php like that. Your Hello function would need to be a javascript function, not php.
#3

[eluser]C_Line[/eluser]
ooh, okay
but i have another problem
after my function called

i can't use php code like below ?
================================================================
<input onchange="here()" type = "text" name="aaa" />

[removed]
function here()
{
<?php
echo "asd"; /// <- this code
?&gt;
}

================================================================


#4

[eluser]C_Line[/eluser]
SOLVED
thx for replies CroNiX Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB