#RefreshCache JavaScript Tricks Things you may not have realized you could do Nick Airdo Señor Software Monkey Central Christian Church (AZ)

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

MWD1001 Website Production Using JavaScript with Forms.
Programming Club IIT Kanpur. Work environment Before you begin coding,always set up your work environment to your needs IDE Notepad++ Sublime Text 2.
CSS CSS Precise Aesthetic Control. Cascading Style Sheets Though they can be put in HTML header, usually a separate page that the HTML links to Contains.
CS7026 jQuery Events. What are Events?  jQuery is tailor-made to respond to events in an HTML page.  Events are actions that can be detected by your.
FORMs Lesson TBE 540. Prerequisites Before beginning this lesson, the learner must be able to… –Create basic web pages using a text editor and/or a web.
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.
The use of blogs in education. What is a blog education or edublog?  The Wikipedia defines a blog as an edublog is used for teaching or learning environments.
There is a certain way that an HTML file should be set up. The HTML section declares a beginning and an ending. Within the HTML, there should be a HEAD.
4.01 Cascading Style Sheets
CS 174: Web Programming February 26 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Websites with Weebly are easy!. Easy Website Creation with Weebly Making your library media center’s web presence current and effective Holly Frilot,
How To Batch Register Your Students
. If the PHP server is an server or is aware of which server is the server, then one can write code that s information. –For example,
Logins  You will need PHP to test this code, all modern web hosting companies will provide this, Lehigh does not.  I've given you an account on des170.com:
Lesson 8 Creating Forms with JavaScript
JQuery CS 268. What is jQuery? From their web site:
CapitalEsourcing System Guidance for Suppliers Managing your organisation’s profile
Headings, Paragraphs, Formatting, Links, Head, CSS, Images
Department of Information Technology e-Michigan Web Development 0 HTML Form Creation in the Vignette Content Management Application.
Jquery IS JQuery Jquery Example of mouseover event that shows a submenu when menu selected: $(‘#menu’).mouseover(function() { $(‘#submenu’).show();
JQuery Page Slider. Our goal is to get to the functionality of the Panic Coda web site.Panic Coda web site.
Key question  What are the three standardized core languages used to implement web pages? Write the full name not the abbreviation and describe the “layer”
DIY Web Development Hand Code Your Own Page (For Free!) by Bryan Brown, Indiana University Bloomington SLIS.
Homework for October 2011 Nikolay Kostov Telerik Corporation
JQuery March 09 th,2009 Create by
1 Test Automation For Web-Based Applications Selenium HP Web Test Tool Training Portnov Computer School.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
JavaScript Lecture 6 Rachel A Ober
Styling and theming Build campaigns in style. What we'll look at... How a web document is structured How HTML and CSS fit together Tools you will need.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
CC1003N Week 6 More CSS and Javascript.. Objectives: ● More CSS Examples ● Javascript – introduction ● Uses of Javascript ● Variables ● Comments ● Control.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 3.
G053 - Lecture 16 Validating Forms Mr C Johnston ICT Teacher
INTRODUCTION TO HTML5 Using jQuery with HTML5. Introducing jQuery  Although it is not a part of any W3C or WHATWG specification, jQuery performs an important.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
1 Forms and Form elements CSD 340 McCoey. 2 Form Object Properties action Usually a call to a server elements encoding method post or get target Methods.
CS 174: Web Programming September 30 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
HTML - Quiz #2 Attendance CODE:
To access our web services, go to……. Click on Customer Login.
Friendly URLs are Friendly! An Arena Module for Friendly URL Management Derek Mangrum Señior Developer Central Christian Church AZ (Cccev)
PHP Form Introduction Getting User Information Text Input.
Chcslonline.org Text –wrapping around Images. chcslonline.org To wrap text around an image, lets set up a style in our style sheet. open a new notepad.
>> The “Box” Model. Pre-requisite Create a new project in Netbeans called Week5 Create a new html file and name it box.html Create a new css file and.
Web Foundations WEDNESDAY, NOVEMBER 20, 2013 LECTURE 32: DREAMWEAVER SLIDE SHOW AND GOOGLE MAP.
JavaScript Library. What is jQuery jQuery is a lightweight JavaScript library. The purpose is to make it easier to use JavaScript code on your website.
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.
12/14/20151 Uniquescriptz Backend Support Document Ver 2.0.
XSLT & Arena Promotions A flexible approach to web promotions Nick Airdo Software Engineer Central Christian Church
1 CSC160 Chapter 7: Events and Event Handlers. 2 Outline Event and event handlers onClick event handler onMouseOver event handler onMouseOut event handler.
Web Design (12) CSS Introduction. Cascading Style Sheets - Defined CSS is the W3C standard for defining the presentation of documents written in HTML.
Advanced Topics Lecture 8 Rachel A Ober
Intro to jQuery. What is jQuery? A JavaScript library Lightweight (about 31KB for the minified version) Simplifies HTML document traversing (DOM), event.
Using msbuild to automate packaging Nick Airdo Software Engineer Central Christian Church Tweet using #RefreshCache.
Check Boxes. 2 Check boxes  Image from:  HTML:  Each box gets it's own.
 What can I change? What can I change?  How do I change slides? How do I change slides?  How do I link an event to a slide? How do I link an event.
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.
Programming for the Web Assignment One Dónal Mulligan BSc MA
Training Documentation – Replacing GSPR with RFQ 2.0
Google fonts CSS box model
Customer Online Ordering
Box model.
COMP 101 Review.
CSS Box Model.
In Class Programming BIS1523 – Lecture 11.
CSS and Class Tools.
Community Keys key features you should know about Nick Airdo
Dear colleague: We hope that the information within this file, will help you to sign up and submit your abstract.
Presentation transcript:

#RefreshCache JavaScript Tricks Things you may not have realized you could do Nick Airdo Señor Software Monkey Central Christian Church (AZ)

Firebug A must have Firefox plugin

Adv Html Text Add it to the page in question P.S. Use the auto-resize trick from RC 2010…

Hacking Admin Modules ™ To get a auto resizing Module Details textbox:

Hacking Admin Modules ™ Add this inside your standard UserControls/Admin/moduleinstancelist.ascx $(document).ready(function() { $("[id$='tbDetails']").autoResize({ // On resize: onResize : function() { $(this).css({opacity:0.8}); }, // After resize: animateCallback : function() { $(this).css({opacity:1}); }, // Quite slow animation: animateDuration : 300, // More extra space: extraSpace : 20 }); $("[id$='tbDetails']").focus(function() { $("[id$='tbDetails']").attr('Rows', 20 ); // set to 20 rows at first }); * in your swag bag

Auto Check Bulk Page 21 Inspect Element with Firebug to find input control ID

Auto Check Bulk Add this to the Adv Html Text module details on the “New Communication” page (21) $( function() { var $cb = $('input[id$=_cbBulkMail]'); if ( $cb.length != 0 ) { $cb.attr('checked','checked'); $cb.checked = true; } }); The last part of the ID So I’m using the ends with selector

Validation Tired of waiting for SCRUM to provide address validation on event registration?

Wait No More!

function valid () { $ = $("input[id$=stdField_EM]"); if ( $ .length == 0 ) { return true; } $(".error").hide(); var hasError = false; var Reg = ; if( $ .val() == '' ) { $ .after(' Please enter a valid address. '); hasError = true; } else if( ! Reg.test( $ .val() ) ) { $ .after(' Enter a valid address. '); hasError = true; } if( hasError == true ) { return false; } }. First we’ll just define a valid checking function… Feel free to remove this part if you don’t want to require it This goes into an Adv Html Text module on “Event Registration Page 3”

. $(document).ready( function() { $('input[id$=stdField_EM]').blur(function() { valid (); }); $('input[id$=btnNext]').click(function() { if ( valid () == false ) { alert( "Please enter a valid address."); $("input[id$=stdField_EM]").focus(); return false; } }); For when the user tabs out of the field… For when the user tries to click to the “next” step…

Been Burned? Yeah, I’ve seen the ’ bug in s…

Woulda Shoulda Coulda

function hasNonAscii( $item ) { var nonAscii = /[^\u0000-\u007F]/ ; if( nonAscii.test( $item.val() ) ) { if ( $item.next(".error").length == 0 ) { $item.after(' Oops! That contains special (non-ASCII) characters. '); } } else { $item.next(".error").remove(); } $(document).ready( function() { $('input[id$=_tbSubject]').blur(function() { hasNonAscii( $(this) ); }); Any non-ascii character “this” is the tag element but “$(this)” is the jQuery object Put into an Adv Html Text module on New Communications (page 21)

And the body…

…trickier because of the RAD Editor I had to dig around over in Telerik’s old documentation We’ll also be editing the mailmerge.ascx directly (not ideal)… but hey, at least you can!

NOTE: Regarding editing.ascx Not ideal! First choice –Make custom copy of.ascx but still have it extend the original.cs class. Ex: –Register in Arena as new module and use it where you used the original module. Second choice, edit original but make a copy called *.ascx.cust for when you upgrade. (search for *.cust after upgrades and do diff/merge)

. <radE:RadEditor OnClientLoad="OnClientLoad" ID="radEditor“ …. Had to jam this in there Inside the UserControls\mailmerge.ascx file

var $errorArea = $("div[id$=_pnlHtmlMessage] > div:nth-child(1)"); var nonAscii = /[^\u0000-\u007F]/ ; var errorsDetected = false; function OnClientLoad(editor) { editor.AttachEventHandler("onkeyup", function() { if( nonAscii.test( editor.GetText(false) ) ) { if ( ! errorsDetected ) { errorsDetected = true; $errorArea.after(' Oops! You have special (non-ASCII) characters in body of the . '); $errorArea.next(".error").hide().show('slide', {direction: 'right'}, 500); } } else { errorsDetected = false; $errorArea.next(".error").fadeOut(500, function(){ $errorArea.next(".error").remove(); }); } }); } Just a little flair Inside the UserControls\mailmerge.ascx file Here’s our function

.info,.success,.warning,.error { border: 1px solid; margin: 10px 0px; padding:15px 10px 15px 15px; background-repeat: no-repeat; background-position: 10px center; -moz-border-radius: 4px; }.error { color: #D8000C; background-color: #FFBABA; } Just some styling. P.S. we should try to get Arena to add these** common styles into the main arenaBasic.css Inside the UserControls\mailmerge.ascx file **Adapted from