Thanks for the response ... doesn't work as I'd hoped.
On Wed, Jun 5, 2013 at 12:41 PM, Matt Quackenbush <quackfu...@gmail.com>wrote: > > First you're telling the window to move to the new URL before the submit > line. This means that the submit is never reached in the processing cycle. > > Next, when you remove the location change, "nothing happens" because you're > explicitly saying to do nothing. Remove the function from the submit() and > watch the magic take place. > > HTH > > Sent from a mobile something > On Jun 5, 2013 12:31 PM, "Dakota Burns" <dakota.bu...@gmail.com> wrote: > > > > > I am trying to use an HTML Select form component to select & go to a URL. > > I'm using the attached jQuery to accomplish this. The selection opens a > new > > window to the intended URL but the submit function doesn't post the > hidden > > name/value pairs. I suspect my syntax is a bit in conflict since the > submit > > function isn't working as expected. When I pull the window.location > nothing > > happens. > > > > After googling "jquery select post" and related combinations, I haven't > > solved this one yet so thought I'd check here since CF programmers > > frequently use jQuery. > > > > Thanks in advance. > > > > <script> > > $(function(){ > > $('##dynamic_select').bind('change', function(){ > > var url = $(this).val(); > > if(url){ > > window.location = url; > > $("##myForm") > > .attr("action", url) > > .attr("target", "_blank") > > .submit(function(){return false;}); > > } > > return false; > > }); > > }); > > </script> > > > > <form method="post" action="##" id="myForm" name="myForm"> > > <input type="hidden" name="formTest" value="TEST" /> > > > > <select id="dynamic_select"> > > <option value="" selected="selected">Navigate too ...</option> > > <option value="/index.cfm?action=test.pageLib">Library</option> > > <option value="/index.cfm?action=test.pageSchool">School</option> > > <option value="/index.cfm?action=test.pageHist">History</option> > > </select> > > > > </form> > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355870 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm