Hi Johan,
<br/><br/>because the value parameter of the field does only contain the letters
<br/>the user just entered and not the whole name of the adress which was
<br/>selected by the user. E.g. user typed in 'd' and selected 'Dallas,Tx'
<br/>from the list. Now, the value parameter of the field does only contain
<br/>the 'd' and not 'Dallas, Tx'.
<br/><br/>The following code shows this as demo, you need only the 2 methods
<br/>below and setter/getter for startPlace.
<br/>There is a second textinput 'testTextField' that is also populated
<br/>with the adress selected.
<br/>So I see, ths js is working.
<br/>But within the &nbsp;callback, the inspector shows me, that only the typed
<br/>letters will be saved and not the whole selected adress.
<br/><br/>renderContentOn: html
<br/>&nbsp; &nbsp; &nbsp; &nbsp; | mid fid |
<br/>&nbsp; &nbsp; &nbsp; &nbsp; mid := 'widgetId'.
<br/>&nbsp; &nbsp; &nbsp; &nbsp; fid := 'formId'.
<br/>&nbsp; &nbsp; &nbsp; &nbsp; html
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html:
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ('&lt;script type=&quot;text/javascript&quot;&gt;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; jQuery(function() \{
<br/>var input = document.getElementById(''widgetId'');
<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(''#widgetId'').val(adr);
<br/>jQuery(''#testTextField'').val(adr);
<br/>});
<br/>});
<br/>&lt;/script&gt;
<br/><br/>&lt;div&gt;
<br/>&lt;input id=&quot;testTextField&quot; type=&quot;text&quot; size=&quot;50&quot;/&gt;
<br/>&lt;/div&gt;
<br/><br/>&nbsp;'
<br/><br/>&nbsp;format: {mid}).
<br/>&nbsp; &nbsp; &nbsp; &nbsp; html textInput
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id: mid;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; size: 45;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: self startPlace;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [ :value |
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value inspect.
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self startPlace: value &nbsp;];
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onChange:
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (html scriptaculous updater
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; id: mid;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; triggerForm: fid;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [ :r | r render: startPlace ]);
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onBlur: html jQuery ajax serializeThis
<br/><br/><br/>updateRoot: aHtmlRoot
<br/><br/>super updateRoot: aHtmlRoot.
<br/>aHtmlRoot javascript url:
<br/>'<a href="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'" target="_top" rel="nofollow" link="external">https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'</a>.
<br/>aHtmlRoot javascript url:
<br/>'<a href="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places'" target="_top" rel="nofollow" link="external">https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false&amp;libraries=places'</a>.
<br/><br/><br/><br/>On Tue, Jul 16, 2013 at 4:01 PM, Johan Brichau-2 [via Smalltalk]
<br/>&lt;<a href="/user/SendEmail.jtp?type=node&node=4698952&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<div class='shrinkable-quote'><br/>&gt; Sabine,
<br/>&gt;
<br/>&gt; I'm a bit confused: why is the value parameter of the callback of the field
<br/>&gt; not enough?
<br/>&gt;
<br/>&gt; Sent from my iPad
<br/>&gt;
<br/>&gt; On 16 Jul 2013, at 15:40, Sabine Knöfel &lt;[hidden email]&gt; wrote:
<br/>&gt;
<br/>&gt; Hi Johan,
<br/>&gt;
<br/>&gt; I want to get the value of the textinput within the callback of the
<br/>&gt; textinput.
<br/>&gt;
<br/>&gt; Explanation:
<br/>&gt; With Google Places autocompleter
<br/>&gt; (<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/>&gt; the user selected a place which is displayed in the textInput.
<br/>&gt; This works fine.
<br/>&gt;
<br/>&gt; Now, I want to save this place in my model.
<br/>&gt;
<br/>&gt; renderStartPlaceOn: html
<br/>&gt;
<br/>&gt; &quot;this script sets the selected place in the field with the id 'mid'&quot;
<br/>&gt; html html: ('&lt;script type=&quot;text/javascript&quot;&gt;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; jQuery(function() \{
<br/>&gt; var input = document.getElementById(''{1}'');
<br/>&gt; var autocomplete = new google.maps.places.Autocomplete(input);
<br/>&gt; google.maps.event.addListener(autocomplete, ''place_changed'', function() \{
<br/>&gt; var place = autocomplete.getPlace();
<br/>&gt; var adr = place.formatted_address;
<br/>&gt; jQuery(''#{1}'').val(adr);
<br/>&gt; });
<br/>&gt; });
<br/>&gt; &lt;/script&gt;' format: {mid}).
<br/>&gt;
<br/>&gt; &quot;this is the text input with id 'mid' &quot;
<br/>&gt; html textInput
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; id: mid;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; size: self defaultEntryFieldWidth;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; value: self startPlace;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; callback: [ :value | |theStartPlaceString|
<br/>&gt; &quot;**********This does not work, how can I get the value from the mid
<br/>&gt; field which was set by the script above?********&quot;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; theStartPlaceString:= html jQuery ajax
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;callback: [:v | v inspect. ]
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: (html jQuery id:
<br/>&gt; #searchTextField) value.
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self startPlace: theStartPlaceString ];
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onChange:
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (html
<br/>&gt; scriptaculous updater
<br/>&gt;
<br/>&gt; id: mid;
<br/>&gt;
<br/>&gt; triggerForm: fid;
<br/>&gt;
<br/>&gt; callback: [ :r |
<br/>&gt;
<br/>&gt; r render: self startPlace ]);
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; onBlur: html jQuery ajax serializeThis.
<br/>&gt;
<br/>&gt; Greetings
<br/>&gt; Sabine
<br/>&gt;
<br/>&gt;
<br/>&gt;
<br/>&gt; On Tue, Jul 16, 2013 at 3:15 PM, Johan Brichau-2 [via Smalltalk]
<br/>&gt; &lt;[hidden email]&gt; wrote:
<br/>&gt;
<br/>&gt;&gt; Hi Sabine,
<br/>&gt;&gt;
<br/>&gt;&gt; I guess you want the value server-side?
<br/>&gt;&gt; You thus need to serialize that value:
<br/>&gt;&gt;
<br/>&gt;&gt; html jQuery ajax
<br/>&gt;&gt; &nbsp; &nbsp; callback: [:v | ... ]
<br/>&gt;&gt; &nbsp; &nbsp; value: (html jQuery id: #searchTextField) value
<br/>&gt;&gt;
<br/>&gt;&gt; Johan
<br/>&gt;&gt;
<br/>&gt;&gt; Sent from my iPad
<br/>&gt;&gt;
<br/>&gt;&gt; On 16 Jul 2013, at 14:01, Sabine Knöfel &lt;[hidden email]&gt; wrote:
<br/>&gt;&gt;
<br/>&gt;&gt;&gt; Hi,
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; I want to get the value which was entered into a textinput by doing
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; (html jQuery id: #searchTextField) value.
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; but I get
<br/>&gt;&gt;&gt; a JQueryInstance
<br/>&gt;&gt;&gt; (jQuery(&quot;#searchTextField&quot;).val())
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; How can I get the value (String) of the text field?
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; Greetings
<br/>&gt;&gt;&gt; Sabine
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; --
<br/>&gt;&gt;&gt; View this message in context:
<br/>&gt;&gt;&gt;
<br/>&gt;&gt;&gt; <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/>&gt;&gt;&gt; Sent from the Seaside General mailing list archive at Nabble.com.
<br/>&gt;&gt;&gt; _______________________________________________
<br/>&gt;&gt;&gt; seaside mailing list
<br/>&gt;&gt;&gt; [hidden email]
<br/>&gt;&gt;&gt; <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/>&gt;&gt; _______________________________________________
<br/>&gt;&gt; seaside mailing list
<br/>&gt;&gt; [hidden email]
<br/>&gt;&gt; <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/>&gt;&gt;
<br/>&gt;&gt;
<br/>&gt;&gt; ________________________________
<br/>&gt;&gt; If you reply to this email, your message will be added to the discussion
<br/>&gt;&gt; below:
<br/>&gt;&gt;
<br/>&gt;&gt; <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/>&gt;&gt; To unsubscribe from get value within a textinput with jQuery, click here.
<br/>&gt;&gt; NAML
<br/>&gt;
<br/>&gt; ________________________________
<br/>&gt; View this message in context: Re: get value within a textinput with jQuery
<br/>&gt;
<br/>&gt; Sent from the Seaside General mailing list archive at Nabble.com.
<br/>&gt;
<br/>&gt; _______________________________________________
<br/>&gt; seaside mailing list
<br/>&gt; [hidden email]
<br/>&gt; <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/>&gt;
<br/>&gt;
<br/>&gt; _______________________________________________
<br/>&gt; seaside mailing list
<br/>&gt; [hidden email]
<br/>&gt; <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/>&gt;
<br/>&gt;
<br/>&gt; ________________________________
<br/>&gt; If you reply to this email, your message will be added to the discussion
<br/>&gt; below:
<br/>&gt; <a href="http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698947.html" target="_top" rel="nofollow" link="external">http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698947.html</a><br/>&gt; To unsubscribe from get value within a textinput with jQuery, click here.
<br/>&gt; 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-tp4698913p4698952.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/>