ctrl_alt_delete Posted June 5, 2007 Share Posted June 5, 2007 aspx ile yazılmış bir sayfa var. Bu sayfaya bir metin koymak istiyorum. Metnin altına bir check-box ve yanında bir buton. Kullanıcılar Kabul Ediyorum yazısı yanındaki kutuyu işaretleyince link vereceğim butonun aktif olmasını istiyorum.. Nasıl yapacağım konusunda hiçbir fikrim yok Template sayfamın kodları aşağıdaki gibidir.. <%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-9" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" /> <!-- TemplateBeginEditable name="doctitle" --> <title>Site Başlığı</title> <!-- TemplateEndEditable --> <link href="../../../style_bankamiz.css" rel="stylesheet" type="text/css" /> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> </head> <body> <table width="530" border="0" cellspacing="0" cellpadding="10"> <tr> <td><!-- TemplateBeginEditable name="icerik_buraya" --> <h1>Duyurular </h1> <form id="form1" name="form1" method="post" action=""> <label>Şartları okudum, kabul ediyorum.<br /> <input name="onay" type="checkbox" id="onay" /> </label> <label> <input type="submit" name="Buton" id="Buton" value="Siteye Git" /> </label> </form> <!-- TemplateEndEditable --></td> </tr> </table> </body> </html> Buna benzer birşeyi JS ile yapılmış olarak anlatıyorlar ama olmadı .. <input type="radio" id="myRadioButton"> Then you put a JavaScript Function in the head of your document: <script language="javascript"> function disable_radio(checked) { document.getElementById('myRadioButton").disabled = checked; } </script> Then you call the function in each checkbox you want to disable the radio-Button. <input type="checkbox" onclick="disable_checkbox(this.checked);"> It should work. Link to comment Share on other sites More sharing options...
DeTeCTeD Posted June 5, 2007 Share Posted June 5, 2007 Dostum aslında bunlar daha kolay olarak java scriptle yapılır. Sanırım sen şöyle bişey istiyorsun. <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function Disab() { frm=document.forms[0] if(frm.cbox.checked) {frm.Button1.disabled=false} else {frm.Button1.disabled=true} } </SCRIPT> </HEAD> <BODY TEXT="000000" BGCOLOR="FFFFFF"> <form> <div align="center"> <input name="cbox" type="checkbox" id="cbox" value="checkbox" onClick=Disab();> Kullanım Koşullarını Okudum ve Kabul Ediyorum </div> <p align="center"> <input type=button onClick="alert('İlk başlangıçta aktif gibi gözüksede aslında pasiftir., Eğer buraya başka şeyler yapmak istersen yapabilirsin. Yönlendirme gibi. url belirterek olabilir. DeTeCTeD A. N.Ç.!')" value="Button" name="Button1"> </form> </BODY> </HTML> Sanırım böyle bişey istedğin.. Bir dene istersen daha fazla da yardımcı olabilirim. Kolay Gele.... Link to comment Share on other sites More sharing options...
ctrl_alt_delete Posted June 5, 2007 Author Share Posted June 5, 2007 Bir yerde hata verdi.. Butona tıklayınca Please register to see this content. gibi bir siteye gitmesini istiyorum.. Script içerisinde bir yerde ' ' eksik.. Birde butona onclik adresi yazdım ama error verdi sayfa Link to comment Share on other sites More sharing options...
DeTeCTeD Posted June 5, 2007 Share Posted June 5, 2007 Şunu Dene Kardeş Çalışıyor Denedim <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function adres() { frm=document.forms[0] if(frm.cbox.checked) {frm.Button1.disabled=false} else {frm.Button1.disabled=true} } function adreseGit(adres) { document.location.href=adres; } </SCRIPT> </HEAD> <BODY TEXT="000000" BGCOLOR="FFFFFF"> <form> <div align="center"> <input name="cbox" type="checkbox" id="cbox" value="checkbox" onClick=adres();> Kullanım Koşullarını Okudum ve Kabul Ediyorum </div> <p align="center"> <input type=button onClick="adreseGit('http://www.DeTeCTeD-FalanAdres.com')" value="TAMAM" name="Button1"> </form> </BODY> </HTML> Bu kodları önce bir not defterine at daha sonra hehangi bir editöre geçir istersen hata çıkmayacaktır. Kolay Gele... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.