Forum Moderators: coopster

Message Too Old, No Replies

How to resize a window dynamically

         

tecun

12:34 am on Nov 28, 2008 (gmt 0)

10+ Year Member



Here is my issue fellows/ladies I have been trying to open up a link driven from my database, that will automatically open up the link on a different resizable page, so far I have been able to do everything, but of course been able to have the window come up with the configuration that I want, here is my code

$sql="select name, profiles, telephone, email_address, email from contacts";

$array = array();
if(mysql_query($sql))
{
$result=mysql_query($sql);
while($row=mysql_fetch_row($result)){
$array[] = "<a href=\"$row\">onClick=\"popup = window.open('$row[0]', 'height=200,width=500,resizeable=yes'); return false\"></a>"."<br>$row[2]</br>"."<a href=\"$row[3]\">$row[4]</a>";
}
}

this is what i get so far

onClick="popup = window.open('John Smith, Manager', 'height=200,width=500,resizeable=yes'); return false">
(403)000-0000
email@example.com

[1][edited by: eelixduppy at 1:12 am (utc) on Nov. 28, 2008]
[edit reason] specifics [/edit]

Anyango

3:08 am on Nov 28, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



window.resizeTo(iWidth, iHeight)

tecun

2:36 pm on Nov 28, 2008 (gmt 0)

10+ Year Member



thankyou Anyango, but it didn't work for me yet.

tecun

4:22 pm on Nov 28, 2008 (gmt 0)

10+ Year Member



Actually I think I may be half way there I implemented what you gave me and added the <script> part. However now the main window along with the link opens up to the size that I specified, and I just want the link to open up under the size wanted.

{
$result=mysql_query($sql);
while($row=mysql_fetch_row($result)){
$array[] = "<a href=\"$row[1]\">$row[0]<script>window.resizeTo(600, 300)</script></a>"."<br>$row[2]</br>"."<a href=\"$row[3]\">$row[4]</a>";