Click here to Skip to main content
15,906,301 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: As Simple As I Can Make It - SOLUTION Pin
Dennis E White8-Jun-13 19:42
professionalDennis E White8-Jun-13 19:42 
QuestionCheckbox checked Java script and c# Pin
sujeet3215-Jun-13 22:43
sujeet3215-Jun-13 22:43 
AnswerRe: Checkbox checked Java script and c# Pin
Dennis E White6-Jun-13 12:01
professionalDennis E White6-Jun-13 12:01 
Questionproblem with anonymus func with parameters Pin
imbaro2-Jun-13 21:27
imbaro2-Jun-13 21:27 
AnswerRe: problem with anonymus func with parameters Pin
dusty_dex3-Jun-13 5:42
dusty_dex3-Jun-13 5:42 
QuestionRe: problem with anonymus func with parameters Pin
ZurdoDev3-Jun-13 7:29
professionalZurdoDev3-Jun-13 7:29 
AnswerRe: problem with anonymus func with parameters Pin
#realJSOP6-Jun-13 4:35
professional#realJSOP6-Jun-13 4:35 
Questionhow to toggle between textbox and textarea by jquery Pin
mhd.sbt30-May-13 8:21
mhd.sbt30-May-13 8:21 
hi to all
i written some code for toggle between textbox and textare
but when my textbox convert to multi line(textarea) it cant be convert to input text again how can i do this
my html:
ASP.NET
<form id="form1" runat="server">
     <asp:TextBox ID="txt" runat="server" Text="11111111111111111111111111111"></asp:TextBox>
     <table class="auto-style1">
         <tr>
             <td>
                 <asp:TextBox ID="txt0" runat="server" Text="222222222222222222222222"></asp:TextBox>
             </td>
         </tr>
         <tr>
             <td><asp:TextBox ID="TextBox1" runat="server" Text="333333333333333333333333333"></asp:TextBox></td>
         </tr>
         <tr>
             <td><asp:TextBox ID="TextBox2" runat="server" Text="44444444444444444444444444444444444"></asp:TextBox></td>
         </tr>
         <tr>
             <td><asp:TextBox ID="TextBox3" runat="server" Text="5555555555555555555555555555555555555555"></asp:TextBox></td>
             <td> </td>
         </tr>
         <tr>
             <td><asp:TextBox ID="TextBox4" runat="server" Text="66666666666666666666666666666666666666666666"></asp:TextBox></td>
         </tr>
     </table>
 </form>

JavaScript
$(function () {
       $(':input').click(function () {
           var newTextArea = document.createElement('TextArea');
           this.parentElement.appendChild(newTextArea);
           debugger
           newTextArea.name = $(this)[0].id;
           newTextArea.value = $(this)[0].defaultValue;
           newTextArea.onclick = function () {
               var newtext = document.createElement('input');
               newtext.value = this.innerText;
               newtext.name = this.name;
               this.parentElement.appendChild(newtext);
               $(this).remove();
           }
           $(this).remove();
       })
   });

thanks in advance
QuestionAs simple as I can make it Pin
#realJSOP30-May-13 8:03
professional#realJSOP30-May-13 8:03 
AnswerRe: As simple as I can make it Pin
Manfred Rudolf Bihy30-May-13 8:24
professionalManfred Rudolf Bihy30-May-13 8:24 
GeneralRe: As simple as I can make it Pin
#realJSOP30-May-13 11:53
professional#realJSOP30-May-13 11:53 
AnswerRe: As simple as I can make it Pin
Richard Deeming30-May-13 8:34
mveRichard Deeming30-May-13 8:34 
GeneralRe: As simple as I can make it Pin
Manfred Rudolf Bihy30-May-13 8:42
professionalManfred Rudolf Bihy30-May-13 8:42 
GeneralRe: As simple as I can make it Pin
Richard Deeming30-May-13 8:46
mveRichard Deeming30-May-13 8:46 
GeneralRe: As simple as I can make it Pin
Manfred Rudolf Bihy30-May-13 8:49
professionalManfred Rudolf Bihy30-May-13 8:49 
GeneralRe: As simple as I can make it Pin
Richard Deeming30-May-13 8:51
mveRichard Deeming30-May-13 8:51 
GeneralRe: As simple as I can make it Pin
Manfred Rudolf Bihy30-May-13 8:53
professionalManfred Rudolf Bihy30-May-13 8:53 
GeneralRe: As simple as I can make it Pin
#realJSOP30-May-13 11:54
professional#realJSOP30-May-13 11:54 
GeneralRe: As simple as I can make it Pin
Manfred Rudolf Bihy31-May-13 1:35
professionalManfred Rudolf Bihy31-May-13 1:35 
GeneralRe: As simple as I can make it Pin
#realJSOP1-Jun-13 2:24
professional#realJSOP1-Jun-13 2:24 
GeneralRe: As simple as I can make it Pin
Richard Deeming3-Jun-13 2:00
mveRichard Deeming3-Jun-13 2:00 
GeneralRe: As simple as I can make it Pin
#realJSOP5-Jun-13 8:56
professional#realJSOP5-Jun-13 8:56 
GeneralRe: As simple as I can make it Pin
Richard Deeming5-Jun-13 9:12
mveRichard Deeming5-Jun-13 9:12 
GeneralRe: As simple as I can make it Pin
#realJSOP5-Jun-13 10:54
professional#realJSOP5-Jun-13 10:54 
GeneralRe: As simple as I can make it Pin
Richard Deeming5-Jun-13 11:02
mveRichard Deeming5-Jun-13 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.