Quick JS Question...
<script LANGUAGE="JavaScript">
c=0; item[c]=new Array("abrion/150090.html","","Abregado","Abregado","Sector: AbrionPlanetsPlanet 1Planet 2Planet 3Planet 4Planet 5Planet 6Planet 7Planet 8Planet 9");
c++; item[c]=new Array("abrion/170070.html","","Cathar","Cathar","Sector: AbrionPlanetsPlanet 1Planet 2Planet 3Planet 4Planet 5Planet 6Planet 7Planet 8Planet 9");
page="Galaxy Map Search Results";
function search(frm) {
win = window.open("","","scrollbars");
win.document.write(page);
txt = frm.srchval.value.split(" ");
fnd = new Array(); total=0;
for (i = 0; i < item.length; i++) {
fnd[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].toLowerCase().indexOf(txt[k]) > -1 && txt[k] != "")
fnd[i] += (j+1);
}
for (i = 0; i < fnd.length; i++) {
n = 0; w = -1;
for (j = 0;j < fnd.length; j++)
if (fnd[j] > n) { n = fnd[j]; w = j; };
if (w > -1) total += show(w, win, n);
fnd[w] = 0;
}
win.document.write("Total found: "+total+"");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0];
line = ""+item[which][2]+"";
line += item[which][4] + "";
wind.document.write(line);
return 1;
}
// End -->
</script>
I have a JS search engine I want to use but I wish to cahnge the size of the pop-up window in which the results appear.
Now I know I have to edit this line:
win = window.open("","","scrollbars");
to make the pop-up a different size but i've tried everything and can't seem to get it to change size. Any ideas?
Abhishek Reddy posted this at 12:44 — 19th May 2002.
He has: 3,348 posts
Joined: Jul 2001
For the sake of testing it locally, could you post the full page code?
Altering a popup window's width and height goes like this:
window.open("page.html","name","width=200,height=400");
Warlord_Khan posted this at 17:29 — 19th May 2002.
They have: 6 posts
Joined: Apr 2002
cheers mate, she works.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.