[JS] Probleem met pop-ups.		
			
		
		 		
				
		
                        
                 
                 
                 
             
            
            
				
                
                     
                    Godlord   - 19/05/2007 19:18                      
             
             
                        
                PHP gevorderde  
                 
                
				
				Hallo iedereen, 
 
Ik probeer met pop-ups te werken maar het probleem is tot mijn pop-ups worden geblokkeert door firefox. Er bestaan pop-ups die wel doorheen die pop-up blocker komen. Maar ik krijg het niet zover zou iemand me kunnen helpen hiermee? 
 
    
    
        
            
                function show_popup() {
	window.open("test.php", "Test", 'toolbar=0, menubar=0, scrollbar=0, resizable=0, width=400, height=200, location=0');
show_popup();
} 
             
            function  show_popup( )  { 
	window. open( "test.php" ,  "Test" ,  'toolbar=0, menubar=0, scrollbar=0, resizable=0, width=400, height=200, location=0' ) ; 
show_popup( ) ; 
} 
 
         
         
     
  
 
Dit staat helemaal bovenaan in de body. Als ik de pop-up accepteer dan komt er wel een pop-up maar dan staat de balk van Firefox nog onderaan weet iemand hoe ik die kan weghalen? Ook bedankt bij deze. 
 
Alvast Bedankt voor de hulp. 
 
Godlord.				
				 
              
        
		
				
		4 antwoorden 
                
                     Gesponsorde links 
                 
                
                    
		
		
	              
		
		
 
                 
            
                    
                         
                         
                         
                     
                    
                    
                        
                             
                            Stijn   - 19/05/2007 19:28 (laatste wijziging 19/05/2007 19:38)                             
                         
                     
                    
                                                     PHP expert  
                         
                        
    
    
        
            
                function show_popup() {
  window.open("test.php", "Test", 'toolbar=0, menubar=0, scrollbar=0, resizable=0, width=400, height=200, location=0');
} 
             
            function  show_popup( )  { 
  window. open( "test.php" ,  "Test" ,  'toolbar=0, menubar=0, scrollbar=0, resizable=0, width=400, height=200, location=0' ) ; 
} 
 
         
         
     
  
zet dit in je head 
 
en dit in je body 
 
@hieronder: pech dan 
                      
                
                    
                         
                         
                         
                     
                    
                    
                        
                             
                            Godlord   - 19/05/2007 19:32                            
                         
                     
                    
                                                     PHP gevorderde  
                         
                        werkt nog niet :/. 
                      
                
                    
                         
                         
                         
                     
                    
                    
                        
                             
                            Grayen   - 19/05/2007 19:46 (laatste wijziging 19/05/2007 19:47)                             
                         
                     
                    
                                                     PHP ver gevorderde  
                         
                        probeer deze code eens? 
 
    
    
        
            
                <script type="text/javascript">
var theWindow = '';
function popup(theLocation, theName, theWidth, theHeight)
{
    theTop = (screen.height) ? (screen.height - theHeight) / 2 : 100;
    theLeft = (screen.width) ? (screen.width - theWidth) / 2 : 100;
    
    theSettings = 'width = ' + theWidth + ',';
    theSettings += 'height = ' + theHeight + ',';
    theSettings += 'top = ' + theTop + ',';
    theSettings += 'left = ' + theLeft + ',';
    theSettings += 'scrollbars = yes,';
    theSettings += 'location = no,';
    theSettings += 'directories = no,';
    theSettings += 'status = no,';
    theSettings += 'menubar = no,';
    theSettings += 'toolbar = no,';
    theSettings += 'resizable = no,';
    
    theWindow = window.open(theLocation, theName, theSettings);
    
    theWindow.focus();
}
</script>
<a href="javascript:popup('blaat.php','popup','500','300');">LinkText</a> 
             
            < script type= "text/javascript" > 
var  theWindow =  '' ; 
function  popup( theLocation,  theName,  theWidth,  theHeight) 
{ 
    theTop =  ( screen. height)  ? ( screen. height -  theHeight)  /  2  :  100 ; 
    theLeft =  ( screen. width)  ? ( screen. width -  theWidth)  /  2  :  100 ; 
 
    theSettings =  'width = '  +  theWidth +  ',' ; 
    theSettings +=  'height = '  +  theHeight +  ',' ; 
    theSettings +=  'top = '  +  theTop +  ',' ; 
    theSettings +=  'left = '  +  theLeft +  ',' ; 
    theSettings +=  'scrollbars = yes,' ; 
    theSettings +=  'location = no,' ; 
    theSettings +=  'directories = no,' ; 
    theSettings +=  'status = no,' ; 
    theSettings +=  'menubar = no,' ; 
    theSettings +=  'toolbar = no,' ; 
    theSettings +=  'resizable = no,' ; 
 
    theWindow =  window. open( theLocation,  theName,  theSettings) ; 
 
    theWindow. focus( ) ; 
} 
</script> 
< a href= "javascript:popup('blaat.php','popup','500','300');" > LinkText</ a> 
 
         
         
     
   
De bovenstaande code werkt bij mij correct in firefox. 
 
Citaat: 
maar dan staat de balk van Firefox nog onderaan
 
Deze is niet weg te halen (in firefox tenminste), dat is het nadeel van popups elke browser weergeeft ze weer anders. 
                      
                
                    
                         
                         
                         
                     
                    
                    
                        
                             
                            jerone   - 20/05/2007 15:53                            
                         
                     
                    
                                                     JS gevorderde  
                         
                        maak gebruik van een layer/div ipv windows 
                      
                
                    
                         Gesponsorde links 
                     
                    
                        
		
		
	              
		
		
 
                     
                
Dit onderwerp is gesloten .