[jQuery] Using jQuery to display dynamically generated linked select
Hello! So I am having a jQuery issue that I really need help with! Ok so I
have a table with several rows. Each row has a copy link so that when
clicked a jquery is called that inserts a form right underneath that link
that contains a linked select and a button to save. The linked select copies
the content of that row and saves it as a new row for the options selected
throught the linked select.
For example lets say the a row contains data "apples, red, good". Thiis row
is saved under "Apple Section 1 => Good Apples". The linked select has two
linked selects that have the following formatting (keep in mind this is only
0 => Apple Section 1 (
0 => Good Apples
1 => Better Apples
1 => Apple Section 2 (
0 => Bad Apples
1 => Not So Bad Apples
The "copy" link is clicked and the form to copy the row. The user will
choose "Apple Section 2" from the first linked select and then "Bad Apples"
from the second linked select and then click "save" to copy the row and save
it as a new row under the categories selected int he linked select.
I am using the followin jquery code in the header of the page template to
display the linked select form:
var row_id = $(this).attr('id');
row_id = row_id.replace("row_id__", "");
var url = //the url goes here
$("#copy_div__" + row_id).load(url + "?row_id=" + row_id);
The code above works perfectly to display the linked select form for each
row. the "url" is called the an html is returned BUT the problem I am having
is that the "<script>" tags and the jquery code withint it is NOT returned
when the "load()" function is called. It seems that ALL script code is
stripped out from the returned result. WHY? I tried useint the $.ajax()
options of the second linked select depending on the options on the first
Any help overcoming this issue is greatly appreciated!
View this message in context: http://www.nabble.com/Using-jQuery-to-display-dynamically-generated-linked-select-tf4853618s27240.html#a13888832
Sent from the jQuery General Discussion mailing list archive at Nabble.com.