<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: How to pass values using Yahoo AJAX?</title>
      <link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX/</link>
      <description>Comments on Ask MetaFilter post How to pass values using Yahoo AJAX?</description>
	  	  <pubDate>Wed, 07 Jun 2006 13:45:46 -0800</pubDate>
      <lastBuildDate>Wed, 07 Jun 2006 13:45:46 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: How to pass values using Yahoo AJAX?</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX</link>	
  	<description>I&apos;m making the AJAX plunge, and working with Yahoo&apos;s &lt;a href=&quot;http://developer.yahoo.com/yui/index.html&quot;&gt;AJAX User Interface Library&lt;/a&gt; (specifically &lt;a href=&quot;http://developer.yahoo.com/yui/container/dialog/index.html&quot;&gt;Dialog&lt;/a&gt; to create form sumission dialog boxes.  But I don&apos;t know how to pass values into the box that pops up. &lt;br /&gt;&lt;br /&gt; I deconstructed their exampel enough to get a button to open a dialog with a form in it that allows a user to add a name to a list. I want to use a different button to open a different dialog box to remove a name. &lt;br&gt;
&lt;br&gt;
How do I pass the ID of the item to remove from the button into the remove dialog?&lt;br&gt;
&lt;br&gt;
My button:&lt;br&gt;
&amp;lt;button onclick=&quot;YAHOO.item.container.remove.show()&quot;&amp;gt; REMOVE &amp;lt;/button&amp;gt;&lt;br&gt;
&lt;br&gt;
My javascript skills are very weak, but I would guess I could put the ID into the onclick command &quot;YAHOO.item.container.remove.show(&apos;myID&apos;).  But then what? how do I get that value to be used in the form? Am I even going about this the right way?&lt;br&gt;
&lt;br&gt;
Finally, is there a &quot;yahoo ajax for dummies&quot; site I could reference, or is there an easier AJAX library I could use to cut my teeth on?</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.39725</guid>
  	<pubDate>Wed, 07 Jun 2006 12:28:55 -0800</pubDate>
  	<dc:creator>jazon</dc:creator>
	
	<category>AJAX</category>
	
	<category>Yahoo</category>
	
	<category>WebDevelopment</category>
	
</item>
<item>
  	<title>By: b1tr0t</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#612846</link>	
  	<description>1. Try posting in the Yahoo! &lt;a href=&quot;http://groups.yahoo.com/group/ydn-javascript&quot;&gt;group for UIL&lt;/a&gt;. (AxMe isn&apos;t very good for highly specific technical questions)&lt;br&gt;
&lt;br&gt;
2. Google&apos;s &lt;a href=&quot;http://code.google.com/webtoolkit/&quot;&gt;Web Toolkit&lt;/a&gt; may or may not be easier to use for your project.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-612846</guid>
  	<pubDate>Wed, 07 Jun 2006 13:45:46 -0800</pubDate>
  	<dc:creator>b1tr0t</dc:creator>
</item>
<item>
  	<title>By: b1tr0t</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#612854</link>	
  	<description>(I know less than nothing about javascript, but played around with the GWT when it came out a few weeks back)</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-612854</guid>
  	<pubDate>Wed, 07 Jun 2006 13:54:05 -0800</pubDate>
  	<dc:creator>b1tr0t</dc:creator>
</item>
<item>
  	<title>By: AmbroseChapel</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#613001</link>	
  	<description>&lt;em&gt;&lt;strong&gt;AxMe isn&apos;t very good for highly specific technical questions&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
I don&apos;t think that&apos;s quite fair!&lt;br&gt;
&lt;br&gt;
Short answer, &lt;strong&gt;jazon&lt;/strong&gt;, although you may have got this from the Yahoo! group by now -- what you&apos;ve got with that dialog code is the &lt;em&gt;front end.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
It shows the form, it handles the data, it wraps it up into a little package, and then, if you&apos;re using AJAX, it sends it to a server and the server does something with it. It&apos;s your server that&apos;s got to do the deleting. Yahoo&apos;s widget sends a Post request with &lt;pre&gt;data = {item:&amp;quot;foo&amp;quot;}&lt;/pre&gt; in it and if you want to delete &amp;quot;foo&amp;quot; not add it, you&apos;d better have a signal in there that says &amp;quot;we&apos;re deleting&amp;quot;, as in &lt;pre&gt;data = {item:&amp;quot;foo&amp;quot;,action:&amp;quot;delete&amp;quot;}&lt;/pre&gt; which you would add via a hidden field or a button or something.&lt;br&gt;
&lt;br&gt;
I think you&apos;re confused, in other words, about the roles. The Yahoo widgets give you a nice AJAXy way to get information and ... do something with it. They don&apos;t do that second part, you do.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-613001</guid>
  	<pubDate>Wed, 07 Jun 2006 16:25:40 -0800</pubDate>
  	<dc:creator>AmbroseChapel</dc:creator>
</item>
<item>
  	<title>By: jazon</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#613145</link>	
  	<description>Thanks for the information AmbroseChapel - I am aiming to have the server do the action, but my challenge is knowing what item to act upon.&lt;br&gt;
&lt;br&gt;
I have a list of items&lt;br&gt;
1 me &lt;br&gt;
2 you&lt;br&gt;
3 him&lt;br&gt;
4 her&lt;br&gt;
&lt;br&gt;
and I have a button after each item. I want to click the button, have yahoo UI display a dialog saying &amp;quot;you&apos;re about to remove ME. Are you sure?&lt;br&gt;
&lt;br&gt;
So, I want the button to know the ID of the item (and I can put that information into the button) but how do I get the information into the newly displayed dialog?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-613145</guid>
  	<pubDate>Wed, 07 Jun 2006 19:17:44 -0800</pubDate>
  	<dc:creator>jazon</dc:creator>
</item>
<item>
  	<title>By: jazon</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#613154</link>	
  	<description>I have also received an answer offline, and to summarize it I probably need to know more javascript than I do.&lt;br&gt;
&lt;br&gt;
I have gone through the Yahoo UI group but a lot of what they&apos;re discussing is beyond me. I was hoping the documentation would give better explanation as well. &lt;br&gt;
&lt;br&gt;
I get the impression that what I want answered is so easy that if I knew more javascript I&apos;d already know the answer. I know it&apos;s possible because I see it all the time: click an event in google calendar and the info bubble pops up. Somehow I should be able to let the dialog know what item I&apos;m clicking.&lt;br&gt;
&lt;br&gt;
I am probably trying to run when I need to learn to crawl. I&apos;ll keep digging through Yahoo&apos;s site and forum, but if anyone can give more pointers I&apos;m all ears.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-613154</guid>
  	<pubDate>Wed, 07 Jun 2006 19:23:25 -0800</pubDate>
  	<dc:creator>jazon</dc:creator>
</item>
<item>
  	<title>By: AmbroseChapel</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#613252</link>	
  	<description>&lt;strong&gt;&lt;em&gt;I want to click the button, have yahoo UI display a dialog saying &amp;quot;you&apos;re about to remove ME. Are you sure? [...] So, I want the button to know the ID of the item&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;br&gt;
Well again, the question lacks enough context for a sensible answer. How are you building your form? If you&apos;re going to dynamically create your list from an array of options, doing a document.write() for each one, then it&apos;s easy to dynamically create your buttons from that same array.&lt;br&gt;
&lt;br&gt;
But if we don&apos;t know how the page gets created, we can&apos;t answer.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-613252</guid>
  	<pubDate>Wed, 07 Jun 2006 21:16:21 -0800</pubDate>
  	<dc:creator>AmbroseChapel</dc:creator>
</item>
<item>
  	<title>By: bastionofsanity</title>
  	<link>http://ask.metafilter.com/39725/How-to-pass-values-using-Yahoo-AJAX#613529</link>	
  	<description>I haven&apos;t looked at the Yahoo AJAX kit, so I don&apos;t know if it is producing highly obfuscated code (like the GWT), but if it is remotely readable, I would suggest doing some reading on basic AJAX manipulations.  Over the past two weeks I was able to go from understanding it as a buzzword to using it in a productive manner.  &lt;br&gt;
This was a very helpful source:&lt;br&gt;
&lt;a href=http://www.w3schools.com/ajax/default.asp&gt;W3Schools&lt;/a&gt;&lt;br&gt;
Also, depending on the data complexity, you may wish to look into the DOM Tutorial on that site as well.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.39725-613529</guid>
  	<pubDate>Thu, 08 Jun 2006 07:53:21 -0800</pubDate>
  	<dc:creator>bastionofsanity</dc:creator>
</item>

    </channel>
</rss>
