Okay so i am having a major problem i am using an image button to delete a recrod from a DB when i use FF it deletes perfectly runs are you sure you want to delete JS and if clicked okay deltes the record
In IE 7 however this is not the case it asks the user - refreshes and the "deleteld"entry is still there which is odd to say the least i am guessing its due to how IE process the outputted Html?
String action;
if (request.getParameter("Add") != null) {
action = "Add";
} else if (request.getParameter("Delete") != null) {
action = "Delete";
} else if (request.getParameter("Update") != null) {
action = "Update";
} else {
action = "";
}
if (request.getParameter("Add") != null) {
out.println("<font color=red>The User has been added</font>");
} else if (request.getParameter("Delete") != null) {
out.println("<font color=red>The User has been Deleted</font>");
} else if (request.getParameter("Update") != null) {
out.println("<font color=red>The User has been Updated</font>");
} else {
out.println("<font color=red>Please enter details of the user you wish to add </font>");
}
out.println("<input name='Delete' type='image' src ='images/del.png'value=" + id + " alt='Delete' onclick='javascript:return deltest();'/> ");
When the user presses the add and update buttons it works perfectly on IE and FF it is just the delete button which does not seem to work in IE
example i press Add user and input the details
it will print out he User has been added
and will Add the entry
same with update
in bot FF and IE
Delete however functions 100% in FF
and Not if IE in IE it wont even display the message the user is deleted but will run the JS
(request.getParameter("Delete")!=null) {
String todelete = request.getParameter("Delete");
out.println(todelete);
String sqld = "DELETE FROM tablename WHERE id='" + todelete + "'";
out.println(sqld);
access.execute(sqld);
}