<?php
$image=“hello”
echo"<input type=‘submit’ name=‘name’ value=‘delete’ onclick=“Show('”$image"')">
?>
<html>
<head>
<script type=“text/javascript”>
function Show(hello)
{
var hai=hello
alert(hai);
}
</script>
</head>
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..
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…
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
thank you very much friend its working can i ask one more thing how we can use a database command inside javascript like Delete from table name where $image=? how we can use this statement inside the javascript
If you want to use javascript then you would need to create an AJAX event to call a php file and then the php would handle the manipulation of the database.