Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Script Library

  How to imbed a section of a view into another view and add data to an existing record, from another record (example taken from a helpdesk ticketing system)
 
  Josh_Fulleton posted this script:
  When a user makes a reply to tiket, On the submit function call
                function getTicketId()
                {
                    var Tickete = document.getElementById('TicketR').value;
                    document.getElementById('Ticket').value =Tickete;
                }
               //  This function is used to get your submitted ticket id From TICKET region and put that TicketId into Reply region
                 <form method="post" name="form">
                     <table>
                            <tr><td><!--  TicketID --></td><td><input type="hidden" id="Ticket" name="TicketReply" /></td></tr>
                            <tr><td><!-- Submitter --></td><td><input type="hidden" id="Submitter" name="Submitter" /></td></tr>
                            <tr><td><!-- Body --></td><td><input type="hidden" id="bodyR" name="body" /></td></tr>
                            <tr><td>Date</td><td><ws:field name="Created" displaymodes="details,update,insert"></ws:field> </td></tr>
                            <tr><td>Subject </td><td><div id="sub"><input type="text" id="Subject" name="Subject" /></div></td></tr>
                            <tr><td>Status</td><td><select name="Status" id="status">
                            <option value="Awaiting customer Reply" selected="true">Awaiting customer Reply</option>
                            <option value="Closed">Closed</option></select></td></tr>
                            <tr><td>Reply</td><td><textarea rows="5" cols="50" id="Comment" name="Commnet" /></td></tr>
                            <tr><td><ws:action displaytype="image" displaymodes="insert,update" type="submit" name="Get Started!" onclick="return getTicketId();" /></td></tr>           
                    </table>
               </form>
                From here we will have to Store all of the Reply data to ReplyTicket.data   
                It is best to write this region in HTML because using the same data to as reply for data exchange you will run into problems.
 
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us