- Screen name: jqujru
jqujru's Profile
2 Posts
2 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 14-Mar-2012 04:16 PM
- Forum: Using jQuery UI
Im having problems with autocomplete.I asked a question in stackoverflow about it here.There is my code almost doing it here.Im coding a page that must deal with cascade autocomplete.From values showed user can select one or type one that match suggestion, it must set match/selected item as selected.
When one item is selected it must set hidden with related id of selected item and keep selected value on input. This hidden with id will feed next input filtering autocomplete results.
When typed value dont match any suggestion item then related hidden id must be set to zero and id filter ignored on next autocomplete.
On server side when one hidden id was not set a new row will be inserted on item table as manual entry but when every id was set only master id will be used as foreing key.
Its working on my code but when type fast id setup fail.
There is a simple way to do it ? I tried a lot, can see my code on link above.
Thanks a lot.
- 11-Dec-2011 10:42 AM
- Forum: Using jQuery UI
I have some wizard-like pages in my application, its keeping state whilenavigating between small steps, the navigation is not linear and everythingworks well without one line of javascript in a "progressive enhancement" way.In my application, to users with javascript enabled, i want turn flowabove in a set of dialogs by loading each complete step in a dialog by ajax,process the action of step and close dialog, each step will have the ownscript embedded to execute on dialog load and intercept some step ui events.The problem is that JQuery UI Dialog want create action buttons i cantgive the button creation to plugin, its ask for buttons metadata and ialready have complete functional page with form, buttons, data entry andeverything i need to do my work, its working, its done, i Only want load iton a Dialog that manage window specific things to me, like Title bar, Drag bytitle bar, Close button on title bar, Close event to my cleanup, stretch tofit my dialog content, load in modal mode with overlay.I cant find a way to intercept the button click inside dialog by scriptembedded on dialog step, the button inside dialog must post data by ajax butit will post togheter the main page in a normal page posting.I found some very old plugins but i like JQuery UI, its simple and looksgood, i read about:simplemodal: http://www.ericmmartin.com/projects/simplemodal/Stackoverflow post : http://stackoverflow.com/questions/8465303/cant-create-simple-html-enhanced-modal-dialog-loaded-by-ajax/8465588#8465588-------------------------------------------------<script type="text/javascript">//-------------------------------------------------var url_trg = '@Url.Content("~/teste/opendialog")';var url_prl = '@Url.Content("~/Images/waitplease.gif")';//-------------------------------------------------function onloadpartial() {configDetailDialog(url_trg, "#tempcontent", "section[id='main']", "Detail", "#opendialog");}//-------------------------------------------------function configDetailDialog(trgurl, containerselector, contentselector, dlgtitle, buttonselector) {//-------$(document).ajaxError(function (event, jqXHR, ajaxSettings, thrownError) {alert('[event:' + event + '], ' +'[jqXHR:' + jqXHR + '], ' +'[ajaxSettings:' + ajaxSettings + '], ' +'[thrownError:' + thrownError + '])');});//-------$.ajaxSetup({ cache: false });//-------$(buttonselector).click(function (event) {event.preventDefault();openAjaxDialog(trgurl, containerselector, contentselector, dlgtitle);});//-------}//-------------------------------------------------function openAjaxDialog(trgurl, containerselector, contentselector, dlgtitle) {$.ajax({type: 'GET',url: trgurl,context: document.body,success: function (data) {var dlg = $(data).find(contentselector);$('#dlgdetail').remove();$(containerselector).append("<div id='dlgdetail'/>");$('#dlgdetail').append(dlg);$('#dlgdetail').css("border", "solid").dialog({autoOpen: true,modal: true,title: dlgtitle,open: function () {configDetailDialog();},close: function (event, ui) {$('#dlgdetail').remove();}});}});}//-------------------------------------------------</script>-------------------------------------------------- «Prev
- Next »
Moderate user : jqujru