Questions tagged [dynamic-html]

170 questions
1228
votes
28 answers

How do you remove all the options of a select box and then add one option and select it with jQuery?

Using core jQuery, how do you remove all the options of a select box, then add one option and select it? My select box is the following. EDIT: The following code was helpful with chaining. However, (in…
Jay Corbett
  • 28,091
  • 21
  • 57
  • 74
32
votes
5 answers

How to reset the style properties to their CSS defaults in javascript?

On a php generated page there are several elements like this: So there is a default style and I apply several extra styles that override the style defined in the…
Calmarius
  • 18,570
  • 18
  • 110
  • 157
21
votes
2 answers

Dynamic content added with AngularJS click event not working on the added content

I just started on AngularJS this week for a new project, and I have to come up to speed ASAP. One of my requirements, is to add html content dynamically and that content might have a click event on it. So the code Angular code I have below displays…
user3495052
  • 243
  • 1
  • 2
  • 5
12
votes
2 answers

how to dynamically generate HTML code using .NET's WebBrowser or mshtml.HTMLDocument?

Most of the answers I have read concerning this subject point to either the System.Windows.Forms.WebBrowser class or the COM interface mshtml.HTMLDocument from the Microsoft HTML Object Library assembly. The WebBrowser class did not lead me…
J Smith
  • 2,375
  • 3
  • 18
  • 36
10
votes
1 answer

Using typescript to create HTML using template

Trying out typescript, I want to achieve the following thing: Getting a question text and a number from server and displaying it in DOM somewhere, using typescript. Currently I have the following .ts file: class QuestionResponse { …
Ziv Weissman
  • 4,400
  • 3
  • 28
  • 61
9
votes
5 answers

Uniform HTML templating language

It seems like every web framework has its own pet template language. Ruby has eRuby, Python's django uses the Django template language, Haskell has Heist and Hamlet, Java's got JSP, and then there's PHP... My question is, has anyone tried creating…
Dan Burton
  • 53,238
  • 27
  • 117
  • 198
7
votes
4 answers

jquery-mobile create dynamic controlgroup and apply jquery-ui css

This is my code: http://jsfiddle.net/YKvR3/34/ I would create a controlgroup with values that are in my array (name). The problem is that when I click load button the values are added in a controlgroup but the jquery-ui styles are not loaded like in…
michele
  • 26,348
  • 30
  • 111
  • 168
5
votes
1 answer

dynamic ajax form select box autofill

I'm strugglin to make a PHP Form with Dynamic Fields with Auto Fill other fields in JQuery, so far I can add new fields and the autofill works just fine but only for the first field. The autofill drop down only appears on the first input. How can…
5
votes
2 answers

set values from jquery array of objects php?

I am getting particular list of product items through ajax, by passing their unique id to server. Now each product has its own set of properties which I have to display on page with product image. When I set the values through jquery, only last…
Amit Kaushal
  • 429
  • 1
  • 9
  • 25
4
votes
1 answer

Unable to compile Dynamic Html using $compile

I am trying to add dynamic html to my code using below lines var el = $compile('...ReadMore')($scope); However it is producing the below error Can anyone help?
neehu
  • 122
  • 9
4
votes
5 answers

Live() keyword not working on load with dynamic html images

I have images being dynamically added to a page, I don't seem to be able to get the 'load' event working dynamically with live(). This is the code I currently have: $('#largeImg' + nextUniqueItemID).hide(); $('#largeImg' +…
Sara Chipps
  • 9,322
  • 11
  • 58
  • 103
4
votes
1 answer

Knockout goes crazy when I applyBindings twice with dynamic html

I am creating a single page application with knockout ... I have a GlobalViewModel to admin all dynamic pages (I get the html via ajax). Here is an example of my problem: http://jsfiddle.net/zWtrr/7/ When I load 2 times the same template (click 2…
4
votes
3 answers

Dynamically Importing JavaScript

What is the correct way to dynamically import JavaScript (.js) files into a parent JavaScript code, please? I am using the following code, but it seems not correct: function loadjscssfile(filename, filetype) { //if filename is a external…
Bunkai.Satori
  • 4,698
  • 13
  • 49
  • 77
3
votes
4 answers

How to create copy button using html and javascript?

Hii am new to javascript but by putting my all efforts I have written a javascript to copy text inside a

elements. In my website I need the copy button many times. But my javascript work for only one copy button. if I used it to another copy…
user14881722
3
votes
1 answer

is there a tool to capture all DOM webpage elements generated by browser-side javascript as html, for a full page html archive?

if a whole bunch of elements gets generated in my browser by javascript (using JSON data or just out of thin air) I am not able to fully archive such a page by saving its source. I already tried saving it as .mht file in IE, but that does not work -…
EndangeringSpecies
  • 1,564
  • 1
  • 17
  • 39
1
2 3
11 12