Popup Size

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jason .

    Popup Size

    Is there a way to dynamically size a popup object?

    i.e.
    function getMetricDesc(s Description) {
    var oPopup = window.createPo pup();
    var oPopupBody = oPopup.document .body;
    oPopupBody.inne rHTML = sDescription
    oPopupBody.styl e.border = "1 solid black"
    oPopupBody.styl e.backgroundCol or = "#ffffcc";
    oPopup.show(30, 20, 775, 400, window.event.sr cElement);-->
    }
    I need the paramater of 400 in the oPopup.show to be dynamic due because
    I will not know the length of text to populate the popup. I guess an
    alternative solution would be to add scroll bars but is that possible
    with this object?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Hywel Jenkins

    #2
    Re: Popup Size

    In article <3f79963c$0$620 82$75868355@new s.frii.net>, jrp210@yahoo.co m
    says...[color=blue]
    > Is there a way to dynamically size a popup object?
    >
    > i.e.
    > function getMetricDesc(s Description) {
    > var oPopup = window.createPo pup();
    > var oPopupBody = oPopup.document .body;
    > oPopupBody.inne rHTML = sDescription
    > oPopupBody.styl e.border = "1 solid black"
    > oPopupBody.styl e.backgroundCol or = "#ffffcc";
    > oPopup.show(30, 20, 775, 400, window.event.sr cElement);-->
    > }
    > I need the paramater of 400 in the oPopup.show to be dynamic due because
    > I will not know the length of text to populate the popup. I guess an
    > alternative solution would be to add scroll bars but is that possible
    > with this object?[/color]

    Set MyVarHere to whatever you want the dimension to be.

    oPopup.show(30, 20, 775, MyVarHere, window.event.sr cElement);

    --
    Hywel I do not eat quiche


    Comment

    • Jason .

      #3
      Re: Popup Size


      That's the easy part. How do I go about determining the size (height)
      based on the text that should be displayed?

      Not all descriptions have the same amount of text.

      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      Working...