javascript - Link from PHP page to open in a fixed size window -


i trying create link inside of php search results page allows user click "open" , have 296 x 278 window come more information displayed.

all of php works correctly, having trouble opening link php page , having open in fixed sized window.

i have tried multiple different javascripts cannot seem working correctly when trying impliment $output statement.

this current $output statement open in fixed sized window. opens page in new tab.

$output .= "<tr><td>drag & drop:</b></td><td><a href='details/" . $row['idrop'] . "' target='_blank'>" . " open " . "</a>"; 

any appreciated. thank you.

try this:

$output .= "<tr><td>drag & drop:</b></td><td><a href='#_' target='_blank' onclick=\"open_me('details/{$row['idrop']}');\">open</a>"; 

aand here js function

<script> function open_me(h_rf) {     window.open(h_rf,'_blank','width=296,height=278,toolbar=0,menubar=0,location=0,status=0,scrollbars=1,resizable=0,left=0,top=0');      return false; } </script> 

read more function here: http://www.w3schools.com/jsref/met_win_open.asp


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -