echo"<input type=‘submit’ name=‘name’ value=‘delete’ onclick=“Show('”$image"')">
hello friends help me to pass this parameter i am not getting any 1 tell how to pass the parameter in this like the variable if you can correct the coding and send me a execting 1
Please dont tell to do inside the html i need to do it inside the echo statement only means i need to pass the parameter from their only..
- You need to add semicolons to let know PHP that it has reached the end of the line.
- Escape your quotes.
echo"<input type='submit' name='name' value='delete' onclick=\\"Show($image)\\">";
sorry friend its not working i dont know why did u checked it pls see the code once more… and send me … and i have added the semicolon in the code here just i typed it… see while i done it the parameter value is not passing…
The issue here might not be PHP.
Does the function Show() requre a string or integer?
my java script code is same as i shown above and i need to pass entire file location with file name through this so what its not getting called while i am using the parameter what you think
You need to add quotes to your PHP
echo"<input type=‘submit’ name=‘name’ value=‘delete’ onclick=\“Show(‘$image’)\”>";
so can i pass this this onclick event value to ajax ? if you know pls tell how we can call it in the ajax…
You can find many examples if you search through Google.