This is my first time here so I hope I'm not posting to the wrong forum. If this has been answered before, please direct me to the corrent post.I've created several dynamic checkboxes with with following code:
<code>
var pnl = document.getElementById("pnlSalesPeople");
for (i = 0; i < sales.length; i++)
I have a page with a div that contains other divs. In the outer div, I have links that add new divs inside. I also have a link outside the outer div that adds more of those outer divs to the page (with an inner div, and the same links to add more). This works on the div that is hard coded on the page, but when I use the link to add additional container divs the links inside there to add more inner divs does not function.
I've come across an issue where I've got a dynamically created popup class that despite appearing to be bound according to Visual Event does not fire on clicking the closebutton attached to it. I'm not getting any errors in firebug and by setting breakpoints I've verified we are not reaching the code to execute. Ruling out the usual suspects such as obvious spelling mistakes/ swapping out jquery versions 1.3/1.4/1.5 doesn't make any difference.where else I can look?Here is the original function:
$this.find(".close").live('click', function() { var $this = $(this); $this.parents("." + sets.popupClass).remove();
In the examples for live() and delegate(), the selectors match at least one element that already exists. Will either of these commands work on elements for which there is no match at all on page load?
In my case, I want to bind a keyup event to the textareas that jeditable creates. I could probably create custom plug-in (to the plug-in :) to do the job, but I'd like to use live or delegate if they would work.
I am dynamically creating a checkbox element. I need to then have assign the checked property to it or not. But In the code below, it's always checked because the property is present..
while creating this i am attaching the change event using live() function. On changing the above option i am recreating the above dropdown again. This dropdown in under a div .For eg:it has an id=1. During the time of recreating the above dropdown,i am dettaching the event handlers using die() and after that i remove the div with id=1.Again i will create a div with id=1 and a dropdown.
The problem now is that when i try to change the option two change events are triggered.I think the die() method haven't worked. Is it because i have created the dropdown under the div with same id?
I have an input box "product" besides it there is an add input button which adds another input box product upon clicking.This array of input boxes I have created is through document.createElement('input').My autocomplete is working for the initial input box..now when I click add Input button for the generated box also the autocomplete shld work...how do I make it work? Autocomplete script is working so I didnt post it here..I just want it to make it working dynamically created i/p boxes
I have an input box "product" besides it there is an add input button which adds another input box product upon clicking.This array of input boxes I have created is through document.createElement('input').
My autocomplete is working for the initial input box....now when I click add Input button for the generated box also the autocomplete shld work...how do I make it work??
PS:Autocomplete script is working so I didnt post it here.... I just want it to make it working dynamically created i/p boxes
I add a new row to a table using something like this:
[Code]...
So if I add 1 rows, I get 2 text boxes with the ID of 1-medication as I already have a row in place (static) This works fine. However when I try to get the value of 1-medication, I thought I'd get something like value1,value2 but instead I just get value1 If I change the function above to putput a text box with ID of 2-medication, I can get the value of that by itself just fine. why if I have more than 1 item with the same ID, I can't concatenate each value?
I am trying to activate a javascript behavior when the user selects a checkbox, and another behavior when the user un-select the checkbox.
I know the "onSelect" event exists, although after some testing, it does not seem to work when applied to a checkbox. Then it seems the onUnSelect event does not exist.
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6.
I have tried several ways of getting these values when the iframe is written into the html. The following return the correct values in IE6, where the iframe's id is 'f':
However this works as correctly in Opera 7. I find this all very confusing. Can anybody shed light onto how I might get the correct values in IE6 when using the createElement() method?
I want to give the user the abillity to add extra fields as needed. I've got it working in IE (surprsingly this works in IE but not in Firefox), however, basically I have an input field for a paragraph. If the user decides they want two paragraps then they can click an image and a new textarea field is show that allows them to add another paragraph. The fields are named as an array for example name="para[0]" the next one would then be name="para[1]". Firefox creates the field and shows it to the user however when you submit the form the new field does not come through. My array of paragraphs consists only of the original number I started with. Any added by the javascript are lost. Again IE this works fine, Firefox it works till you submit the form. Any ideas?
I dynamically create a textbox as follows, but I cannot retrieve the value entered by the user:
bp_boards = ' <tr id="hwNumberBoards"> <td>No. of modules:</td>[code]....
The dynamically created textbox shows up on the page but after the user enters a value, I cannot retrieve it from jquery(alert ($("#hwNumberBoards").val()) is "undefined")
i have a button that helps me creating more than one dynamic text box and dropdownlist... how it possible to capture the values in those dynamic comtrols ?
i am trying the following but did not work ..when the code is excuted it gives me [object]
// Create Text box 1 var newStartDate = document.createElement('input'); newStartDate.setAttribute("type","date");
im trying to create a script for greasemonkey but its still written in javascript. so here is what im trying to do. Ive got a dynamically created division that aligns to the right of the browser window. Now im trying to put links inside it as you normally would with like a document.write statement or other methods. The only problem is, any method i try wont work for me. heres my code, maybe someone could give me some things i could try.
I'm trying to write a script for a website that reads from a database and makes a separate table for each entry in the database. Since the number of entries can change, I want to dynamically create a div for each one, which I can later hide or display based on user selection. However, when I try to access the dynamically created elements by their ID, they return null. Is what I'm trying to do here actually possible?
for(var i = 0; i < tables.length; i ++) { var newDiv = document.createElement("div"); newDiv.setAttribute("id", tables[i].name); newDiv.setAttribute("name", tables[i].name); newDiv.setAttribute("class", "hidden");
i'am able create dynamically 2 text boxes ( start date & End Date). Also i am able to create dynamically (img) calendar gif pictures beside each textbox.What i am stuck on is how to popup a calendar while clicking on the img and assign the date to a dynamic texboxes.
i have a button that helps me creating more than one dynamic text box and dropdownlist.how it possible to capture the values in those dynamic controls?