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/>&quot;this script sets the selected place in the field with the id 'mid'&quot;
<br/>html html: ('&lt;script type=&quot;text/javascript&quot;&gt;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; 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/>&lt;/script&gt;' format: {mid}).
<br/><br/>&quot;this is the text input with id 'mid' &quot;
<br/>html textInput
<br/>&nbsp; &nbsp; &nbsp; &nbsp; id: mid;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; size: self defaultEntryFieldWidth;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; value: self startPlace;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; callback: [ :value | |theStartPlaceString|
<br/>&quot;**********This does not work, how can I get the value from the mid
<br/>field which was set by the script above?********&quot;
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; theStartPlaceString:= html jQuery ajax
<br/>&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/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: (html jQuery id: #searchTextField) value.
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; self startPlace: theStartPlaceString ];
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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; &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; &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; &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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [ :r |
<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; &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;r render: self startPlace ]);
<br/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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/>&lt;<a href="/user/SendEmail.jtp?type=node&node=4698942&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<div class='shrinkable-quote'><br/>&gt; Hi Sabine,
<br/>&gt;
<br/>&gt; I guess you want the value server-side?
<br/>&gt; You thus need to serialize that value:
<br/>&gt;
<br/>&gt; html jQuery ajax
<br/>&gt; &nbsp; &nbsp; callback: [:v | ... ]
<br/>&gt; &nbsp; &nbsp; value: (html jQuery id: #searchTextField) value
<br/>&gt;
<br/>&gt; Johan
<br/>&gt;
<br/>&gt; Sent from my iPad
<br/>&gt;
<br/>&gt; On 16 Jul 2013, at 14:01, Sabine Knöfel &lt;[hidden email]&gt; wrote:
<br/>&gt;
<br/>&gt;&gt; Hi,
<br/>&gt;&gt;
<br/>&gt;&gt; I want to get the value which was entered into a textinput by doing
<br/>&gt;&gt;
<br/>&gt;&gt; (html jQuery id: #searchTextField) value.
<br/>&gt;&gt;
<br/>&gt;&gt; but I get
<br/>&gt;&gt; a JQueryInstance
<br/>&gt;&gt; (jQuery(&quot;#searchTextField&quot;).val())
<br/>&gt;&gt;
<br/>&gt;&gt; How can I get the value (String) of the text field?
<br/>&gt;&gt;
<br/>&gt;&gt; Greetings
<br/>&gt;&gt; Sabine
<br/>&gt;&gt;
<br/>&gt;&gt;
<br/>&gt;&gt;
<br/>&gt;&gt;
<br/>&gt;&gt;
<br/>&gt;&gt; --
<br/>&gt;&gt; View this message in context:
<br/>&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; Sent from the Seaside General mailing list archive at Nabble.com.
<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; _______________________________________________
<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-tp4698913p4698938.html" target="_top" rel="nofollow" link="external">http://forum.world.st/get-value-within-a-textinput-with-jQuery-tp4698913p4698938.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-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/>