I am creating a page that has a to do list. Each item has been created with a for loop in a class method. So this makes multiple drop down boxes on the page. I need to know how to NAME them (I guess?) so they are unique and how to reference the selections via jQuery.
It seems like it would be very simple, however after a couple hours of searching on the 'Net I cannot seem to find any resources and it would seem that I can't be the only person who dynamically makes several drop-downs with the same options.
i am trying to pass text from one select box to another select box. The logic is if 10 are added, no more passing must happen. Also if an item is already added, it mustn't be added again.I am using the for loop to check the existence of an item but it is not working: what am i doing wrong?
Code: function PassSelectValues(){ //pass values from select boxes to select boxes var counter;[code]....
why isn't counter incrementing at all? The alert message box does appear saying item exists but the item gets added anyway.
I'm trying to get a select box to display text from a database in a div tag from the select box populated by a while loop that also pulls from the database. The only way I can do this is from a javascript written by sending it over to a second page and I need it on just one page. Here is my code below:
I have a loop that creates multiple divs, and assigns each one it's own id and positioning on the page. Everything is working fine here.
However, I need to have a different onmouseover for each div (I'm going to be using an ajax call inside each onmouseover that pulls a different url depending on the div that you have pointed at)
Here is the snippet of code that I used to add the onmouseover attribute to each div. This section of code is inside a larger loop, so the "div" variable is a unique div on each iteration of the loop:
div.onmouseover = function() { var x1 = (str[0]+3)/9; var y1 = (str[1]+3)/9;
[Code].....
The str array is a collection of x and y coordinates that the script at star_name.php uses to determine what information needs to be displayed inside the div "label_texter" in the ajax call. If you are not familiar with the mootools framework, you can ignore most of the code inside the function.
The real problem is that for some reason, all the div's created end up with the exact same thing within the url variable. Even though the str[0] and str[1] variables are changed on each iteration of the loop.
In fact, it seems as though they all end up with the last str array values in the loop.
I'm building a t-shirt shop whose interface includes a gallery of designs in an IFrame. When the user clicks on a design, a dedicated page is loaded into the IFrame which shows all the available products associated with the design the user clicked.
I've put each design's image and associated page as the first and second elements of a nested array, and am using a for loop to then load all the images into the page that's shown in the IFrame when the web-site loads. It's looking beautiful, but here's the rub I've been stuck on for two days now with no solution in sight...
The array, "designImages", has 37 elements (ie. designImages[0]... designImages[36]). When I click on a design image on the page, any design image, the browser (all browsers, so I can't blame Microsoft for this one :rolleyes: ), loads the page for design #36. I've tried all sorts of things, but still cannot tell if the issue is because the dynamically generated divs are being reassigned the value [36] after the for loop's executed, or if the div id's are okay but somehow the code is rooting for [36], the last element of the array anyway.
I am creating a dynamo form but <select and <option does not show.
How do I make sure that they are created on the fly?
jQuery("#dump_data_box").append('<select id="thisid" name="value_name[]">'); and later jQuery("#dump_data_box").append('<option'); /// if (v==k2) jQuery("#dump_data_box").append(' selected '); // jQuery("#dump_data_box").append(' value="'+k2+'">'+k2+'</option>');
I've been stumped. I'm usually good at figuring this stuff out, but I'm completely confounded here.I have a form with tables in it to add items to a series. The rows are being added dynamically by Jquery on the click event.
I'm trying to search for the correct code to make my form work. I have 3 select boxes - one with 2 options, one with 8 options, and the last with 2 options... All of this adds up to 32 different url paths. Can anyone tell me how to get this done?This is what I have so far: (and yea, I know I suck... I honestly have absolutely NO clue)
In IE the selection box is created, and there is a drop-down box if I click on the down arrow, but I can't see the OPTION text for each option. The options are invisible, yet the box seems fully functional. I went into the debugger and sure enough the selection box has "OPTION" child nodes with the correct "value" and "text" attributes.
i have several programmatically generated DIVSectionsin my WebApplication. And i have for each of these DIVSectiona RadioButton Group. When the user now checks the RadioButton of the associated DIV-Section theSectionshould be Shown. And when he checks the other RadioButton the DIVSectionshould be hidden.How could a jQuery Function and a call look like, which does the above action?Here my sample:
We have a list of items that each has a different quantity available. So I am going to create a multiple select menu, where they can select several different items. So, how can I make it that when they leave the field it sends all the different ones to the ajax program to build all the appropriate quantity forms?
I have a table that contains many rows, some in italian with code <td nome='riga_i'> and some in english with code <td name='row_e'>. I have created two buttons with different background flags: italy and uk, so when one pushes the button with flag uk, the html page will be reloaded with only english rows, and when one pushes the button with flag it, the same page is reloaded containing only italian rows. All the code posted here works well, but I think that the code can be better because to reach this result I had to dupplicate the same function and I don' t like this.
Here the code:
To better the code I have tried in this way but without success ...
Can someone explain to me the best way to loop through the geocode and marker (google maps) part of this code for all of the elements with the "address" class using jQuery (or javascript if need be). I tried wrapping the contents of the codeAddress function in $(".address").each(function () {... and replacing the getElementById with a jquery selector, but I still seem to be lost.
I am trying to arrange 15 divs into a 5x3 grid.The divs have an id of piece1, piece2, piece3 etcI figured I could run a loop wherein each div is positioned to the right of the last.For each div, I'm trying to store the current position and width into variables then move it to the right by the number of pixels the div measures widthwise.This would position 5 divs horizontally and I am still unsure of how to get the next row of 5 divs positioned under the first and so on.This is what I have so far:
JQuery for (var i=0; i<x; i++) { var pos = $("#piece" + i).offset();
On my site, I have some click-able spans (will be referred to as toggle spans) that show or hide other spans (that contain the content I want on my site; will be referred to as content spans). The layout of these spans is like this:
I wanted to create a small DHTML code that created a unordered list of input forms dependent on the number selected from the select dropdown menu. Problem is that it doesn't seem to want to generate the list. I think the variables are within the scope of the function too, and I didn't get an errors from the javascript console when using firebug. The script itself runs, I tested it when I used the old standby alert(); to see if the script was active. Here's the code:
I'm creating some rows and cells in a table with javascript. I'm then trying to select these cells individually by id, but jquery can't seem to find them. It always returns length 0. The jquery code is, I believe, executing after the cell creation, so I would expect them to be in the DOM already. I can bind the click event to each cell by selecting the cell's class. Why can I select the class, but not the id? It would be nice to be able to do this rather than iterate through each cell in the class.
I have found a problem with <select multiple="multiple"> and .change() under ie6. The problem is ie6 fires first change event right after any other event, like selecting again, clicking mouse, pressing a key etc. It is perfectly seen on [URL]... Just click any option in demo, nothing will happen.
If i put a handler using plain DOM, i.e. $("select").get(0).onchange = function() { ... } the problem dissapears. So, it's definitely a bug with jquery. JQuery version 1.4.2.