First, I'm not sure I'm sending this request to the right place, if not
could you direct me to the proper site.

 

I have been trying for several days to pass a text form field (that I need
to duplicate numerous times) to the clonefield plugin but have been
unsuccessful.   I've been able to get a couple of other plugins (using
.append) to work fine but would prefer to use the clonefield version for the
option features.  Could someone show me the proper way (or format to use) to
pass the field elements via the example line provided in the plugin
documentation which is:  $("a#add).clonefield($("input#file"));

 

The text field is:  <td><lable for="eventBullet">Provide another
feature;</lable><input type="text" name="eventBullet" id="eventBullet"></td>

 

The cloned fields will be located in an empty <div>.  Currently I get a very
nice series of Remove buttons when I click the "Add Feature" button but I'd
really like to have something to remove first.

 

The following is what I'm tryiing to get to work before I move it into my
page.  Any assistance would be appreciated.  Did I mention I'm very new to
everything relating to . . . just about everything in this field.

 

<script type="text/javascript" src="jquery-1.3.2.min.js"></script>

<script type="text/javascript" src="clonefield.js"></script>

 

<script type="text/javascript">

 

function addFeature(){

  $("div#add").cloneField($('<td><label for="eventBullet">Provide feature
number;</lable><input type="text" name="eventBullet"
id="eventBullet"></td>'));

  // I can't figure out how to pass the eventBullet elements to the
clonefield function

}

</script>

 

<body>

<form action="#">  

  <table> 

     <tr>

       <td colspan = "3"><a href="#" onClick="addFeature(); return
false;"><button>Add A Feature</button></a></td>       

       <div id="add"></div>

       <td>&nbsp;</td>

       <td>&nbsp;</td>

     </tr>

  </table>        

</form>

 

</body>

</html>

 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to