if($_FILES['logo']['name']=="") {
copy("$src","$fname2");
$q24=mysql_query("update category set category_Name='$name', category_metaTitle='$meta', category_Image='$fname2', category_Description='$desc1', category_Active='$active' where cat_Id=$sr") or die (mysql_error());
$flag=1;
$conf="Data Updated Successfully 1";
} else {
copy("$src","imgdata/category/$fname");
$q24=mysql_query("update category set category_Name='$name', category_metaTitle='$meta', category_Image='imgdata/category/$fname', category_Description='$desc1' where cat_Id=$sr") or die (mysql_error());
$flag=1;
$conf="Data Updated Successfully 2";
}
At the bottom of each I have a successful call, ($conf=“Data Updated Successfully 1”) but what I would like to do is call a javascript function instead of the script being called using a button as below.
I cant test it at the moment, but will that code produce a button instead of what I want to do which is to call the function that that button would call when clicked.
So basically, at the end of the script where I would call $conf=“Data Updated Successfully 1”, I wont it to call the javascript function instead of calling the javascript function by clicking the button.
I think you already define the JavaScript functions in a separate js file. If so then you only need to call the function to run it. In such case use code,
But if you want to load the function with the page load then you have to define the function also.
The function cover() actually switch the visibility of the division ID ‘cover’ (and all of its child elements) from visible to non-visible state and vice versa.