Re: (ot) jQuery Select
Tested a bit more this AM -- thanks Matt! Works as you specified. Appreciate the help! ~ Dakota On Wednesday, June 5, 2013, Matt Quackenbush 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" > > 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. > > > > > > $(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; > >}); > > }); > > > > > > > > > > > > > > Navigate too ... > > Library > > School > > History > > > > > > > > > > > > > > ~| 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:355874 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: (ot) jQuery Select
Thanks for the response ... doesn't work as I'd hoped. On Wed, Jun 5, 2013 at 12:41 PM, Matt Quackenbush 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" 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. > > > > > > $(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; > >}); > > }); > > > > > > > > > > > > > > Navigate too ... > > Library > > School > > History > > > > > > > > > > > > > > ~| 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
Re: (ot) jQuery Select
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" 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. > > > $(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; >}); > }); > > > > > > > Navigate too ... > Library > School > History > > > > > > ~| 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:355869 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
(ot) jQuery Select
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. $(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; }); }); Navigate too ... Library School History ~| 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:355868 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm