Hi Johan,
<br/><br/>I want to get the value of the textinput within the callback of the textinput.
<br/><br/>Explanation:
<br/>With Google Places autocompleter
<br/>(<a href="http://webtrouble.blogspot.de/2013/01/google-address-autocomplete.html" target="_top" rel="nofollow" link="external">http://webtrouble.blogspot.de/2013/01/google-address-autocomplete.html</a>),
<br/>the user selected a place which is displayed in the textInput.
<br/>This works fine.
<br/><br/>Now, I want to save this place in my model.
<br/><br/>renderStartPlaceOn: html
<br/><br/>"this script sets the selected place in the field with the id 'mid'"
<br/>html html: ('<script type="text/javascript">
<br/> jQuery(function() \{
<br/>var input = document.getElementById(''{1}'');
<br/>var autocomplete = new google.maps.places.Autocomplete(input);
<br/>google.maps.event.addListener(autocomplete, ''place_changed'', function() \{
<br/>var place = autocomplete.getPlace();
<br/>var adr = place.formatted_address;
<br/>jQuery(''#{1}'').val(adr);
<br/>});
<br/>});
<br/></script>' format: {mid}).
<br/><br/>"this is the text input with id 'mid' "
<br/>html textInput
<br/> id: mid;
<br/> size: self defaultEntryFieldWidth;
<br/> value: self startPlace;
<br/> callback: [ :value | |theStartPlaceString|
<br/>"**********This does not work, how can I get the value from the mid
<br/>field which was set by the script above?********"
<br/> theStartPlaceString:= html jQuery ajax
<br/> callback: [:v | v inspect. ]
<br/> value: (html jQuery id: #searchTextField) value.
<br/> self startPlace: theStartPlaceString ];
<br/> onChange:
<br/> (html scriptaculous updater
<br/> id: mid;
<br/> triggerForm: fid;
<br/> callback: [ :r |
<br/> r render: self startPlace ]);
<br/> onBlur: html jQuery ajax serializeThis.
<br/><br/>Greetings
<br/>Sabine
<br/><br/><br/><br/>On Tue, Jul 16, 2013 at 3:15 PM, Johan Brichau-2 [via Smalltalk]
<br/><<a href="/user/SendEmail.jtp?type=node&node=4698942&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote:
<div class='shrinkable-quote'><br/>> Hi Sabine,
<br/>>
<br/>> I guess you want the value server-side?
<br/>> You thus need to serialize that value:
<br/>>
<br/>> html jQuery ajax
<br/>> callback: [:v | ... ]
<br/>> value: (html jQuery id: #searchTextField) value
<br/>>
<br/>> Johan
<br/>>
<br/>> Sent from my iPad
<br/>>
<br/>> On 16 Jul 2013, at 14:01, Sabine Knöfel <[hidden email]> wrote:
<br/>>
<br/>>> Hi,
<br/>>>
<br/>>> I want to get the value which was entered into a textinput by doing
<br/>>>
<br/>>> (html jQuery id: #searchTextField) value.
<br/>>>
<br/>>> but I get
<br/>>> a JQueryInstance
<br/>>> (jQuery("#searchTextField").val())
<br/>>>
<br/>>> How can I get the value (String) of the text field?
<br/>>>
<br/>>> Greetings
<br/>>> Sabine
<br/>>>
<br/>>>
<br/>>>
<br/>>>
<br/>>>
<br/>>> --
<br/>>> View this message in context:
<br/>>> <a href="http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913.html" target="_top" rel="nofollow" link="external">http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913.html</a><br/>>> Sent from the Seaside General mailing list archive at Nabble.com.
<br/>>> _______________________________________________
<br/>>> seaside mailing list
<br/>>> [hidden email]
<br/>>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br/>> _______________________________________________
<br/>> seaside mailing list
<br/>> [hidden email]
<br/>> <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br/>>
<br/>>
<br/>> ________________________________
<br/>> If you reply to this email, your message will be added to the discussion
<br/>> below:
<br/>> <a href="http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698938.html" target="_top" rel="nofollow" link="external">http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698938.html</a><br/>> To unsubscribe from get value within a textinput with jQuery, click here.
<br/>> NAML
<br/></div>
        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698942.html">Re: get value within a textinput with jQuery</a><br/>
Sent from the <a href="http://forum.world.st/Seaside-General-f86180.html">Seaside General mailing list archive</a> at Nabble.com.<br/>