Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 08-27-2014, 08:09 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
How do i open a popup window inside PHP code

How do i open a popup window inside PHP code

I am using the following code but it opens a full size new window

PHP Code:
<td width 18%><a align 'left 'href=\"EditComments.php    \" target='popup'  id = \" hrefsidd \

                                                                     \" onclick = \" 'window.open('EditComments.php','non_Popup',top = 200,left = 400 ,'width=200,height=200',location=no ,resizable=yes ,scrollbars=yes') return false; \"     \">

                                                                                TEST</a> </td> <b> 

Last edited by stephen001; 08-27-2014 at 08:13 AM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 08-31-2014, 07:00 PM
rtrethewey rtrethewey is offline
Junior Member
 
Join Date: 01-30-12
Posts: 9
iTrader: 0 / 0%
Remove the single quotes around the width and height settings in the window.open() function parameters.

This:
Code:
'width=200,height=200'
should be:
Code:
width=200,height=200
 
Reply With Quote
  #3  
Old 09-04-2014, 12:57 AM
stephen001 stephen001 is offline
Contributing Member
 
Join Date: 04-25-13
Posts: 89
iTrader: 0 / 0%
Quote:
Originally Posted by rtrethewey View Post
Remove the single quotes around the width and height settings in the window.open() function parameters.

This:
Code:
'width=200,height=200'
should be:
Code:
width=200,height=200
i did the same but still it opens a window in New Tab

see my exact code below




PHP Code:
<?php

      
for($i 0$i<$numRows$i++)
      {
                                                 

     print 
"\t <table width =100% border = 1 bgcolor=#FFFFFF table- layout:fixed;> <tr> <th> </th> </tr> <tr> 

                                                                             

           <td width = 17%>

           <a align = 'left 'href=\"EditComments.php \"   

           \"onclick=\" 'window.open(this.href,'nom_Popup',height=400 , width=400 ,location=no ,resizable=yes ,scrollbars=yes')

            return false; \"  \"> ClickToOpenaWindow1  </a>  </td>

                                                                               
            <td width = 17%>
            <a align = 'left 'href=\"EditComments.php    \" target='popup'  id = \" hrefsidd \
            \" onclick = \" 'PopupCenter('this.href','non_Popup',top = 200,left = 400 ,width=200,height=200,location=no ,resizable=yes ,scrollbars=yes') return false; \"     \">
             ClickToOpenaWindow2</a> </td>

                                                                                 
                                                                                                        
                 </td>
             </table>\t "
;
       
     }

                               

?>
similar code i have without PHP in same page it works fine below is the html code

HTML Code:
<a href="EditComments.php" title="Ouverture d'une nouvelle fenÍtre popup" onclick="window.open(this.href,'nom_Popup','height=400 , width=400 ,location=no ,resizable=yes ,scrollbars=yes');return false;">OpenaPopupWindow+</a></div>
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is popup window blocking seo submission? ponmayil SEO Forum 7 11-03-2011 10:10 PM
Css/Javascript popup window flint Coding Forum 2 01-17-2011 10:03 AM
Popup new window bekdesigns Coding Forum 1 03-03-2008 01:17 AM
Title Javascript popup window thumbtak Coding Forum 16 03-09-2007 05:44 AM
Help: Popup Window from Flash kontra Coding Forum 2 05-21-2004 09:43 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:45 PM.
Powered by vBulletin
Copyright © 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC