$(".sub123").click(function() { var mnum = $("#mnum").val(); var dataString = ''value=''+ mnum; if(mnum=='''') { $(''.error'').fadeIn(300).show(); $(''.error'').fadeOut(3000); } else { $.ajax({ type: "GET", url: "http://localhost:3000/pages/show/", data: dataString , success: function(){ $(''#billerTerminal'').fadeIn(200).show(); $(''.checked3'').fadeIn(200).show(); $(''.error'').fadeOut(200).hide(); $(''.adddtl'').hide(); } }); } return false; }); In the above code when i call url *http://localhost:3000/pages/show/, *the functionaly will do in *show method in pages controller*, and get some results. So i need to update the result, which getting from show method with div id *#billerTerminal..???* * * *thank you* *vishnu* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/KY3EOyLdBE4J. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 16 May 2012 11:55, amvis <vgrkrishnan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> $(".sub123").click(function() { > var mnum = $("#mnum").val(); > var dataString = ''value=''+ mnum; > if(mnum=='''') > { > $(''.error'').fadeIn(300).show(); > $(''.error'').fadeOut(3000); > > } > else > { > > $.ajax({ > type: "GET", > url: "http://localhost:3000/pages/show/", > data: dataString , > success: function(){ > $(''#billerTerminal'').fadeIn(200).show(); > $(''.checked3'').fadeIn(200).show(); > $(''.error'').fadeOut(200).hide(); > $(''.adddtl'').hide(); > } > }); > } > return false; > }); > > In the above code when i call url *http://localhost:3000/pages/show/, *the > functionaly will do in *show method in pages controller*, and get some > results. So i need to update the result, which getting from show method > with div id *#billerTerminal..???* >So how far have you got? What does your controller look like? What is the problem you are having? *> * > *thank you* > *vishnu* > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/KY3EOyLdBE4J. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wednesday, 16 May 2012 07:24:36 UTC-4, iHiD wrote:> > > > On 16 May 2012 11:55, amvis <vgrkrishnan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> $(".*sub123*").click(function() { >> var mnum = $("#mnum").val(); >> var dataString = ''value=''+ mnum; >> if(mnum=='''') >> { >> $(''.error'').fadeIn(300).show(); >> $(''.error'').fadeOut(3000); >> >> } >> else >> { >> >> $.ajax({ >> type: "GET", >> url: "http://localhost:3000/pages/show/", >> data: dataString , >> success: function(){ >> $(''#*billerTerminal''*).fadeIn(200).show(); >> $(''.checked3'').fadeIn(200).show(); >> $(''.error'').fadeOut(200).hide(); >> $(''.adddtl'').hide(); >> } >> }); >> } >> return false; >> }); >> >> In the above code when i call url *http://localhost:3000/pages/show/, *the >> functionaly will do in *show method in pages controller*, and get some >> results. So i need to update the result, which getting from show method >> with div id *#billerTerminal..???* >> > > > Class pagesControlllerdef show @name ="name1" @name2 = "forname" end def page end end *page.html.erb* <div class="well"> <%= form_tag({:controller => ''pages'',:action => ''show'' }, {:method => :get}) do %> <%= text_field_tag(''mnum'' ,nil, :class => "input-xlarge",:style => "text-align:center;height:28px;background-color:#dff0d8;",:placeholder => "Enter Mobile Number") %> <%= submit_tag "Get", :id => "getpage", :class => "*sub123* btn btn-large btn-primary" %> <%end%> </div> <div class="well" *id="billerTerminal"*> <h3 style="white-space:nowrap; overflow:hidden">*<%= @name %>*</h3> </div> The problem is when i click the button with id *sub123, *call the ajax, and go to the url, there i can find the value of @name, so the when the ajax is success i have to display that *@name *into the div with id * billerTerminal...?*> So how far have you got? What does your controller look like? What is the > problem you are having? > > * >> * >> *thank you* >> *vishnu* >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/KY3EOyLdBE4J. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/tWIKScJv-6cJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.