Jump to content

anti91

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by anti91

  1. Thanks your reply, I am beginner javascript about. I found that code anywhere forum and I need adapt it in my HTLM codes. I tried change it ,but i can't adapt code in my Htlm. :SMeanwhile what is your advise learn javasciprt to edit these type codes for me?Can you do it for me ? a lot of Thanks jsfiddle.n e t/66Lam/ this is my htlm codes:

    <div id="soruareain"  class="soruareainimagesiz" >	<div id="sorunodiv">		<div id="soruno">			1		</div>	</div>	<div id="soruveseceneklerdiv">		<div id="sorunediv">			<div id="sorune">				Which sport is playing with ball ?			</div>		</div>		<div id="soruseceneklerdiv">			<div id="sorusecenekler">								<div id="cevap1"					class="dcevap  cevaplaraltalta ">										<input type="radio" name="cevapr" id="cevapr1"						value="1" class="rcevap" /> <span class="lcevap"						onclick="sec(1);">athletics </span>				</div>								<div id="cevap2"					class="dcevap  cevaplaraltalta ">										<input type="radio" name="cevapr" id="cevapr2"						value="2" class="rcevap" /> <span class="lcevap"						onclick="sec(2);">swimming </span>				</div>								<div id="cevap3"					class="dcevap  cevaplaraltalta ">										<input type="radio" name="cevapr" id="cevapr3"						value="3" class="rcevap" /> <span class="lcevap"						onclick="sec(3);">fencing </span>				</div>								<div id="cevap4"					class="dcevap  cevaplaraltalta ">										<input type="radio" name="cevapr" id="cevapr4"						value="4" class="rcevap" /> <span class="lcevap"						onclick="sec(4);">Football </span>				</div>								<div style="display: none;">					<input type="hidden" name="cevapadet" id="cevapadet"						value="4" />				</div>			</div>		</div>	</div>  

    so I changed it but it's not work.

    var questionTxt = $("div [id$='sorune']");questionTxt.each ( function () {    var bFoundAnswer    = false;    var answerTxt       = getAnswer (this.textContent);    if (answerTxt) {        //--- We have the answer text, now find the matching radio button and select it.        var ansForThisQ     = $(this).parent (). nextAll ("div.sorusecenekler").find ("span");

    What is my problem ?

  2. I want the browser to be able to select correct answers to questions. I found an answer that seems to be the right idea (How can I automatically select specific radio buttons with Greasemonkey?) but I don't know enough javascript to use it.My HTML code is shown in but i can't adapt it like as followsjsfiddle.n e t/66Lam/Ex: it's working here, but i can't adapt it my code.jsfiddle.n e t/kDThC/8/Can you adapt it for me Please ? THANKS GUYS

×
×
  • Create New...