dynamic

Django Dynamic Forms Save

I am using James Bennetts code (link text) to create a dynamic form. Everything is working ok but I have now come to the point where I need to save the data and have become a bit stuck. I know I can assess the data returned by the form and simply save this to the database as a string but what I'd really like to do is save what type of ...

data in dynamic textbox

Hi, I am new to .Net I created textboxed dynamically, But when i clicked on the button, i loss before created data in the textbox. How can i maintain data in the dynamic textbox. Thanks in advance.. ...

Action<T> to call a method based on a string value

Is there a way to use Action to call a method based on a string value that contains the name of that method? ...

changing children of dynamic created states

I'm building an Xml-driven application. I create new states in a seperate actionscript-class. These states all contain a DataGrid. I can switch the states in the Main.mxml. But now I would like to access certain children of the DataGrid. In this case I would like to toggle the visibility of GridItems, from a Button in the Main.mxml. ...

Jquery dynamic rows with form

I am trying to change 'inputs' in this demo to 'selects'. The demo works fine, which is at: http://devblog.jasonhuck.com/assets/infiniteformrows.html The problem with modified is is everytime you click on add new row, it loses previous row selection, what was selected. <html> <head> <title>Infinite Form Rows</title> <scrip...

C++ 2D dynamic array crash

Hi I'm having some problem with 2D dynamic array. int main() { double **M; int M_dimension; int i; M_dimension = 10; M = new double *[M_dimension]; for (i=0;i<M_dimension;i++) { M[i] = new double[M_dimension]; } M[0][0] = 1.0; ... } Program works but I'd like to initialize 2D array using such a fun...

Link a Blog into scrolling text of SWF file

I'm working on an entirely flash-based site for a client who has already been using Blogspot for his News/Homepage updates. He wants to continue updating through Blogspot, but wants the blog to automatically fill in the text box on the flash site Homepage. I'm not sure if this is possible, or how I would go about doing it. Here is the b...

absolute-positioned objects added via jQuery are not positioning properly!

I'm dynamically adding some lis to an unordered list using jQuery. They are positioned absolutely (using the style param on each li), but when they are added to the page they aren't in the right positions, even though when I check them with Firebug or Chrome's element inspector, all the values are correct. Also note that the lis are us...

Dynamic method dispatch based on value of variable

Hi there, Long switch statments are often frowned upon. The solution is to use polymorphism. However what if the thing I'm switching on is not a type code? What I would like to do is replace the switch statement with something like this... public void HandleString(string s = "Hello") { ... } public void HandleString(string s = "Goodb...

Build a form dynamically with Ajax, jQuery

I'm building a very small web ERP application with PHP / mySQL / CodeIgniter / jQuery The Bill/Invoice is built with current date client data etc Now, I must add products to that new invoice that is being created, without reloading/submitting the page. Each product will have its qtty., description, unit price, subtotal, etc. I'd li...

dynamic allocation/deallocation of 2D & 3D arrays

I know about algorithms to allocate/deallocate a 2D array dynamically, however I'm not too sure about the same for 3D arrays. Using this knowledge and a bit of symmetry, I came up with the following code. (I had a hard time visualizing in 3D during coding). Please comment on the correctness and suggest any better alternative (efficien...

Django Dynamic Forms

I am using James Bennetts code to create a dynamic form. I have everything working but want to save the data to a database. Has anyone got any code which does this or could show me what the best way to do this would be e.g. how the model should be set up etc? ...

C# Type Casting at Run-Time Using Reflection

Judging by the title of this question, what I want to do may not be possible so I will describe what I'm doing and you can feel free to let me know what I'm doing wrong and what would be a better way to accomplish my goal. I have an XML file that describes 1) a custom object that is derived of a base type, and 2) the internal field name...

Dynamic content in Joomla Articles

I have some joomla articles. some values in that article has to be updated by data obtained through a soap call to other site. Is there any plugin available for joomla by which i can embed custom php inside articles?? How can i do this.?? ...

"Catchall" Properties in C#?

Is it possible to create a "catchall" getter property in C#? class xyzFactory { public static object this.*(string name){ get { return new name();} } } In PHP you would write something like //static getters are new to 5.3, so I didn't put it here. class xyzFactory{ public _get($name){ return $name();} } ...

Generic object controller in MVC, can you improve my code ?

I am creating an application that will display a list of objects in a datagrid (list of any type of object), and allow the user to update any item. The code will know nothing about the object being displayed until runtime. Can you improve my code for the update? I am using Formcollection to get items from the form and creating an instanc...

How do I express a void method call as the result of DynamicMetaObject.BindInvokeMember?

I'm trying to give a short example of IDynamicMetaObjectProvider for the second edition of C# in Depth, and I'm running into issues. I want to be able to express a void call, and I'm failing. I'm sure it's possible, because if I dynamically call a void method using the reflection binder, all is fine. Here's a short but complete example:...

jQuery. Apply selector to every field in a dynamic form

I have a form which is built dynamically using this jQuery plugin http://code.google.com/p/jquery-dynamic-form/ When I duplicate a div, all the fields in the div are duplicated, and -as plugin docs state- brackets are added to the field name I use also jQueryUI. I use the datePicker plugin $("#myDynDateField").datepicker(); It w...

Dynamically creating functions in c

hi, how can i dynamically create a function in c? I try to summarize my C problem as follows: i have a matrix and i want to be able to use some function to generate its elements function has no arguments hence i define the following : typedef double(function)(unsigned int,unsigned int); /* writes f(x,y) to each element x,y of the m...

[C] How to conditionally determine which functions are called at compile time?

I'm working on implementing a very, very basic component system in C, but now I am at a point where I want to 'dynamically' call some functions. The set-up is very easy: the main program is simply an endless while loop, in which some conditions are checked and in which a "process" function is called for each enabled component. For examp...