Jump to content

tomjerry

Members
  • Posts

    4
  • Joined

  • Last visited

tomjerry's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am trying to do the coding for the or choice questions. What i am trying to do is like, i am having set of questions in a form with some image.By clicking the image calls other page with textarea to answer and there views the or choice question like 1a.who am i? or 1b. what do you do? At the end of both questions i have set some other image. Now what i am trying to do is, i have to chech whether i have selected 1a or 1b, then the written answer have to get save in data base with the appropriate qnumber. Please tell me how to check which question is selected.
  2. Hi, i have done all in php like giving link to image, by clicking the image the value get insert into database. How shall i do this. Please tell me. The following is the code for image link and insert query. if($flag1==0) { echo "<a href='newpartshort.php?orderno=$ono&part=$part&qpid=$qpid&board=$board&subject=$subject&StudentId=$StudentId&totalrows=$totalRows1'><img src='image/redtrial.png' align='right' border=0 width='15px' height='15px'/></a>"; } When the flag value is 0 $sql1="insert into valuation values('','$uid','$ono','$qno','$sub','$qpid','$tabname','$part','$mark','0','$Path1')"; Insertion should take place. Please tell me how to do this.
  3. Thanks MarPlo. The above code you have given is that, exactly what i want. Now everything is working fine. Thanks again for the great help.
  4. <!DOCTYPE html> <html> <head> <style> .popup { position: absolute; left: 100px; top: 100px; border: 1px solid #000; background-color: #f0f0f0; } .popup .symbol { display: inline-block; padding: 5px; margin: 10px; border: 1px solid #000; } </style> <script> var symbolPopup = null; function CreateSymbolPopup () { if (symbolPopup) { return; } symbolPopup = document.createElement ('div'); symbolPopup.className = "popup"; var symbols = [8719, 8721, 8730]; for (var i = 0; i < symbols.length; i++) { var symbolButton = document.createElement ('span'); symbolButton.innerHTML = '' + symbols[i] + ';'; symbolButton.onclick = AddSymbol; symbolButton.className = "symbol"; symbolPopup.appendChild (symbolButton); } document.body.appendChild (symbolPopup); } function ShowSymbols () { CreateSymbolPopup (); symbolPopup.style.display = ""; } function HideSymbols () { if (symbolPopup) { symbolPopup.style.display = "none"; } } function AddSymbol () { var editor = document.getElementById ('editor'); editor.value += this.innerHTML; HideSymbols (); } </script> </head> <body> <button onclick="ShowSymbols ()">Symbols</button> <textarea id="editor"></textarea> </body> </html> The above is my code. By clicking the symbol button,the editor is opening. It is fine. But i also want to do like again by clicking the same button the editor should hide. Please tell me how to do that. No the editor is hiding by selecting the symbol from that editor.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.