// JavaScript Document function VistaPreliminar() { //v2.0 // var WindowName=''; // var WindowFeatures=''; var BrowserName=''; var IdPresentacion; var IdPublic; // var URL; // WindowFeatures = 'scrollbars=yes,width=590,height=500'; BrowserName = document.frmContent.elements['BrowserName'].value; IdPresentacion = document.frmContent.elements[BrowserName + '[ModelData][IdPresentacion]'].value; IdPublic = document.frmContent.elements[BrowserName + '[ModelData][IdPublic]'].value; ComboBox = document.frmContent.elements[BrowserName + '[ModelData][IdPresentacion]']; Default = ComboBox.options[ComboBox.selectedIndex].defaultSelected; if(!Default) { alert('¡¡Sin guardar!!\n\nRecurde que la presentación seleccionada no ha sido guardada todavía.\n\n'+ 'La puede previsualizar aunque, si no la guarda, los cambios no tendrán efectos reales.'); } // URL = 'presentaciones.php?IdPresentacion=' + IdPresentacion + '&IdPublic=' + IdPublic + '#'; // window.open(URL ,WindowName , WindowFeatures); VerPresentacion(IdPresentacion, IdPublic); } function VerPresentacion(IdPresentacion, IdPublic){ //v2.0 var WindowName=''; var WindowFeatures=''; var URL; WindowFeatures = 'scrollbars=yes,width=590,height=500'; URL = 'presentaciones.php?IdPresentacion=' + IdPresentacion + '&IdPublic=' + IdPublic + ''; //alert (URL); window.open(URL ,WindowName , WindowFeatures); } function VerAlbumes(IdPublic, FromAdmin){ //v2.0 var WindowName=''; var WindowFeatures=''; var URL; var RootFolder=''; if (FromAdmin){ RootFolder='../' }else{ RootFolder='' } if (IdPublic==''){ URL = RootFolder+'albumes.php'; }else{ URL = RootFolder+'albumes.php?AlbumesTree[ShowNode]=' + IdPublic + '&frame=whc_outline#here target="_top"'; } WindowName='_blank'; //, fullscreen=yes, menubar=yes WindowFeatures += 'scrollbars=yes'; WindowFeatures += ', top=' + 0; WindowFeatures += ', left=' + 0; WindowFeatures += ', width=' + (screen.availWidth - 10); WindowFeatures += ', height=' + (screen.availHeight - 30); WindowFeatures += ', resizable=yes'; window.open(URL ,WindowName , WindowFeatures); }// End VerAlbumes() function ComprobarLongitudMaxima(obj, LongitudMaxima){ //v2.0 var strTexto=''; if(obj.value.length >= LongitudMaxima){ strTexto += 'Ha superado el tamaño máximo permitido. '; strTexto += 'La longitud máxima es ' + LongitudMaxima ; strTexto += ' y su texto tiene ' + obj.value.length + ' caracteres.'; alert(strTexto); return false; }; }