what i meant is on clicking the link below in short
<%=link_to_remote image_tag(“/images/
cricinfoLogo.gif”),{:update
=> “changing_layout”,:url => { :controller => ‘home’,:action =>
‘change_layout’,:value => ‘registration’},:method =>
:get},:id=>‘registr’ %>
it should replace the div below
style="position:absolute;top:
500px;left:350px;">
>
>
>
Registration
>
>
>
>
>
>
for that i write one js file called change_layout.js.rjs(sorry for
not mentioning that)
given below
puts"hhiiiiiiiiiiiiiiiiii"
if params[:value] == ‘registration’
page[:change_layout].replace_html :partial => registration
but its not replacing that div
On Tue, Jul 20, 2010 at 2:45 PM, Colin L. [email protected]
wrote:
On 20 July 2010 09:44, Tony A. <[email protected]> wrote:
> Hi i created an application which using ajax method,
but
> unfortunately ma application is not working this is ma view
page in
> which i used ajax. here on clickint the links it should replace
the
> div “changing_layout”
> on the basis of values passed to the controller but for me its
not
> working can any one please help me…
What is not working? Check in development.log to see if the params
are getting sent correctly, and what it says is happening next.
>
> <div style="position:absolute;top:1px;left:1px">
> <%= image_tag
(“indexbackground.jpg”,:size=>“1010x600”)%>
>
>
> <%= image_tag
(“indexbackground.jpg”,:size=>“1000x120”)%>
>
>
>
>
>
>
>
Rules And Regulations
>
>
>
>
>
>
>
<%= image_tag
> (“cricinfoLogo.gif”,:size=>“15x15”) %> 10 Points for every correct
> Answer |
<%= image_tag
> (“cricinfoLogo.gif”,:size=>“15x15”) %> Wrong Answers are not
> considered |
<%= image_tag
> (“cricinfoLogo.gif”,:size=>“15x15”) %> Can only Register once from
your
> system |
<%= image_tag
> (“cricinfoLogo.gif”,:size=>“15x15”) %> Can only Predict once a
> day |
<%= image_tag
> (“cricinfoLogo.gif”,:size=>“15x15”) %> Enter ur details again if
> registration failed |
>
>
>
>
>
>
>
>
Login
>
>
>
>
>
>
>
>
<%=link_to_remote
image_tag(“/images/cricinfoLogo.gif”),{:update
> => “changing_layout”,:url => { :controller => ‘home’,:action =>
> ‘change_layout’,:value => ‘registration’},:method =>
> :get},:id=>‘registr’ %>
> |
<%= link_to_remote ‘reg’,{ :update => ‘changing_layout’,:url
=> {
> :controller => ‘home’,:action => :change_layout, :value =>
> ‘registration’},:method => :get},:id=>‘registr’%> |
<%= link_to “Register”,signupforuser_path(:value =>
> “registration”) %> |
>
>
>
style=“position:absolute;top:500px;left:350px;”>
>
>
>
Registration
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <%= image_tag (“beta.png”,:size=>“50x50”) %>
>
>
>
> this is ma controller
>
>
> class HomeController < ApplicationController
> def index
>
> end
>
>
> def change_layout
> puts"halooooooooo"
> puts params[:value].inspect
> end
Have you got a change_layout view to be rendered? Normally for ajax
you would render it without layout.
Colin
--
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
[email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
–
Thanks & Regards,
-Mathew Augustine
Colin L. wrote:
On 20 July 2010 09:44, Tony A. [email protected] wrote:
Hi �i created � � � � an �application �which using �ajax method, � but
unfortunately �ma application is not � working this is �ma �view page in
which i �used ajax. here on clickint the links it �should replace the
div “changing_layout”
on the basis of �values �passed to the controller but �for me its �not
working � can any one please � help me…
What is not working? Check in development.log to see if the params
are getting sent correctly, and what it says is happening next.
("cricinfoLogo.gif",:size=>"15x15") %> Can only Register once from your
def change_layout
puts"halooooooooo"
puts params[:value].inspect
end
Have you got a change_layout view to be rendered? Normally for ajax
you would render it without layout.
Colin