Tom Dunne

Greenhorn
+ Follow
since Aug 02, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tom Dunne

Hi there,
im having a problem linking to my class when the user clicks the ok button of a JavaScript Confirm window. Here is my problem.
<% out.println("<script language=\"JavaScript\">"); %>
function rusure() {
question = confirm("Are you sure you want to delete this document")
if(question !="0") {
location.href= "DocumentCommand.class?id=<%= primaryKey %>&command=DEL"
}
}
<% out.println("</script>");%>
Ok my problem is that the location.href does not allow the string to contain the %> after i display the value for the primary key therefore the &command=DEL never gets past to the url. It seems JavaScript doesnt like the JSP tags. Is there anyway i can get this to link using this JavaScript function ?? Please Help..... Thanks Tom.
22 years ago