// 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=690,height=500'; URL = 'presentaciones.php?IdPresentacion=' + IdPresentacion + '&IdPublic=' + IdPublic + ''; //alert (URL); window.open(URL ,WindowName , WindowFeatures); } // Esta funcion no ve o no se llama o no se le puede pasar el parámetro, no lo se. function VerNotica(Link){ //v1.0 var WindowName=''; var WindowFeatures=''; var URL; WindowFeatures = 'scrollbars=yes,width=590,height=500'; URL = 'http://' + Link + ''; alert (URL); window.open(URL ,WindowName , WindowFeatures); } function VerAlbumes(IdPublic, FromAdmin, Frame){ //v2.0 var WindowName=''; var WindowFeatures=''; var URL; var RootFolder=''; var NombreFrame; if (Frame=='top'){ NombreFrame = 'whc_top'; }else if(Frame=='left'){ NombreFrame = 'whc_left'; }else if(Frame=='right'){ NombreFrame = 'whc_right'; }else if(Frame=='bottom'){ NombreFrame = 'whc_bottom'; }else{ NombreFrame = 'whc_outline'; } //alert ('Frame:'+Frame+'; NombreFrame:'+NombreFrame); if (FromAdmin){ RootFolder='../' }else{ RootFolder='' } if (IdPublic==''){ URL = RootFolder+'albumes.php'; }else{ URL = RootFolder+'albumes.php?AlbumesTree[ShowNode]=' + IdPublic + '&frame='+NombreFrame+'&target="_top"'; } WindowName='_self'; //, 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; }; }