Questions tagged [dynamically-generated]

Components that are constructed in response to conditions rather than being invariant or static

1117 questions
213
votes
7 answers

How can I dynamically add a directive in AngularJS?

I have a very boiled down version of what I am doing that gets the problem across. I have a simple directive. Whenever you click an element, it adds another one. However, it needs to be compiled first in order to render it correctly. My research led…
PCoelho
  • 7,850
  • 11
  • 31
  • 36
47
votes
2 answers

Unobtrusive validation not working on dynamically-added partial view

I am currently facing a problem with validation after dynamically adding content. I have a view strongly typed to a model (Order). This Order can have many items. The model looks something like the following: public class Order { [Key] …
36
votes
5 answers

Using .each on dynamic objects in jQuery?

There are lots of questions that seem to be asking this, but in the end all they want is to attach .click events and not .each and so the generally accepted answer in all of them include $("body").on("click", ".selector", function(){}); and this is…
o_O
  • 5,527
  • 12
  • 52
  • 90
31
votes
5 answers

Performance of compiled-to-delegate Expression

I'm generating an expression tree that maps properties from a source object to a destination object, that is then compiled to a Func and executed. This is the debug view of the resulting…
JulianR
  • 16,213
  • 5
  • 55
  • 85
28
votes
4 answers

How to add text on top of an existing PDF using JavaScript on a website?

I am looking for a way to add text on top of an existing PDF using JavaScript. I envision it as a user clicking a button to download the PDF and receiving a file with this original PDF and additional text written over the pages. Is there any way…
ar-ar
  • 281
  • 1
  • 3
  • 3
26
votes
7 answers

Jquery .change() function not working with dynamically populated SELECT list

I have a select field that is dynamically populated with an ajax call that simply returns all the HTML select options. Here is the part of the PHP that just echo's the select tags and dynamically fills out each option/value. echo "
tresstylez
  • 1,809
  • 6
  • 29
  • 41
24
votes
2 answers

Subquery as generated column in mysql?

Can I create a generated column in table A which sums up a column in table B with a tableA_id of the row in table A? Suppose I have a table of of families, and a table of children. I want a sum of the ages of the children for each family. ALTER…
19
votes
5 answers

JQuery: Selecting dynamically created elements and pushing to Firebase

Beginner to all of this, playing around with Firebase. Basically, I want to retrieve text entries from Firebase and have an "Approve" button next to it. When the button is clicked, I want that specific text entry to be pushed to a new Firebase…
Sam
  • 193
  • 1
  • 1
  • 4
16
votes
3 answers

Android: How do I attach a temporary, generated image to an email?

I have a programmatically generated image that I want to send as an attachment via the ACTION_SEND and EXTRA_STREAM method. But how do i do this? My first attempt (writing to my context.getCacheDir() based file path) appeared to work in the Gmail…
el2iot2
  • 6,428
  • 7
  • 38
  • 51
16
votes
6 answers

jQuery select dynamically created html element

There are a lot of asked questions with almost similar titles with this question of mine, but you know I didn't find an answer. My simple question is: I have button, when I click on it, javascript creates modal window
Almas Adilbek
  • 4,371
  • 10
  • 58
  • 97
15
votes
3 answers

Generating dynamic CSS

What is the best way to handle style that that is user-customized? Just as an example of the result I'm looking for, this would suffice: body { color: {{ user.profile.text_color }}; } However, serving CSS as a view seems like it would cause a…
pancakes
  • 741
  • 1
  • 7
  • 15
15
votes
3 answers

jQuery .on() event doesn't work for dynamically added element

I'm making a project where a whole div with buttons is being inserted dynamically when user click a button, and inside that div there's a button, which when the user click on it, it does something else, like alerting something for example. The…
Rafael Adel
  • 7,673
  • 25
  • 77
  • 118
12
votes
3 answers

Nested BeginCollectionItem

I'm using Steve Sanderson's BeginCollectionItem approach to add dynamic content. Everything works fine when I'm doing it on the first level. However, when try to implement a nested collection meaning a BeginCollectionItem in another…
noobi
  • 605
  • 2
  • 7
  • 10
12
votes
2 answers

Inno Setup (How to get dynamically path to file)?

I'm making a setup script in Inno and I was wondering, how can I get non "hardcoded" path. Here is example: Thanks in advance! SOLUTION: You can get .iss folder by using predefined variable SourcePath Usage would be like:…
Janck7
  • 155
  • 1
  • 1
  • 7
12
votes
4 answers

How to dynamically create an anonymous class that extends an abstract class in PHP?

Simply, let me explain by an example. start()); ?> This is from PHP manual. I am wondering if there is a way to do this in more…
jlai
  • 909
  • 1
  • 10
  • 17
1
2 3
74 75