<%-- Created by IntelliJ IDEA. User: dlucas Date: Nov 16, 2010 Time: 8:09:29 PM To change this template use File | Settings | File Templates. --%> Video Search Results function updateOffset() { var max = document.getElementById("max").value; var pages = Math.ceil(${totalCount ?: 0} / max); if(document.getElementById("pageOffset").value >= 1 && document.getElementById("pageOffset").value <= pages) { document.getElementById("offset").value = (document.getElementById("pageOffset").value - 1) * document.getElementById("max").value; document.paginateForm.action = "results"; document.paginateForm.submit(); } else { alert("Input must be between 1 and " + pages + "."); } } function exportAs() { var formatSelect = document.getElementById("format") var format = formatSelect.value; if ( format != "null" ) { var exportURL = "${createLink(controller: 'videoDataSetExport', action: 'export', params: params)}"; exportURL += "&format=" + format; //alert(exportURL); formatSelect.selectedIndex = 0; window.location = exportURL; } }

Video Search Results

${flash.message}
var globalActiveIndex=${videoDataSetResultCurrentTab}; var Dom = YAHOO.util.Dom; var tab1Div = Dom.get("tab1"); var tab2Div = Dom.get("tab2"); var tabView = new YAHOO.widget.TabView('demo'); var tab0 = tabView.getTab(0); var tab1 = tabView.getTab(1); function updateCurrentTab(tabIndex) { var link = "${createLink(action: sessionAction, controller: sessionController)}"; if(tabIndex != globalActiveIndex) { globalActiveIndex = tabIndex; new Ajax.Request(link+"?"+"videoDataSetResultCurrentTab="+globalActiveIndex, {method: 'post'}); } } function handleClickTab0(e) { updateCurrentTab(0); } function handleClickTab1(e) { updateCurrentTab(1); } tab0.addListener('click', handleClickTab0); tab1.addListener('click', handleClickTab1); tab1Div.style.visibility = "visible" tab2Div.style.visibility = "visible"