© 2008 RightNow Technologies, Inc. Dynamic Forms in Customer Portal Overview.

Slides:



Advertisements
Similar presentations
© 2010 Delmar, Cengage Learning Chapter 9 Positioning Objects with AP Div Tags.
Advertisements

23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
© 2008 RightNow Technologies, Inc. Customer Portal for Developers Pop-Quiz.
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
CSS Menus and Rollovers. Agenda foil Separating style from content 3 pages in one file Rollovers in CSS Horizontal drop-downs Vertical drop-downs.
Dawn Pedersen Art Institute. What is Spry? Spry is Dreamweaver’s version of JavaScript libraries. Spry effects alter the look of a page element—or of.
The Web Warrior Guide to Web Design Technologies
Chapter 6 Basic forms 1. Forms and query string 2 form : a group of user input (UI) controls that accepts information from the user and sends the information.
Web-based Application Development Lecture 9 February 7, 2006 Anita Raja.
Excel and VBA Creating an Excel Application
Tutorial 13 Working with Objects and Styles. XP Objectives Learn about objects and the document object model Reference documents objects by ID, name,
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
Definition from Wikipedia.  The Prototype JavaScript Framework  implemented as a single file of JavaScript code  named prototype.js (
JQuery CS 268. What is jQuery? From their web site:
XP Tutorial 7New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks.
KRAD makes it easy to handle HTML events in your webpage. Kuali University: Apply Now Lab 6: Fun with HTML Events Lab Objectives HTML Events – what are.
Yahoo! User Interface (YUI) Library Natly Mekdara.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Basic Responsive Design Techniques. Let’s take a look at this basic layout. It has a header and two columns of text, in a box that is centered on the.
Event Handlers CS101 Introduction to Computing. Learning Goals Learn about event handlers Determine how events are useful in JavaScript Discover where.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 2 Welcome Application Introducing the Visual Basic 2008 Express Edition IDE.
Multi-Part Requests/ Parent & Child Service Items.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
JavaScript - A Web Script Language Fred Durao
Chapter 8 © 2001 by Addison Wesley Longman, Inc. 1 Chapter 8 Sebesta: Programming the World Wide Web.
WaveMaker Visual AJAX Studio 4.0 Training Basics: Building Your First Application Designer Basics.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
1 JavaScript
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
INSERT BOOK COVER 1Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Getting Started with VBA for Microsoft Office 2010 by.
® IBM Software Group © 2006 IBM Corporation Web JSF Overview – RBD Tooling – for Web Development This unit introduces you to the aspects of the RBD tooling.
Event-Driven Programming Chapter Page Section: Section or division of an HTML page Generic block element Example: What's the difference between.
JQuery JavaScript is a powerful language but it is not always easy to work with. jQuery is a JavaScript library that helps with: – HTML document traversal.
Modifying HTML attributes and CSS values. Learning Objectives By the end of this lecture, you should be able to: – Select based on a class (as opposed.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, you will learn:  float & clear  display & visibility.
CNIT 132 – Week 4 Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Variables, Functions and Events (NON-Audio version) © Dr. David C. Gibbs WDMD.
Prepared by ASM Research, Inc. How to Process CES Training Requests This tutorial is designed to help the first time CHRTAS Agency Training Coordinator.
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
HTML Forms.
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
Tutorial 4 Creating Special Effects with CSS. XP Objectives Work with CSS selectors Create styles for lists Create and apply class styles Create a rollover.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Understanding JavaScript and Coding Essentials Lesson 8.
® IBM Software Group © 2006 IBM Corporation Dependent Combo-Box U.I. Development This Learning Module walks you through the options and development techniques.
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
05 | Integrating JavaScript and MVC 4 Jon Galloway | Tech Evangelist Christopher Harrison | Head Geek.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Chapter 4 Crystal Report Presenter: PEN PHIROM (MscIT) Phone:
JavaScript JavaScript is a programming language that web browsers understand. You can use it to make your web pages interactive by: Responding to user.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Textbook to be published by Pearson Ed in early Bootstrap.
XP Tutorial 7New Perspectives on HTML and XHTML, Comprehensive 1 Working with Cascading Style Sheets Creating a Style for Online Scrapbooks Tutorial 7.
WaveMaker Visual AJAX Studio 4.0 Training Styling your application.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
Working with Cascading Style Sheets
DHTML.
JavaScript, Sixth Edition
In this session, you will learn to:
Unit 27 - Web Server Scripting
Tutorial 6 Creating Dynamic Pages
Video Player BIS1523 – Lecture 22.
Presentation transcript:

© 2008 RightNow Technologies, Inc. Dynamic Forms in Customer Portal Overview

© 2008 RightNow Technologies, Inc. This information is targeted at technical resources (specifically Developers) looking to build custom dynamic behaviors through the RightNow product Two approaches will be discussed: –Data Driven presentation of form elements This section should only be displayed to customers with particular characteristics (a specific Org ID for example) –Activity Driven – divided into two areas: This section of a form should only be displayed to customers on a click event (field, button events) - where we’ll manipulate the visible attributes of a DIV Listening to the Event Bus – displaying a dynamic area based on the selection of a value from an out of the box widget Overview

© 2008 RightNow Technologies, Inc. What We Will Not be Covering Activities from a Custom Widget field selection –It will be a lot of work for a widget elsewhere on the page to ‘listen’ for a selection in a custom widget as custom widgets cannot ‘add’ to the event bus (pre- November ‘08) and won’t (for the foreseeable future) be able to add events specific to particular user actions on a HTML form (click, select, blur, focus etc). –To do this kind of work, if you cannot capture the click in your custom widget and need to listen to an event bus – be prepared to have to build your own event bus from scratch – this can be a considerable amount of low-level work.

© 2008 RightNow Technologies, Inc. Data Driven Approach Our approach to building out sections that only appear based on data (in our system or another system) is primarily handled in the RNT Controller The field that we want to make available upon a page load in our example is embedded in a custom widget (SampleWidget). This is what we refer to as a composite widget as the display and field widget to be exposed are ‘embedded’ within the same object. Within the View, we decide what to show based on our values – in this case OrgID, which happens to be a profile value SampleWidget Service Contract Section Input Field Widget Everything in the Service Contract Section is hidden unless a specific Org ID is identified when the ask a question page is loaded

© 2008 RightNow Technologies, Inc. Data Driven Approach ModelController Data Source Profile View Controller extracts the data from the Model or the $profile The view will control visibility - If the OrgId matches a particular value or range – expose your content In our solution – OrgId is a value in our persistent session profile – so we’ll use that rather than pull from the model Components of our custom widget

© 2008 RightNow Technologies, Inc. How our Data Impacts Display Because the logged in customer has an affiliation with an Organization (42) we are displaying a Service Contracts section.

© 2008 RightNow Technologies, Inc. Code for the example Our request for the data from the profile in the controller: $data['orgId'] = $this->CI->session->getProfileData('org_id'); Our display of that data within the view: The widget fields etc

© 2008 RightNow Technologies, Inc. Activity Driven Approach /1 Both of our approaches to building out dynamic sections that respond to user activity are focused around CSS – particularly the ability for CSS to control the visibility of DIV elements For the first scenario, the field that we want to make available upon a user action is embedded in the widget that captures the ‘click’ (SampleWidget). SampleWidget encases the visual properties wrapping the input field within a DIV id – which we have hidden by default in CSS SampleWidget Hidden DIV Service Contract Section Input Field Widget Everything in the DIV is hidden until the button is clicked to toggle visibility Hide / Display

© 2008 RightNow Technologies, Inc. Activity Driven Approach /1 View Logic.js Capture the activity (button click, menu select etc) Manipulate the CSS to toggle display or visibility settings of other elements Components of the custom widget

© 2008 RightNow Technologies, Inc. How our Activity Impacts Display After clicking on the hide display button – a section is dynamically displayed or hidden

© 2008 RightNow Technologies, Inc. Code for the example Our code in the CSS: div#DynamicForm { margin: 0px 0px 0px 0px; display:none; } Our logic in the Javascript: function SampleWidget2(data) { //Data object contains all widget attributes, values, etc. var elem, vis; this.init = function() { //Perform any initial javascript logic here } if( document.getElementById ) // this is the way the standards work elem = document.getElementById( data ); else if( document.all ) // this is the way old msie versions work elem = document.all[data]; else if( document.layers ) // this is the way nn4 works elem = document.layers[data]; vis = elem.style; // if the style.display value is blank we try to figure it out here if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; vis.display = (vis.display==''||vis.display=='block')?'none':'block'; } See for the original example

© 2008 RightNow Technologies, Inc. Code for the example The button ‘event’ in the View: Hide /Display

© 2008 RightNow Technologies, Inc. Activity Driven Approach /2 Our second look at this problem is to use the Event Bus to listen for an event in another field within the form In this example, we will do all of the work within logic.js to listen to the event and process it The format of the event is the following: evt_menu_filter_get_update.subscribe( ) And this is our call: evt_menu_filter_get_update.subscribe(onProdCatUp date); SampleWidget Hidden DIV Service Contract Section Input Field Widget Everything in the DIV is hidden until a product menu selection is made Mobile Phones

© 2008 RightNow Technologies, Inc. Activity Driven Approach /2 The function we are calling from is within the init function for the widget listening for the event: function SampleWidget(data) { //Data object contains all widget attributes, values, etc. this.init = function() { //Perform any initial javascript logic here evt_menu_filter_get_update.subscribe(onProdCatUpdate); }

© 2008 RightNow Technologies, Inc. Activity Driven Approach /2 The function changing the visibility of the CSS element is the following: function onProdCatUpdate(type, args) { var evtObj = args[0]; if(evtObj.data.value == "1") document.getElementById("DynamicForm").style.display = "block"; else document.getElementById("DynamicForm").style.display = "none"; }

© 2008 RightNow Technologies, Inc. Activity Driven Approach /2 And the results are the following – the ID value of Mobile Phones is 1 – and as a result – the section is flipped Selecting another value from the menu – or hitting the hide / display will toggle the visible area (either hiding or displaying)

© 2008 RightNow Technologies, Inc. Summary So, today we looked at three ways of building out custom dynamic form elements All the sample code for this exercise will be loaded onto our Developer Community Forums If you found this simple tutorial helpful, let us know via our Developer Community forums. Also let us know what other tutorials you would like to see in the future!

© 2008 RightNow Technologies, Inc. Questions? Join us on the Developer Community at: