Prompt user to print page

B

Brent Burkart

I have a web application which consist of a huge form with many
requiredfieldvalidators. Before the user submits, I want to prompt the
user to print.

I have tried to do this with the help of a CustomValidator and
javascript, but I can't get the CustomValidator to fire.

Does anyone have a better to approach this or maybe you can point me in
the right direction as to why my CustomValidator is not working? Here
is the code.


<asp:customvalidator id="PrintValidator" runat="server"
ControlToValidate="PrintResult" ErrorMessage="PrintValidator2"
Display="Dynamic"
ClientValidationFunction="validatePrint2"></asp:customvalidator>

function validatePrint(oSrc,args)
{
if (args.value=="True")
{
args.isvalid;
}
else
{
var agree=confirm("If you have not already printed this application,
please click 'Cancel' and do so. If you already have printed, please
click 'OK' to submit");
if (agree)
return true;
else
return false;
args.isvalid == false;
}
}
 
B

Brent Burkart

Isn't that handled in the CustomValidator? I have a hidden text box
that gets populated when the "Print" button is clicked. That text box
is the control being validated.
 
B

Brent Burkart

Isn't that handled in the CustomValidator? I have a hidden text box
that gets populated when the "Print" button is clicked. That text box
is the control being validated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top