[Javascript] Dynamic resizing of a popup depending of the conten

BEKIM BACAJ Trojani2000 at hotmail.com
Wed Apr 4 18:42:47 CDT 2001


Maby Navigator doesn't understand the 'name' object maybe it is depricated, I'm not familiar with Navigator that much, but why don't you try out more implicit identification of you're object (img) with <img ID='btn_close...> instead of <img Name='btn_close'. But before you do that, please take a moment in checkin if you correctly spelled the ID,that is NAME of the image in you're reference, even if you didn't make that error in you're question.
But nayway, if this doesn't solve youre problem, you will have to spent some time in reading documentation on Netscape references, because the problem may not be in missunderstanding the rreferal object but the other part '...offsetParent.offsetTop'!



----- Original Message -----
From: Denti Xavier
Sent: Wednesday, April 04, 2001 2:26 PM
To: javascript at LaTech.edu
Subject: [Javascript] Dynamic resizing of a popup depending of the conten


Hi all,  

I using a image button that is at the bottom of my popup.

<a href="javascript:window.close();"><img border="0"
src="../img/btn_close.gif" width="60" height="12" name="btn_close"></a>  

To find it's position I use :

popUpHeight = (200)+btn_close.offsetParent.offsetTop

window.resizeTo(320,popUpHeight);

and this gives me the distance from the top of the popup wich I add to
the minimum size (200) I defined.  
It works fine under IE, but not under Netscape, where it says btn_close
not defined.

If anybody has an idea...  

Xavier  


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript<br clear=all><hr>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.<br></p>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010405/04381e8a/attachment.htm>


More information about the Javascript mailing list