Loading...
 
Development

Development


Dynamically adding textbox using Jquery

posts: 6

When I am trying to add textboxes in the tikipages usin Jquery the textbox appears and suddenly vanishes. I want a form in which I have to add fields dynamically. Can any one help me out.. Whether Tiki is blocking such additions?

http://www.mkyong.com/wp-content/uploads/jQuery/jQuery-add-remove-textbox.html

I made use of the code in the above link as given below..

sample.tpl



var headID = document.getElementsByTagName("head")0;
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = 'js/jquery-1.3.2.min.js';
headID.appendChild(newScript);





$("#addrow").click(function () {

if(counter>10){
alert("Only 10 textboxes allow");
return false;
}

var newTextBoxDiv = $(document.createElement('div'))
.attr("id", 'TextBoxDiv2' + counter);

newTextBoxDiv.after().html('Textbox #'+ counter + ' : ' +
'');

newTextBoxDiv.appendTo("#TextBoxesGroup");


counter++;
});

{/jq}
{literal}

counter=2;

{/literal}



Textbox #1 :





Regard
Mohan
excelsisdeo.com


Upcoming Events

1)  21 Mar 2024 18:00 GMT-0000
Tiki Roundtable Meeting
2)  25 Mar 2024 17:00 GMT-0000
29th anniversary WikiBirthday (With Ward Cunningham)
3)  18 Apr 2024 18:00 GMT-0000
Tiki Roundtable Meeting
4)  16 May 2024 18:00 GMT-0000
Tiki Roundtable Meeting
5)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9) 
Tiki birthday
10)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting