You're welcome!! I'm glad it helped
On Sep 17, 3:26 pm, David Garthe <[email protected]> wrote: > That worked! Thank you! > > On Sep 17, 5:43 am, nsbk <[email protected]> wrote: > > > > > Hello, taking a closer look to your code I see that you are trying to > > set the new value to the slider before actually creating it, so it > > won't work. > > > You can try this approach, I'm using a modal dialog instead, just to > > simplify the example. It should work... > > > html: > > > <html> > > <head> > > <title>Untitled Page</title> > > > <!-- Your js files here!! --> > > > <script type="text/javascript"> > > <!-- > > $(document).ready(function() { > > $('#addItem, .editItem').click(function(e) { > > e.preventDefault(); > > // load the contact form using ajax > > $.get("modalForm.cfm", {'action' : $(this).attr > > ("name")}, function (data){ > > // create a modal dialog with the data > > $("#modal").html(data); > > $("#modal").dialog({ modal: true }); > > // Create the slider > > $("#slider").slider({ > > value:$("#new_value").val(), // assign > > the value from ModalForm.cfm at initialization time > > min: 20, > > max: 100, > > step: 20, > > animate: true, > > orientation: 'horizontal', > > slide: function(event, ui) { > > $("#slideramount").val > > (ui.value); > > } > > }); > > > }); > > }); > > > }); > > > // --> > > </script> > > </head> > > <body> > > <div id="addItem"> > > Open me! > > </div> > > <div id="modal" /> > > </body> > > </html> > > > ------------------------ > > > ModalForm.cfm: > > > <div id="slider" style="width:150px;font-size: 9px;font-family: > > Arial;"></div><input type="hidden" value="60" id="new_value"/> > > > Hope it helps!! > > > On Sep 16, 3:41 pm, David Garthe <[email protected]> wrote: > > > > That didn't work. Do I need to a "trigger" to reference the new > > > javascript value? I'm calling it within a modal box, so I'm unsure if > > > a browser is skipping over it or not. Thanks. > > > > On Sep 16, 5:33 am, nsbk <[email protected]> wrote: > > > > > Hi, I think you should use $("#slider").slider("value",60); to set the > > > > starting point. > > > > > Hope it helps, > > > > > --nsbk- Hide quoted text - > > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
