Kan någon klura ut detta åt mig?! Please... Prova att lägga in ID i select taggen. Så här funkar det bra:Grrr...
Jag försöker göra en dropbox åt en kompis, där man skall kunna välja ett personnamn och sedan öppna ett fönster....
Det funkar så långt som till att det jä-la scriptet inte vill fatta vad jag anropar för värde...
Några idéer?!
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>
<body bgcolor="#FFFFFF">
<script language='javascript'>
function openWindow() {
winStats='toolbar=no,location=no,directories=no,menubar=no,'
winStats+='scrollbars=no,width=275,height=175'
if (navigator.appName.indexOf("Microsoft")>=0) {
winStats+=',left=10,top=25'
}
else
{
winStats+=',screenX=10,screenY=25'
}
floater=window.open('STIL.VALUE',"",winStats)
}
</script>
<FORM NAME="STIL" ACTION="#">
<FONT FACE="Comic Sans MS" SIZE=4>My links</FONT><BR>
<SELECT OnChange="openWindow();">
<option selected>Choose one <option VALUE="#">---Family--- <option VALUE="http://www.geocities.com/Area51/Keep/4482/">Brother Rodney <option VALUE="#">Brother Nicki <option VALUE="#">Sister Monique <option VALUE="http://www.geocities.com/FashionAvenue/Catwalk/2201/">Sister Marcella <option VALUE="#"> <option VALUE="#">---Friends--- <option VALUE="http://www.ergocogito.com">Daniel Arvastsson <option VALUE="http://www.christianspowe.com/cv.html">Christian Spowe <option VALUE="http://www.psilander.com">Christofer Psilander <option VALUE="http://www.geocities.com/amad_monemi/">Ahmad
<option VALUE="http://www.talk.to/biggles">Biggles
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
</select>
</FORM>Sv: Grrr...
<SELECT id="Namn" OnChange="openWindow();">
<script language='javascript'>
function openWindow() {
winStats='toolbar=no,location=no,directories=no,menubar=no,'
winStats+='scrollbars=no,width=275,height=175'
if (navigator.appName.indexOf("Microsoft")>=0) {
winStats+=',left=10,top=25'
}
else
{
winStats+=',screenX=10,screenY=25'
}
floater=window.open('STIL.Namn.VALUE',"",winStats)
}
</script>
Torrkodat, inte testkört att det funkar.
Men kanske kan vara en hjälp på vägen?
// Anna-KarinSv: Grrr...
-------------------------
<code>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>
<body bgcolor="#FFFFFF">
<script language='javascript'>
function openWindow() {
winStats='toolbar=no,location=no,directories=no,menubar=no,'
winStats+='scrollbars=no,width=275,height=175'
if (navigator.appName.indexOf("Microsoft")>=0) {
winStats+=',left=10,top=25'
}
else
{
winStats+=',screenX=10,screenY=25'
}
floater=window.open(document.STIL.mySel.options[document.STIL.mySel.selectedIndex].value,"",winStats)
}
</script>
<FORM NAME="STIL" ACTION="#">
<FONT FACE="Comic Sans MS" SIZE=4>My links</FONT><BR>
<SELECT id="mySel" OnChange="openWindow();">
<option selected>Choose one <option VALUE="#">---Family--- <option VALUE="http://www.geocities.com/Area51/Keep/4482/">Brother Rodney <option VALUE="#">Brother Nicki <option VALUE="#">Sister Monique <option VALUE="http://www.geocities.com/FashionAvenue/Catwalk/2201/">Sister Marcella <option VALUE="#"> <option VALUE="#">---Friends--- <option VALUE="http://www.ergocogito.com">Daniel Arvastsson <option VALUE="http://www.christianspowe.com/cv.html">Christian Spowe <option VALUE="http://www.psilander.com">Christofer Psilander <option VALUE="http://www.geocities.com/amad_monemi/">Ahmad
<option VALUE="http://www.talk.to/biggles">Biggles
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
<option VALUE="#">-
</select>
</FORM>
</body>
</html>
</code>
--------------
/Christian