Avatar billede escaton Nybegynder
23. august 2003 - 22:45 Der er 13 kommentarer og
1 løsning

åben i 500*500

Jeg vil gerne have at den åbner i 500*500

function search(frm) {
win = window.open("","","scrollbars");
win.document.write(page);
txt = frm.srchval.value.split(" ");
Avatar billede superanden Nybegynder
23. august 2003 - 22:50 #1
hvad skal åbne et popup vindue?
Avatar billede eazye Nybegynder
23. august 2003 - 22:51 #2
window.open("","","scrollbars","height='500',width='500'");
Avatar billede dr0zie Nybegynder
23. august 2003 - 22:52 #3
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da">
<head>
<title>Centreret popup vindue</title>

<script type="text/javascript">
<!-- Dette script og mange flere -->
<!-- findes hos http://www.html.dk -->
<!-- Start

function popup(url,name,win_height,win_width) {
    pos_horizon = ((screen.width/2)-(win_width/2));
    pos_vertical = ((screen.height/2)-(win_height/2));
    window.open(url,name,"width="+win_width+",height="+win_height+",top="+pos_vertical+",left="+pos_horizon);
    }

// Slut -->
</script>

</head>
<body>

<p><a href="#" onclick="popup('popup.asp','mitvindue','300','300');">Åben popup vindue</a></p>

</body>
</html>
Avatar billede dr0zie Nybegynder
23. august 2003 - 22:53 #4
håber det var det men er sq ikke sikker :(
Avatar billede escaton Nybegynder
23. august 2003 - 22:59 #5
Håber det her vil hjælpe jer lidt:

<Head>
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var item = new Array();

// "Page Name","path","Page Title","Many,Key,Words","Descriptive Comments"

c=0; item[c]=new Array("iframeindex.htm","","News","news","News page with all updated information about http://www.fairshow.com.");
c++; item[c]=new Array("iframecontact.htm","","Contact","contact,email,address","Contact the team behind http://www.fairshow.com.");
c++; item[c]=new Array("iframecopyright.htm","","Copyright","copyright,rules,rule","Read the copyright.");
c++; item[c]=new Array("iframeinformation.htm","","Information","information","Read all that is worth to know about http://www.fairshow.com.");
c++; item[c]=new Array("iframesignup.htm","","Sign Up","sign up","See how you get a stand and sign up for one here.");
c++; item[c]=new Array("sitemap.htm","","Sitemap","sitemap,find","Sitemap over http://www.fairshow.com.");

c++; item[c]=new Array("iframeboat.htm","halls/boat/","Boat","boat,hall","Hall site for all boat stand.");

c++; item[c]=new Array("iframecar.htm","halls/car/","Car","Car,hall","Hall site for all car stand.");
c++; item[c]=new Array("bilbiksen.htm","halls/car/bilbiksen/","Bilbiksen","Car,bilbiksen,104,","Bilbiksen Stand, an stand full of the newest cars.");

c++; item[c]=new Array("iframecomputer.htm","halls/computer/","Computer","computer,hall","Hall site for all computer stand.");

c++; item[c]=new Array("iframecooking.htm","halls/cooking/","Cooking","cooking,hall","Hall site for all cooking stand.");

c++; item[c]=new Array("iframefarming.htm","halls/farming/","Farming","farming,hall","Hall site for all farming stand.");

c++; item[c]=new Array("iframefishing.htm","halls/fishing/","Fishing","fishing,hall","Hall site for all fishing stand.");

c++; item[c]=new Array("iframehome.htm","halls/home/","Home","home,hall","Hall site for all home stand.");

c++; item[c]=new Array("iframekitchen.htm","halls/kitchen/","Kitchen","kitchen,hall","Hall site for all kitchen stand.");

c++; item[c]=new Array("iframetravel.htm","halls/travel/","Travel","travel,hall","Hall site for all travel stand.");

page="<html><head><title>Search Results</title></head><body bgcolor='white'><center><table border=0 cellspacing=10 width=80%>";


function search(frm) {
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("</table><br>Total found: "+total+"<br></body></html>");
win.document.close();
}
function show(which,wind,num) {
link = item[which][1] + item[which][0];
line = "<tr><td><a href='"+link+"'>"+item[which][2]+"</a> <br>";
line += item[which][4] + "<br></td></tr>";
wind.document.write(line);
return 1;
}
//  End -->
</script>
</head>
<body>
<form method=get action="java script:void(0)" onsubmit="search(this); return false;">
Search:<br>
<input type=text name=srchval value="" size="13"><br>
<input type=submit value="Go!">
</form>

det er en søgemaskine og den åbner med de fundet emner i et nyt vindue som jeg gerne vil have til at åbne i fx. 500*500

Tak

ps. flere points kan gives hvis det er...
Avatar billede socle Nybegynder
23. august 2003 - 23:24 #6
midt i skriptet:

function search(frm) {
window.open("","","scrollbars");
win.document.write(page);

erstattes af

function search(frm) {
window.open("","","scrollbars,resizable=0,height=500,width=500");
win.document.write(page);
Avatar billede escaton Nybegynder
23. august 2003 - 23:35 #7
okay, nu åbner den i 500*500, men det er en blank side der kommer frem :(
Avatar billede socle Nybegynder
23. august 2003 - 23:46 #8
? det får jeg også når jeg bruger koden uden mit forslag..
Avatar billede socle Nybegynder
23. august 2003 - 23:47 #9
win er ikke defineret..
Avatar billede socle Nybegynder
23. august 2003 - 23:47 #10
ah, ok, to sek.
Avatar billede socle Nybegynder
23. august 2003 - 23:48 #11
function search(frm) {
window.open("","","scrollbars");
win.document.write(page);

erstattes af

function search(frm) {
win = window.open("","","scrollbars,resizable=0,height=500,width=500");
win.document.write(page);
Avatar billede socle Nybegynder
23. august 2003 - 23:50 #12
manglede at sætte
[win = ]
Avatar billede escaton Nybegynder
23. august 2003 - 23:54 #13
Sejt,... du syre bare til det der :) Tusind tak for hjælpen du er bare supermand... :)
Avatar billede socle Nybegynder
24. august 2003 - 00:19 #14
tak
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester