View Full Version : Need Help on PopUp from Javascript Guru!

03-24-2005, 10:11 PM

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 = "?";
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;

03-26-2005, 11:52 AM
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....


03-26-2005, 12:21 PM
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.