Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
<a href="something.html" onClick="popupPage('something.html');return false;" target="_blank">text</a>
This is also great for links where you want a j/s popup box that says something like "Are you sure, yes/no". Just return true/false back to the onClick parameter and without j/s, it defaults to 'yes'. This also works for onClick's for submit buttons in forms. I hate all those submit buttons where you can only submit if j/s is enabled b/c of client side validation code.
Anyway, I just ran into this. Perhaps it isn't news to many of you, I dont know.
But for form submissions, I wouldn't pop up an "are you sure?" dialogue. It's far more effective to return a copy of the filled-in form and provide buttons to "Submit" and "Edit". Users are more likely to spot errors that way.
Arrange for the form validation script to return true for a correctly filled-in form, and false if it contains errors. Then include the following event handler in the <form> tag:
Well, on re-readingyour original post, I guess you didn't mean quite what I thought you said about form submissions -- but I still stand by what I said. :)
Does that ring any bells?