Solved

Trying to move button location under MVC framework - stuck.

Posted on 2012-03-23
9
348 Views
Last Modified: 2012-03-23
How do I move the button location without interfering with the ActionResult in the Controller?

I'm very new to MVC.

Here is the "model" "view" and "controller" code:

model
using System;
using System.Collections.Generic;
using System.Linq;
using BarclayPortal.DAL.Models;

namespace BarclayPortal.Website.Models
{

    public class BarclayReportModel
    {

        public DateTime date_received { get; set; }

        public DateTime date_export { get; set; }

        public int? do_not_solicit { get; set; }

        public int? undeliverable { get; set; }

        public int? exceptions_with_letters { get; set; }

        public int? exceptions_without_letters { get; set; }

        public int? correspondence { get; set; }

        // 2012-03-21 BD: Notified by PR that client has requested this to be removed
        // public int? estimated_mail_received { get; set; }

        public int? actual_mail_received { get; set; }

        public int? pobox_mail_received { get; set; }

        public int? non_pobox_mail_received { get; set; }

        public int? white_mail { get; set; }

        public int? letters_mailed { get; set; }

        public int? blue_green_apps { get; set; }

        public int Julian { get; set; }

        public int Partial { get; set; }

        public int Direct { get; set; }

        public int Full { get; set; }

        public Dictionary<int, int> CampaignCounts { get; set; }

        public BarclayReportModel()
        {
            CampaignCounts = new Dictionary<int, int>();
        }

        public static BarclayReportModel ConvertFrom(spBarclayReportRecord item)
        {
            BarclayReportModel retVal = new BarclayReportModel
            {
                date_received = item.date_received,
                date_export = item.date_export,
                do_not_solicit = item.do_not_solicit,
                undeliverable = item.undeliverable,
                exceptions_with_letters = item.exceptions_with_letters,
                exceptions_without_letters = item.exceptions_without_letters,
                correspondence = item.correspondence,
                // estimated_mail_received = item.estimated_mail_received,
                actual_mail_received = item.actual_mail_received,
                pobox_mail_received = item.pobox_mail_received,
                non_pobox_mail_received = item.non_pobox_mail_received,
                white_mail = item.white_mail,
                letters_mailed = item.letters_mailed,
                blue_green_apps = item.blue_green_apps,
                Julian = item.Julian, 
                Partial = item.Partial, 
                Direct = item.Direct, 
                Full = item.Full, 
                CampaignCounts = item.CampaignCounts
            };
            return retVal;
        }

        public static List<BarclayReportModel> ConvertFrom(List<spBarclayReportRecord> items)
        {
            return items.Select(item => ConvertFrom(item)).ToList();
        }
    }

}

Open in new window



view
@model BarclayReportAndParameters
@using BarclayPortal.Website.Models

@{
    ViewBag.Title = "Report";
    string errorMessage = "";
    if (ViewBag.ErrorMessage != null)
    {
        errorMessage = ViewBag.ErrorMessage.ToString();
    }
    Dictionary<int, string> selectOptions = new Dictionary<int, string>();
    foreach (BarclayReportAndParameters.PricePointOptions option in Enum.GetValues(typeof(BarclayReportAndParameters.PricePointOptions)))
    {
        selectOptions.Add((int) option, option.ToString());
    }
}

@{ Html.RenderPartial("SubmenuNav"); }

@if (!string.IsNullOrWhiteSpace(errorMessage))
{
    <p class="MT10 MB10 ML10 MR10 error">@errorMessage</p>
}

@using (Html.BeginForm("Report", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>
        <fieldset>
            <legend>Parameters</legend>
            <div class="FL MR15">
                <div class="editor-label"><label for="BeginDate">Begin Date</label></div>
                <div class="editor-field">
                    <input type="text" id="BeginDate" name="BeginDate" value="@Model.BeginDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="EndDate">End Date</label></div>
                <div class="editor-field">
                    <input type="text" id="EndDate" name="EndDate" value="@Model.EndDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="PricePoint">Price Points</label></div>
                <div class="editor-field">
                    <select id="PricePoint" name="PricePoint">
                        @foreach(KeyValuePair<int, string> kvp in selectOptions)
                        {
                            if ((int) Model.PricePoint == kvp.Key)
                            {
                                <option value="@kvp.Key" selected="selected">@kvp.Value</option>
                            }
                            else
                            {
                                <option value="@kvp.Key">@kvp.Value</option>
                            }
                        }
                    </select>
                </div>
            </div>
            <div class="FL MR15">
                <!-- <div class="editor-label"><label> <br /></label></div> -->
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Generate Report" />
                </div>                
            </div>
            <div class="clear"></div>
        </fieldset>
    </div>
}



@using (Html.BeginForm("ReportTomNew", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>
        <fieldset>            
            <div class="FL MR15">                
                <div class="editor-field">
                    <input class="MT25" type="text" name="reportname" />.csv
                </div>                
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Save Report" />
                </div>                
            </div>
            <div class="clear"></div>
        </fieldset>
    </div>
}


@if (Model.ReportRecords != null)
{
    <div style="overflow: auto; padding-top: 20px; padding-bottom: 20px; min-height: 420px;">
        <table id="tblReportRecords">
            <thead>
                <tr>
                    <th>Date Received</th>
                    <th>Julian</th>
                    <th>Date Export</th>
                    <th>Partial</th>
                    <th>Direct</th>
                    <th>Full</th>
                    <th>Do Not Solicit</th>
                    <th>Undeliverable</th>
                    <th>Exceptions With Letters</th>
                    <th>Exceptions Without Letters</th>
                    <th>Correspondence</th>
                    <th>Actual Mail Received</th>
                    <th>PO Box mail Received</th>
                    <th>Non PO Box Mail Received</th>
                    <th>White Mail</th>
                    <th>Letters Mailed</th>
                    <th>Blue Green Apps</th>
                    <th>Campaign Counts</th>
                </tr>
            </thead>
            <tbody>
                @foreach (BarclayReportModel item in Model.ReportRecords)
                {
                    <tr>
                        <td>@item.date_received.ToString("MM/dd/yyyy")</td>
                        <td>@item.Julian</td>
                        <td>@item.date_export.ToString("MM/dd/yyyy")</td>
                        <td>@item.Partial</td>
                        <td>@item.Direct</td>
                        <td>@item.Full</td>
                        <td>@item.do_not_solicit</td>
                        <td>@item.undeliverable</td>
                        <td>@item.exceptions_with_letters</td>
                        <td>@item.exceptions_without_letters</td>
                        <td>@item.correspondence</td>
                        <td>@item.actual_mail_received</td>
                        <td>@item.pobox_mail_received</td>
                        <td>@item.non_pobox_mail_received</td>
                        <td>@item.white_mail</td>
                        <td>@item.letters_mailed</td>
                        <td>@item.blue_green_apps</td>
                        <td>@item.CampaignCounts.Count</td>
                    </tr>                
                }
            </tbody>
    </table>
    </div>
}

<link href="@Url.Content("~/Content/dataTables/jquery.dataTables.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/dataTables/jquery.dataTables.min.js")" type="text/javascript"></script>

<script type="text/javascript" language="javascript">

    $(document).ready(function () {
        $('#BeginDate').datepicker();
        $('#EndDate').datepicker();
        var l = $('#tblReportRecords').length;
        if (l > 0)
        {
            $('#tblReportRecords').dataTable();
        }
    });

</script>

Open in new window


controller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BarclayPortal.Website.Helpers;
using BarclayPortal.Website.Models;
using System.Data;
using System.IO;
using System.Text;

namespace BarclayPortal.Website.Controllers
{
    public class ReportsController : Controller
    {
        //
        // GET: /Reports/

        [HttpGet]
        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult Report(DateTime? loadBeginDate, DateTime? loadEndDate)
        {
            BarclayReportAndParameters model = new BarclayReportAndParameters
            {
                BeginDate = DateTime.Now.AddDays(-1),
                EndDate = DateTime.Now,
                PricePoint = BarclayReportAndParameters.PricePointOptions.NONE, 
                ReportRecords = null
            };
            if (loadBeginDate != null && loadEndDate != null && loadBeginDate.Value <= loadEndDate.Value)
            {
                model.BeginDate = loadBeginDate.Value;
                model.EndDate = loadEndDate.Value;
            }
            return View(model);
        }

        [HttpPost]
        public ActionResult Report(BarclayReportAndParameters model)
        {
            try
            {
                model.ReportRecords = DALHelper.GetReport(model.parameterBeginDate, model.parameterEndDate, model.parameterPricePoint);
                SessionHelper.LastGeneratedBarclayReportAndParameters = model;
            }
            catch (Exception ex)
            {
                ViewBag.ErrorMessage = ex.Message;
                model.ReportRecords = null;
            }

            

            return View(model);
        }




        [HttpGet]
        public ActionResult ReportTomNew(DateTime? loadBeginDate, DateTime? loadEndDate)
        {
            BarclayReportAndParameters model = new BarclayReportAndParameters
            {
                BeginDate = DateTime.Now.AddDays(-1),
                EndDate = DateTime.Now,
                PricePoint = BarclayReportAndParameters.PricePointOptions.NONE,
                ReportRecords = null
            };
            if (loadBeginDate != null && loadEndDate != null && loadBeginDate.Value <= loadEndDate.Value)
            {
                model.BeginDate = loadBeginDate.Value;
                model.EndDate = loadEndDate.Value;
            }
            return View(model);
        }


        [HttpPost]
        public ActionResult ReportTomNew(BarclayReportAndParameters model)
        {
            try
            {
                model = SessionHelper.LastGeneratedBarclayReportAndParameters;
                CSVUtility.GetCSVNew();
                string filename = this.Request.Form["reportname"] + ".csv";
                return File(Encoding.ASCII.GetBytes(CSVUtility.stream), "application/vnd.ms-excel", filename);
            }
            catch (Exception ex)
            {
                ViewBag.ErrorMessage = ex.Message;
                model.ReportRecords = null;
            }

            return View(model);
        }

        




    }

}

Open in new window

mvc-button-ba.png
0
Comment
Question by:knowlton
  • 5
  • 4
9 Comments
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37758300
There is jquery for you to make this task simpler.

Add the code in the script section of your page

$(function() {
    $('#YourDownloadButtonID').after($('#YourGenerateButtonID'));
});

This will arrange your button on the page load withour changing in any of your B.L

Hope this will fix up your problem.
0
 
LVL 5

Author Comment

by:knowlton
ID: 37758643
This works, but what happens is that after the button moves, it begins to generate the same event as the OTHER button.  MVC seems to allow just ONE button for the controller events.
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37758734
Ok.
Make your button (your Download Report button) invisible with the follwing code
 
<button id="yourActualDownloadReportButtonID" style="display:none;"> .... </button>
The above line will simply hide the button.

Then,Add Extra button after Generate button as follows,which user will see
<button id ="btnDummyDownloadReportButton">Download Button </button>

Now add the following code
$(function() {
          $("#btnDummyDownloadReportButton").click(function() {
               $("#yourActualDownloadReportButtonID").click();
        });
});

In this way when user click the dummy button,it will fire up the actual button which is inside the other form section.So, it will do it's work without any problem.

Hope now you will get rid of your problem.
0
 
LVL 5

Author Comment

by:knowlton
ID: 37758782
It is still doing the same thing as I reported before.


It seems like ANY button placed there will do the SAME THING the "Generate Button" does!


How difficult would it be for you to create a very simple MVC application that does what you are proposing?  Then I could take it and adapt it to my needs.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37758827
knowlton. It should do your work,as because these things are running on client side,it don't have to do anything on MVC (server side) execution.

Ok.. Can you put your whole View Page here ?
0
 
LVL 5

Author Comment

by:knowlton
ID: 37758846


...
...

Ok.. Can you put your whole View Page here ?

Sure!

Here is the updated View Page code:

@model BarclayReportAndParameters
@using BarclayPortal.Website.Models

@{
    ViewBag.Title = "Report";
    string errorMessage = "";
    if (ViewBag.ErrorMessage != null)
    {
        errorMessage = ViewBag.ErrorMessage.ToString();
    }
    Dictionary<int, string> selectOptions = new Dictionary<int, string>();
    foreach (BarclayReportAndParameters.PricePointOptions option in Enum.GetValues(typeof(BarclayReportAndParameters.PricePointOptions)))
    {
        selectOptions.Add((int) option, option.ToString());
    }
}

@{ Html.RenderPartial("SubmenuNav"); }

@if (!string.IsNullOrWhiteSpace(errorMessage))
{
    <p class="MT10 MB10 ML10 MR10 error">@errorMessage</p>
}

@using (Html.BeginForm("Report", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>
        <fieldset>
            <legend>Parameters</legend>
            <div class="FL MR15">
                <div class="editor-label"><label for="BeginDate">Begin Date</label></div>
                <div class="editor-field">
                    <input type="text" id="BeginDate" name="BeginDate" value="@Model.BeginDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="EndDate">End Date</label></div>
                <div class="editor-field">
                    <input type="text" id="EndDate" name="EndDate" value="@Model.EndDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="PricePoint">Price Points</label></div>
                <div class="editor-field">
                    <select id="PricePoint" name="PricePoint">
                        @foreach(KeyValuePair<int, string> kvp in selectOptions)
                        {
                            if ((int) Model.PricePoint == kvp.Key)
                            {
                                <option value="@kvp.Key" selected="selected">@kvp.Value</option>
                            }
                            else
                            {
                                <option value="@kvp.Key">@kvp.Value</option>
                            }
                        }
                    </select>
                </div>
            </div>
            <div class="FL MR15">
                <!-- <div class="editor-label"><label> <br /></label></div> -->
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Generate Report" id="genrep" />
                </div>          
                   <div class="editor-field">
                    <button id ="btnDummyDownloadReportButton">Download Button</button>
                </div>      
            </div>
            <div class="clear"></div>
        </fieldset>
    </div>
}



@using (Html.BeginForm("ReportTomNew", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>
        <fieldset>            
            <div class="FL MR15">                
                <div class="editor-field">
                    <input class="MT25" type="text" name="reportname" />.csv
                </div>                
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Save Report" style="display:none;" id="saverep" />
                </div>                
            </div>
            <div class="clear"></div>
        </fieldset>
    </div>
}


@if (Model.ReportRecords != null)
{
    <div style="overflow: auto; padding-top: 20px; padding-bottom: 20px; min-height: 420px;">
        <table id="tblReportRecords">
            <thead>
                <tr>
                    <th>Date Received</th>
                    <th>Julian</th>
                    <th>Date Export</th>
                    <th>Partial</th>
                    <th>Direct</th>
                    <th>Full</th>
                    <th>Do Not Solicit</th>
                    <th>Undeliverable</th>
                    <th>Exceptions With Letters</th>
                    <th>Exceptions Without Letters</th>
                    <th>Correspondence</th>
                    <th>Actual Mail Received</th>
                    <th>PO Box mail Received</th>
                    <th>Non PO Box Mail Received</th>
                    <th>White Mail</th>
                    <th>Letters Mailed</th>
                    <th>Blue Green Apps</th>
                    <th>Campaign Counts</th>
                </tr>
            </thead>
            <tbody>
                @foreach (BarclayReportModel item in Model.ReportRecords)
                {
                    <tr>
                        <td>@item.date_received.ToString("MM/dd/yyyy")</td>
                        <td>@item.Julian</td>
                        <td>@item.date_export.ToString("MM/dd/yyyy")</td>
                        <td>@item.Partial</td>
                        <td>@item.Direct</td>
                        <td>@item.Full</td>
                        <td>@item.do_not_solicit</td>
                        <td>@item.undeliverable</td>
                        <td>@item.exceptions_with_letters</td>
                        <td>@item.exceptions_without_letters</td>
                        <td>@item.correspondence</td>
                        <td>@item.actual_mail_received</td>
                        <td>@item.pobox_mail_received</td>
                        <td>@item.non_pobox_mail_received</td>
                        <td>@item.white_mail</td>
                        <td>@item.letters_mailed</td>
                        <td>@item.blue_green_apps</td>
                        <td>@item.CampaignCounts.Count</td>
                    </tr>                
                }
            </tbody>
    </table>
    </div>
}

<link href="@Url.Content("~/Content/dataTables/jquery.dataTables.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/dataTables/jquery.dataTables.min.js")" type="text/javascript"></script>

<script type="text/javascript" language="javascript">

    $(document).ready(function () {
        $('#BeginDate').datepicker();
        $('#EndDate').datepicker();
        var l = $('#tblReportRecords').length;
        if (l > 0)
        {
            $('#tblReportRecords').dataTable();
        }
    });


    $(document).ready(function () {

        //$('#saverep').after($('#genrep'));

        $("#btnDummyDownloadReportButton").click(function () {
            $("#saverep").click();
        });
    });

</script>

Open in new window

0
 
LVL 7

Accepted Solution

by:
Lalit Chandra earned 500 total points
ID: 37758895
ok. there is a mistake  please add type in your button control ,or simply replace the following

<button id ="btnDummyDownloadReportButton">Download Button</button>

from


<button id ="btnDummyDownloadReportButton" type="button">Download Button</button>

Hope it will end up your problem.
0
 
LVL 5

Author Comment

by:knowlton
ID: 37759252
It's working now.



Still, this seems like a hack.   Do you agree?


Here is my final "view":

@model BarclayReportAndParameters
@using BarclayPortal.Website.Models

@{
    ViewBag.Title = "Report";
    string errorMessage = "";
    if (ViewBag.ErrorMessage != null)
    {
        errorMessage = ViewBag.ErrorMessage.ToString();
    }
    Dictionary<int, string> selectOptions = new Dictionary<int, string>();
    foreach (BarclayReportAndParameters.PricePointOptions option in Enum.GetValues(typeof(BarclayReportAndParameters.PricePointOptions)))
    {
        selectOptions.Add((int) option, option.ToString());
    }
}

@{ Html.RenderPartial("SubmenuNav"); }

@if (!string.IsNullOrWhiteSpace(errorMessage))
{
    <p class="MT10 MB10 ML10 MR10 error">@errorMessage</p>
}

@using (Html.BeginForm("Report", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>
        <fieldset>
            <legend>Parameters</legend>
            <div class="FL MR15">
                <div class="editor-label"><label for="BeginDate">Begin Date</label></div>
                <div class="editor-field">
                    <input type="text" id="BeginDate" name="BeginDate" value="@Model.BeginDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="EndDate">End Date</label></div>
                <div class="editor-field">
                    <input type="text" id="EndDate" name="EndDate" value="@Model.EndDate.ToString("MM/dd/yyyy")" maxlength="10" />
                </div>
            </div>
            <div class="FL MR15">
                <div class="editor-label"><label for="PricePoint">Price Points</label></div>
                <div class="editor-field">
                    <select id="PricePoint" name="PricePoint">
                        @foreach(KeyValuePair<int, string> kvp in selectOptions)
                        {
                            if ((int) Model.PricePoint == kvp.Key)
                            {
                                <option value="@kvp.Key" selected="selected">@kvp.Value</option>
                            }
                            else
                            {
                                <option value="@kvp.Key">@kvp.Value</option>
                            }
                        }
                    </select>
                </div>
            </div>
            <div class="FL MR15">
                <!-- <div class="editor-label"><label> <br /></label></div> -->
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Generate Report" id="genrep" />
                </div>                             
                 <div class="editor-field">
                    Save Report: <input class="MT25" type="text" style="width:180px;" id="reportnamedummy" />.csv<div style="position:relative;float:right;margin-left:4px;margin-top:25px;"><button id ="btnDummyDownloadReportButton" type="button">Save</button></div>
                </div>    
            </div>
            <div class="clear"></div>
        </fieldset>
    </div>
}



@using (Html.BeginForm("ReportTomNew", "Reports", FormMethod.Post, new { id = "frmReportParameters" }))
{
    <div>        
            <div class="FL MR15">                                            
                <div class="editor-field">
                    <input class="MT25" type="submit" value="Save Report" style="display:none;" id="saverep" />
                </div>                    
                 <div class="editor-field">
                    <input class="MT25" type="text" id="reportname" style="display:none;" name="reportname" />
                </div>                                
            </div>
            <div class="clear"></div>        
    </div>
}


@if (Model.ReportRecords != null)
{
    <div style="overflow: auto; padding-top: 20px; padding-bottom: 20px; min-height: 420px;">
        <table id="tblReportRecords">
            <thead>
                <tr>
                    <th>Date Received</th>
                    <th>Julian</th>
                    <th>Date Export</th>
                    <th>Partial</th>
                    <th>Direct</th>
                    <th>Full</th>
                    <th>Do Not Solicit</th>
                    <th>Undeliverable</th>
                    <th>Exceptions With Letters</th>
                    <th>Exceptions Without Letters</th>
                    <th>Correspondence</th>
                    <th>Actual Mail Received</th>
                    <th>PO Box mail Received</th>
                    <th>Non PO Box Mail Received</th>
                    <th>White Mail</th>
                    <th>Letters Mailed</th>
                    <th>Blue Green Apps</th>
                    <th>Campaign Counts</th>
                </tr>
            </thead>
            <tbody>
                @foreach (BarclayReportModel item in Model.ReportRecords)
                {
                    <tr>
                        <td>@item.date_received.ToString("MM/dd/yyyy")</td>
                        <td>@item.Julian</td>
                        <td>@item.date_export.ToString("MM/dd/yyyy")</td>
                        <td>@item.Partial</td>
                        <td>@item.Direct</td>
                        <td>@item.Full</td>
                        <td>@item.do_not_solicit</td>
                        <td>@item.undeliverable</td>
                        <td>@item.exceptions_with_letters</td>
                        <td>@item.exceptions_without_letters</td>
                        <td>@item.correspondence</td>
                        <td>@item.actual_mail_received</td>
                        <td>@item.pobox_mail_received</td>
                        <td>@item.non_pobox_mail_received</td>
                        <td>@item.white_mail</td>
                        <td>@item.letters_mailed</td>
                        <td>@item.blue_green_apps</td>
                        <td>@item.CampaignCounts.Count</td>
                    </tr>                
                }
            </tbody>
    </table>
    </div>
}

<link href="@Url.Content("~/Content/dataTables/jquery.dataTables.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/dataTables/jquery.dataTables.min.js")" type="text/javascript"></script>

<script type="text/javascript" language="javascript">

    $(document).ready(function () {
        $('#BeginDate').datepicker();
        $('#EndDate').datepicker();
        var l = $('#tblReportRecords').length;
        if (l > 0)
        {
            $('#tblReportRecords').dataTable();
        }
    });


    $(document).ready(function () {

        //$('#saverep').after($('#genrep'));

        $("#btnDummyDownloadReportButton").click(function () {
            

            //var a = $("#reportnamedummy").val();
            $("#reportname").val($("#reportnamedummy").val());
            //$("#reportname").val("test");

            

            $("#saverep").click();
        });
    });

</script>

Open in new window

0
 
LVL 5

Author Closing Comment

by:knowlton
ID: 37759255
Nice work!  :)

Thank you!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now