Skip to content

Instantly share code, notes, and snippets.

@razass
razass / gist:559428
Created August 31, 2010 17:52 — forked from ericf/gist:554359
/**
* Link Tests
*/
YUI.add('ttw-link-test', function(Y){
var matchSuite = new Y.Test.Suite('Link - Matching'),
sanitizeSuite = new Y.Test.Suite('Link - Sanitize');
function buildMatchTestCase (name, allows, rejects) {
/**
* Sanitize URL — Validate it looks like a URL, then make it less dirty.
*
* Oddnut Software
* Copyright (c) 2010 Eric Ferraiuolo - http://eric.ferraiuolo.name
* MIT License - http://www.opensource.org/licenses/mit-license.php
*
* Examples:
*
* 'Http://WWW.example.com/' » 'http://www.example.com/'
YUI({filter: 'raw', combine : false}).use('node', 'scrollview', function(Y) {
var scrollView = new Y.ScrollView({
srcNode: '#searchresults', //where #searchresults is a wrapper div on the table rows.
height: 350
});
scrollView.render();
});
<!DOCTYPE html>
<html>
<head>
<title>lucenbills test</test>
<script type="text/javascript" charset="utf-8" src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
<style type="text/css">
#image {
width: 300px;
objImg = new Image();
objImg.src = 'photo.gif';
if(!objImg.complete){}
* Retrieves the value and text from the selected option in a select
*
* @method getSelectValues
* @public
* @since 1.0.0
* @returns [object]
*/
getSelectValues : function(inp) {
var value, txt;