Autor Zpráva
slacooo
Profil
Mam funkciu NewWindow ktora otvara nove okno, ale potrebujem do url adresy dat aj hodnotu z inputu radio,
nasiel som aj funkciu get_radio_value. Asi bude treba odoslat formular... neviem v JS nerobim. Vie mi niekto poradit ako to prepojit aby to fungovalo, dakujem.


<script>

var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
    if(pos=="random"){
        LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
        TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
    }
    if(pos=="center"){
        LeftPosition=(screen.width)?(screen.width-w)/2:100;
        TopPosition=(screen.height)?(screen.height-h)/2:100;
    }else if((pos!="center" && pos!="random") || pos==null){
        LeftPosition=0;TopPosition=20
    }
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    win=window.open(mypage,myname,settings);
}



function get_radio_value()
{
for (var i=0; i < document.orderform.music.length; i++)
   {
   if (document.orderform.music[i].checked)
      {
      rad_val = document.orderform.music[i].value;
      }
   }
}
</script>

<a href="?value=SEM HODNOTA Z RADIO" onclick="NewWindow(this.href,'mywin','470','420','no','center');return false" onfocus="this.blur()" >.....
peta
Profil
Schazi zbytek html kodu.
orderform -  schazi tag <form name="orderform">
music -  schazi tagy <input type=radio name="music">, mozna <input type=radio name="music[]">
rad_val = document.orderform.music[i].value;... - neni tam zadny return, takze musi byt globalni promennou. Takze v teto promenne je vysledek. Pouzivas ji nekde? 
Volas tu funkci get_radio_value() nekde?
slacooo
Profil
peta, uz to mam vyriesene, pomohlo mi aj to co si napisal. nemal som definovane okrem ineho aj form name, dik

Vaše odpověď

Mohlo by se hodit

Neumíte-li správně určit příčinu chyby, vkládejte odkazy na živé ukázky.
Užíváte-li nějakou cizí knihovnu, ukažte odpovídajícím, kde jste ji vzali.

Užitečné odkazy:

Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0