Getting user confirmation has been created by Loren Rosen (Jan 09, 2007).

Content:

It's common to want the user to confirm his action if it would be hard to reverse, e.g. if he asked to delete something. Here's one way to do this, using _javascript_:

Link removeLink = new Link("removeLink") {
			@Override
			public void onClick() {
				// do something you want to confirm beforehand
			}
		};

removeLink.add( new SimpleAttributeModifier("onclick", "return confirm('are you sure?');"));

Reply via email to