Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help on PopUp from Javascript Guru!

    Hi,

    I"m using a poll application called Vote! Pro. Like many apps like this, once you vote and select the vote button, a pop up is generated that shows the voting results to date. The problem is this pop up is HUGE! The vote results are only like 300x500 or so.

    So, I am trying to find out how the attached code can be altered to generate a popup with the dimensions I specify. Here is the code - thanks in advance! I really appreciate any help you can provide...

    ---------

    <script language="javascript">
    document.write("<span id=pollspoll11987></span>");
    var curURL = document.URL;
    var curPos = curURL.indexOf("?");
    if(curPos <= 0)
    {
    var preURL = curURL;
    var curURL = "?";
    }
    else
    {
    var preURL = curURL.substr(0,curPos);
    var curURL = curURL.substr(curPos);
    }
    var sURL = 'http://www.rcflyzone.com/polls/poll_frame.php'+ curURL +'&poll_id=11_9_8_7&main_action_url=' + preURL;

    document.write ('<iframe OnLoad="Showpollspoll11987();" src="'+ sURL +'" id="Frmpollspoll11987" width=0 height=0 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>');
    function Showpollspoll11987()
    {
    var Test = frames.Frmpollspoll11987.document.all.item("pollspoll11987").innerHTML;
    document.all.item("pollspoll11987").innerHTML = Test;
    }
    </script>

  • #2
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    37 Views and no one knows? Someone who knows how to handle an IFRAME popup call in terms of specifying dimensions of the pop up is appreciated....

    Thx.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The script you posted don't make a pop up at all. it loads a page in an invisible iframe, then picks some innerHTML in an element in that page and put it into the element of the origin page.

    so the dimensions of the innerHTML in the document load will dictate the dimension of the origin element unless this elements dimension are predefined to and unchangable size.

    and further more as far as I can see the script will only work in browsers that support the all collection(IE,Opera?) and not at all in FF.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •