Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- jQuery( function() {
- {foreach $datos as $d}
- {if $d.framebreaker!="Si"}
- {/if}
- {/foreach}
- });
- function hide(id){
- if($('#' + id).css('display')=="none"){
- $('#' + id).css('display', 'inline');
- }else{
- $('#' + id).css('display', 'none');
- }
- }
- var popwin
- var serv
- function popup(url, id){
- serv=id;
- popwin = window.open('index.php?Votaciones.popup&url=' + url, 'Voto_WoW_Sulvus', 'scrollbars=1,resizable=1,width=900,height=500,left=150,top=150');
- if(popwin!=null){
- }else{
- alert("Tienes un bloqueador de ventanas emergentes, desactivalo");
- }
- intimer = setInterval("intervalo()", 1000);
- }
- function intervalo(){
- if(popwin!=null){
- if(!popwin.closed){
- if(popwin.frames.length!=3){
- clearInterval(intimer);
- intimer=null;
- cargar('mensaje', 'Votaciones.validarVoto&servidor='+serv);
- popwin.close();
- }else{
- return;
- }
- }else{
- clearInterval(intimer);
- intimer=null;
- //alert("No debes cerrar la ventana antes de votar");
- }
- }
- }
- $(function() {
- $('a.showPopup').click(function(e) {
- e.preventDefault();
- var $this = $(this);
- var horizontalPadding = 15;
- var verticalPadding = 15;
- $('<iframe id="' + this.rel + '" src="' + this.href + '" />').dialog({
- title: ($this.attr('title')) ? $this.attr('title') : 'Site',
- autoOpen: true,
- width: 900,
- height: 500,
- modal: true,
- resizable: false,
- autoResize: true,
- overlay: {
- opacity: 0.5,
- background: "black"
- }
- }).width(900 - horizontalPadding).height(500 - verticalPadding);
- var iframeopen=0;
- var servidor=this.rel;
- $('#'+ this.rel).load( function(){
- if(iframeopen==0){
- iframeopen=1;
- alert("Recuerda escribir correctamente el código de verificación");
- }else{
- cargar('mensaje', 'Votaciones.validarVoto&servidor=' + servidor);
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement