Autor | Zpráva | ||
---|---|---|---|
slacooo Profil |
#1 · Zasláno: 27. 1. 2012, 14:04:59
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()" >..... |
||
Časová prodleva: 3 dny
|
|||
peta Profil |
#2 · Zasláno: 30. 1. 2012, 14:30:08
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? |
||
slacooo Profil |
#3 · Zasláno: 30. 1. 2012, 23:28:22
peta, uz to mam vyriesene, pomohlo mi aj to co si napisal. nemal som definovane okrem ineho aj form name, dik
|
||
Časová prodleva: 12 let
|
0