osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: [jquery-ui] Dialog - how to pass variables -
msg#00110

List: jquery-ui

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index


I'm using UI 1.7 and jquery 1.3.2.

I have the dialog set up

[code]
$(document).ready(function(){
$("#review_update").dialog({
autoOpen: false,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Close This Review': function() {
//pass id here
//$("#printouts").load
("documents/mydocuments/setreview/"+id+"/");
},
Cancel: function() {
$(this).dialog('close');
}
}
});
});

$(document).ready(function(){
$(".updatereview").css("cursor","pointer").click(function(){
var tmp = this.id.split("-");
id = tmp[tmp.length-1];
$("#review_update").dialog("open");
});
});
[/code]

I'm getting an id from the click function which I would like to pass
to id to the $("#review_update").dialog() (first function) so that i
can use it with the dialog buttons, but have no idea how to do this.
Any ideas would be appreciated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to jquery-ui@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
jquery-ui+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Thread at a glance:

Previous Message by Date:

[jquery-ui] dragging between [complex] sortable lists leads to lost items in .toArray()

I have a bit of complex problem, so I'll try to be precise in describing it. I have list, sortables-A, containing other sortables-B lists; all sortables-B lists are connected with other sortables-B lists - and all sortables-A lists are connected with other sortables-A lists. When I drag a sortable-A item to a connected sortable-A list, the update event fires .toArray ( I've also tested .serialize ) for AJAX communication with a database to remember the order. Intermittently, the 'serialized' receiving list is inaccurate. I.E. If I have sortA [ j, k, l, m ] and sortA' [ r, s, t, u ], and I drag sortA' [ t ] to sortA, then the user sees sortA [ j, t, k, l, m ], but when the update event fires sortA.toArray() the result is [ t, k, l, m ]. sortA'.toArray() yields the correct [ r, s, u ]. Apologetically, this occurs in 1.2.6 / 1.5.4. I cannot yet debug other aspects of my code for 1.3.2 / 1.6rc6. I'll make a subsequent post to ask a question with regard to my issues in migration to 1.6rc6. The bug has been seen in Safari, FF, and IE. Any sense of what causes this, and thereby if it is fixed for 1.7 ? Thanks, Zak --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to jquery-ui+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---

Next Message by Date:

[jquery-ui] loading the content of an accordian from json objects when page is loaded.

I would like to programatically load an accordian when a page is loaded from json objects (which I already have). I just can't fiqure out how to load the accordian when the page is loaded. I understand the $(document).ready(function(){ // Your code here }); part but after that I'm a bit confused. I've looked over the site and google it with no luck. The json is coming from a dojo.datastore. I'm using an example I downloaded and the accordian looks like this-> <div id="accordion" style="width:300px; float:left;"> <div> <h3><a href="#">First</a></h3> <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor <div> </div> <div> <h3><a href="#">Second</a></h3> <div>Phasellus mattis tincidunt nibh.</div> </div> <div> <h3><a href="#">Third</a></h3> <div>Nam dui erat, auctor a, dignissim quis.</div> </div> </div> The content I would like to place in the <div> under the h3 heading and the <h3> or reformat it however is required. I'm obviously a newbie and any help is greatly appreciated. thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to jquery-ui+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---

Previous Message by Thread:

[jquery-ui] dragging between [complex] sortable lists leads to lost items in .toArray()

I have a bit of complex problem, so I'll try to be precise in describing it. I have list, sortables-A, containing other sortables-B lists; all sortables-B lists are connected with other sortables-B lists - and all sortables-A lists are connected with other sortables-A lists. When I drag a sortable-A item to a connected sortable-A list, the update event fires .toArray ( I've also tested .serialize ) for AJAX communication with a database to remember the order. Intermittently, the 'serialized' receiving list is inaccurate. I.E. If I have sortA [ j, k, l, m ] and sortA' [ r, s, t, u ], and I drag sortA' [ t ] to sortA, then the user sees sortA [ j, t, k, l, m ], but when the update event fires sortA.toArray() the result is [ t, k, l, m ]. sortA'.toArray() yields the correct [ r, s, u ]. Apologetically, this occurs in 1.2.6 / 1.5.4. I cannot yet debug other aspects of my code for 1.3.2 / 1.6rc6. I'll make a subsequent post to ask a question with regard to my issues in migration to 1.6rc6. The bug has been seen in Safari, FF, and IE. Any sense of what causes this, and thereby if it is fixed for 1.7 ? Thanks, Zak --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to jquery-ui+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---

Next Message by Thread:

[jquery-ui] loading the content of an accordian from json objects when page is loaded.

I would like to programatically load an accordian when a page is loaded from json objects (which I already have). I just can't fiqure out how to load the accordian when the page is loaded. I understand the $(document).ready(function(){ // Your code here }); part but after that I'm a bit confused. I've looked over the site and google it with no luck. The json is coming from a dojo.datastore. I'm using an example I downloaded and the accordian looks like this-> <div id="accordion" style="width:300px; float:left;"> <div> <h3><a href="#">First</a></h3> <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor <div> </div> <div> <h3><a href="#">Second</a></h3> <div>Phasellus mattis tincidunt nibh.</div> </div> <div> <h3><a href="#">Third</a></h3> <div>Nam dui erat, auctor a, dignissim quis.</div> </div> </div> The content I would like to place in the <div> under the h3 heading and the <h3> or reformat it however is required. I'm obviously a newbie and any help is greatly appreciated. thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to jquery-ui+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!