Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Is it Possible to Print Form on Submit?
Last Post 01-21-2010 10:19 AM by Todd Janes. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Todd JanesUser is Offline
wading in the water
wading in the water
Posts:17
Avatar

--
01-18-2010 09:04 AM

    Is there any way that I can set up the submit button to automatically print the module (or page) contents? The manager of the people using the form wants to make sure that no record is lost, and doesn't want to rely on the users to remember to click the print icon before submitting? For 10 additional points, is there any way that this functionality can be made to only happen on the initial submit (record not yet saved in the DB), but returning to the record via the method in Dynamic Forms Demonstration #14 (clicking the edit pencil) would not set the submit button to auto-print? It seems like both of these could be done via client-side javascript, but I can't figure out where I would alter the submit buttons js call, and I definitely don't want this functionality across the board in the other 15 or so Dynamic Forms modules that I've developed for my company's intranet. By the way, the call from the submit button is as follows:

    javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dnn$ctr1217$DynamicForms$lnkSave", "", true, "DynamicForms_1217", "", false, true))

    Thanks -ToddJ

    Todd JanesUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    01-19-2010 06:57 AM

    I was able to get most of what I wanted working. I found that in the module configuration, in the Custom JavaScript File section, that I could add javascript to execute on Submit/Save. I only wanted this to print on the initial submission of the form. Since editing the forms changes the URL to have the parameter DBUpdate=True, I used the following to parse out the parameters and check for this one, printing only if the parameter is not found:

    var b = "False";
    var a = window.location.href;
    var myStringList = a.split('&');
    var i = 0;
    while (i < myStringList.length) {
    if (myStringList == "DBUpdate=True")
    b = "True";
    i++;
    }
    if (b == "False") {
    window.print();
    }

    However, I would prefer to not print the entire page, and would like it to be a little cleaner before printing. There is already a print button in the module; it's call is:
    __doPostBack('dnn$ctr1217$dnnACTIONBUTTON3$ico4','')

    So I changed my javascript to read:

    var b = "False";
    var a = window.location.href;
    var myStringList = a.split('&');
    var i = 0;
    while (i < myStringList.length) {
    if (myStringList == "DBUpdate=True")
    b = "True";
    i++;
    }
    if (b == "False") {
    __doPostBack('dnn$ctr1217$dnnACTIONBUTTON3$ico4','');
    }

    This only takes you to the "prettied up" page, but does not bring up the print dialog. So I tried this:

    var b = "False";
    var a = window.location.href;
    var myStringList = a.split('&');
    var i = 0;
    while (i < myStringList.length) {
    if (myStringList == "DBUpdate=True")
    b = "True";
    i++;
    }
    if (b == "False") {
    __doPostBack('dnn$ctr1217$dnnACTIONBUTTON3$ico4','');
    window.print();
    }

    But this did not print. Does anyone know how I can just print the module's content automatically? I don't even really need the module contents to be printer-friendly; I just want to print everything in the module without printing page banners and other columns' contents. This is your chance to be elevated to Dynamic Forms MASTER! Thanks in advance -ToddJ

    Richard BaileyUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    01-19-2010 07:14 AM
    Excellent! Thanks - I may try to use that.
    Todd JanesUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    01-19-2010 07:23 AM

    Richard,

    Thanks again for your help on my other topics. Hopefully the code above will count towards paying back the favor. If you find any way to do a printer-friendly auto-print with this code, please post back what you find!

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    01-19-2010 02:05 PM
    Thanks for the useful posts guys! I think another option is to sometimes use Tailored Text/HTML on the next page for a 'printer friendly' version and to review the form, then possibly setup different redirect links on that page to either 'go back and change a value' or 'commit changes'. Based on those two links you can have different work flow to actually commit the data to the database, fire off email events that the form is actually completed etc... Maybe have a 'IsComplete' flag and mark it as false until the user has committed. This could be somewhat off track from what you are wanting to do, I am just mentioning some other possible ideas...

    -Chad
    Todd JanesUser is Offline
    wading in the water
    wading in the water
    Posts:17
    Avatar

    --
    01-21-2010 10:19 AM

    Thanks, Chad. I think that we're going to end up using your suggestion in some form, since I'm finding that when validation errors occur, the print dialog still pops up. It can be cancelled, the form corrected, and then Submit still brings up the dialog again since the form is not in edit mode, but this may be too complex for some of our users, so we may just want to jump to the printer-friendly version (the one you get when you normally click the printer icon) and have the user print from there.

    -ToddJ

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi