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....
<div style="position:absolute;top:1px;left:1px">
<%= image_tag
("indexbackground.jpg",:size=>"1010x600")%></td></tr>
</div>
<div id ="header"
style="position:absolute;top:1px;left:1px">
<%= image_tag
("indexbackground.jpg",:size=>"1000x120")%></td></tr>
</div>
<div id ="rules"
style="position:absolute;top:200px;left:50px;">
<center>
<table BORDER=1>
<div class ="caption"> Rules And Regulations </div>
    <tr><td><font face=verdana size=2 color=#FF0000><%=
image_tag
("cricinfoLogo.gif",:size=>"15x15") %> 10 Points for
every correct
Answer</font></td></tr>
    <tr><td><font face=verdana size=2 color=#FF0000><%=
image_tag
("cricinfoLogo.gif",:size=>"15x15") %> Wrong Answers
are not
considered</font></td></tr>
    <tr><td><font face=verdana size=2 color=#FF0000><%=
image_tag
("cricinfoLogo.gif",:size=>"15x15") %> Can only
Register once from your
system</font></td></tr>
    <tr><td><font face=verdana size=2 color=#FF0000><%=
image_tag
("cricinfoLogo.gif",:size=>"15x15") %> Can only
Predict once a
day</font></td></tr>
    <tr><td><font face=verdana size=2 color=#FF0000><%=
image_tag
("cricinfoLogo.gif",:size=>"15x15") %> Enter ur
details again if
registration failed</font></td></tr>
</table>
</center>
</div>
<div id ="signin"
style="position:absolute;top:200px;left:500px;">
<center>
<table BORDER=1>
  <div class ="caption"> Login </div>
  <tr>
  <td><%=link_to_remote
image_tag("/images/cricinfoLogo.gif"),{:update
=> "changing_layout",:url => { :controller =>
''home'',:action =>
''change_layout'',:value =>
''registration''},:method =>
:get},:id=>''registr''   %>
</td>
<td><%= link_to_remote ''reg'',{  :update =>
''changing_layout'',:url => {
:controller => ''home'',:action => :change_layout, :value
=>
''registration''},:method =>
:get},:id=>''registr''%> </td>
  <td><%= link_to "Register",signupforuser_path(:value =>
"registration") %></td>
  </tr>
</table>
</center>
</div>
<div id ="changing_layout"
style="position:absolute;top:500px;left:350px;">
<center>
<table BORDER=1>
  <div class ="caption"> Registration </div>
  <tr>
  <td></td>
  </tr>
</table>
</center>
</div>
<div style="position:absolute;top:40px;left:10px">
<center>
<table>
<tr>
<td><a href="http://cricinfo.com" target="cricinfo"
>
<%= image_tag
("cricket_logo.jpg",:size=>"30x30")%></a></td>
<td><font face=verdana size=5 color=#ffffff><b>
             
2011 WORLD CUP INDIA- CRICKET
CONTEST</font></b></td></tr>
</table>
</div>
<div style="position:absolute;top:40px;left:1350px">
<%= image_tag ("beta.png",:size=>"50x50")
%><br>
</div>
this is  ma controller
class HomeController < ApplicationController
def index
end
def change_layout
puts"halooooooooo"
puts params[:value].inspect
end
end
-- 
Posted via http://www.ruby-forum.com/.
-- 
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 20 July 2010 09:44, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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")%></td></tr> > </div> > <div id ="header" style="position:absolute;top:1px;left:1px"> > <%= image_tag ("indexbackground.jpg",:size=>"1000x120")%></td></tr> > </div> > > > <div id ="rules" style="position:absolute;top:200px;left:50px;"> > <center> > <table BORDER=1> > <div class ="caption"> Rules And Regulations </div> > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > ("cricinfoLogo.gif",:size=>"15x15") %> 10 Points for every correct > Answer</font></td></tr> > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > ("cricinfoLogo.gif",:size=>"15x15") %> Wrong Answers are not > considered</font></td></tr> > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > ("cricinfoLogo.gif",:size=>"15x15") %> Can only Register once from your > system</font></td></tr> > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > ("cricinfoLogo.gif",:size=>"15x15") %> Can only Predict once a > day</font></td></tr> > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > ("cricinfoLogo.gif",:size=>"15x15") %> Enter ur details again if > registration failed</font></td></tr> > </table> > </center> > </div> > > > <div id ="signin" style="position:absolute;top:200px;left:500px;"> > <center> > <table BORDER=1> > <div class ="caption"> Login </div> > <tr> > <td><%=link_to_remote image_tag("/images/cricinfoLogo.gif"),{:update > => "changing_layout",:url => { :controller => ''home'',:action => > ''change_layout'',:value => ''registration''},:method => > :get},:id=>''registr'' %> > </td> > > <td><%= link_to_remote ''reg'',{ :update => ''changing_layout'',:url => { > :controller => ''home'',:action => :change_layout, :value => > ''registration''},:method => :get},:id=>''registr''%> </td> > > <td><%= link_to "Register",signupforuser_path(:value => > "registration") %></td> > </tr> > </table> > </center> > </div> > <div id ="changing_layout" > style="position:absolute;top:500px;left:350px;"> > <center> > <table BORDER=1> > <div class ="caption"> Registration </div> > <tr> > <td></td> > </tr> > </table> > </center> > </div> > > > > > > > <div style="position:absolute;top:40px;left:10px"> > <center> > <table> > <tr> > <td><a href="http://cricinfo.com" target="cricinfo" > > <%= image_tag ("cricket_logo.jpg",:size=>"30x30")%></a></td> > > <td><font face=verdana size=5 color=#ffffff><b> >               > 2011 WORLD CUP INDIA- CRICKET CONTEST</font></b></td></tr> > </table> > </div> > > <div style="position:absolute;top:40px;left:1350px"> > <%= image_tag ("beta.png",:size=>"50x50") %><br> > </div> > > > this is ma controller > > > class HomeController < ApplicationController > def index > > end > > > def change_layout > puts"halooooooooo" > puts params[:value].inspect > endHave 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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
<div id ="changing_layout"> style="position:absolute;top:
500px;left:350px;">> <center>
> <table BORDER=1>
>  <div class ="caption"> Registration </div>
>  <tr>
>  <td></td>
>  </tr>
> </table>
> </center>
> </div>
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 Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:
> On 20 July 2010 09:44, Tony Augustine
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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")%></td></tr>
> > </div>
> > <div id ="header"
style="position:absolute;top:1px;left:1px">
> > <%= image_tag
("indexbackground.jpg",:size=>"1000x120")%></td></tr>
> > </div>
> >
> >
> > <div id ="rules"
style="position:absolute;top:200px;left:50px;">
> > <center>
> > <table BORDER=1>
> > <div class ="caption"> Rules And Regulations
</div>
> >
> >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
> > ("cricinfoLogo.gif",:size=>"15x15") %> 10
Points for every correct
> > Answer</font></td></tr>
> >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
> > ("cricinfoLogo.gif",:size=>"15x15") %> Wrong
Answers are not
> > considered</font></td></tr>
> >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
> > ("cricinfoLogo.gif",:size=>"15x15") %> Can
only Register once from your
> > system</font></td></tr>
> >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
> > ("cricinfoLogo.gif",:size=>"15x15") %> Can
only Predict once a
> > day</font></td></tr>
> >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
> > ("cricinfoLogo.gif",:size=>"15x15") %> Enter
ur details again if
> > registration failed</font></td></tr>
> > </table>
> > </center>
> > </div>
> >
> >
> > <div id ="signin"
style="position:absolute;top:200px;left:500px;">
> > <center>
> > <table BORDER=1>
> >  <div class ="caption"> Login </div>
> >  <tr>
> >  <td><%=link_to_remote
image_tag("/images/cricinfoLogo.gif"),{:update
> > => "changing_layout",:url => { :controller =>
''home'',:action =>
> > ''change_layout'',:value =>
''registration''},:method =>
> > :get},:id=>''registr''   %>
> > </td>
> >
> > <td><%= link_to_remote ''reg'',{  :update
=> ''changing_layout'',:url => {
> > :controller => ''home'',:action =>
:change_layout, :value =>
> > ''registration''},:method =>
:get},:id=>''registr''%> </td>
> >
> >  <td><%= link_to
"Register",signupforuser_path(:value =>
> > "registration") %></td>
> >  </tr>
> > </table>
> > </center>
> > </div>
> > <div id ="changing_layout"
> > style="position:absolute;top:500px;left:350px;">
> > <center>
> > <table BORDER=1>
> >  <div class ="caption"> Registration </div>
> >  <tr>
> >  <td></td>
> >  </tr>
> > </table>
> > </center>
> > </div>
> >
> >
> >
> >
> >
> >
> > <div style="position:absolute;top:40px;left:10px">
> > <center>
> > <table>
> > <tr>
> > <td><a href="http://cricinfo.com"
target="cricinfo" >
> > <%= image_tag
("cricket_logo.jpg",:size=>"30x30")%></a></td>
> >
> > <td><font face=verdana size=5 color=#ffffff><b>
> >
>
             
> > 2011 WORLD CUP INDIA- CRICKET
CONTEST</font></b></td></tr>
> > </table>
> > </div>
> >
> > <div style="position:absolute;top:40px;left:1350px">
> > <%= image_tag ("beta.png",:size=>"50x50")
%><br>
> > </div>
> >
> >
> > 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
>
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
-- 
-- 
Thanks & Regards,
  -Mathew  Augustine
  Software Programmer(ROR)
  Maxxion Technologies Inc
  Kakkanad - Cochin
  M : +91 -9846476386
  E : augustine.mathew99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org |
mathewa99-/E1597aS9LQxFYw1CcD5bw@public.gmane.org
  Follow me on : Twitter as
http://twitter.com/augustine966|Blog:http//electronicstrainer.blogspot.com
-- 
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.
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
<div id ="changing_layout"> style="position:absolute;top:
500px;left:350px;">> <center>
> <table BORDER=1>
>  <div class ="caption"> Registration </div>
>  <tr>
>  <td></td>
>  </tr>
> </table>
> </center>
> </div>
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
- Show quoted text -
On Tue, Jul 20, 2010 at 2:45 PM, Colin Law
<clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:
    On 20 July 2010 09:44, Tony Augustine
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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")%></td></tr>
    > </div>
    > <div id ="header"
style="position:absolute;top:1px;left:1px">
    > <%= image_tag 
("indexbackground.jpg",:size=>"1000x120")%></td></tr>
    > </div>
    >
    >
    > <div id ="rules"
style="position:absolute;top:200px;left:50px;">
    > <center>
    > <table BORDER=1>
    > <div class ="caption"> Rules And Regulations
</div>
    >
    >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
    > ("cricinfoLogo.gif",:size=>"15x15") %> 10
Points for every correct
    > Answer</font></td></tr>
    >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
    > ("cricinfoLogo.gif",:size=>"15x15") %> Wrong
Answers are not
    > considered</font></td></tr>
    >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
    > ("cricinfoLogo.gif",:size=>"15x15") %> Can
only Register once from
your
    > system</font></td></tr>
    >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
    > ("cricinfoLogo.gif",:size=>"15x15") %> Can
only Predict once a
    > day</font></td></tr>
    >    <tr><td><font face=verdana size=2
color=#FF0000><%= image_tag
    > ("cricinfoLogo.gif",:size=>"15x15") %> Enter
ur details again if
    > registration failed</font></td></tr>
    > </table>
    > </center>
    > </div>
    >
    >
    > <div id ="signin"
style="position:absolute;top:200px;left:500px;">
    > <center>
    > <table BORDER=1>
    >  <div class ="caption"> Login </div>
    >  <tr>
    >  <td><%=link_to_remote 
image_tag("/images/cricinfoLogo.gif"),{:update
    > => "changing_layout",:url => { :controller =>
''home'',:action =>
    > ''change_layout'',:value =>
''registration''},:method =>
    > :get},:id=>''registr''   %>
    > </td>
    >
    > <td><%= link_to_remote ''reg'',{  :update
=> ''changing_layout'',:url
=> {
    > :controller => ''home'',:action =>
:change_layout, :value =>
    > ''registration''},:method =>
:get},:id=>''registr''%> </td>
    >
    >  <td><%= link_to
"Register",signupforuser_path(:value =>
    > "registration") %></td>
    >  </tr>
    > </table>
    > </center>
    > </div>
    > <div id ="changing_layout"
    > style="position:absolute;top:500px;left:350px;">
    > <center>
    > <table BORDER=1>
    >  <div class ="caption"> Registration </div>
    >  <tr>
    >  <td></td>
    >  </tr>
    > </table>
    > </center>
    > </div>
    >
    >
    >
    >
    >
    >
    > <div style="position:absolute;top:40px;left:10px">
    > <center>
    > <table>
    > <tr>
    > <td><a href="http://cricinfo.com"
target="cricinfo" >
    > <%= image_tag
("cricket_logo.jpg",:size=>"30x30")%></a></td>
    >
    > <td><font face=verdana size=5 color=#ffffff><b>
    > 
             
    > 2011 WORLD CUP INDIA- CRICKET
CONTEST</font></b></td></tr>
    > </table>
    > </div>
    >
    > <div style="position:absolute;top:40px;left:1350px">
    > <%= image_tag ("beta.png",:size=>"50x50")
%><br>
    > </div>
    >
    >
    > 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 
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.
--
--
Thanks & Regards,
  -Mathew  Augustine
Colin Law wrote:> On 20 July 2010 09:44, Tony Augustine
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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.
> 
>> <center>
>> ("cricinfoLogo.gif",:size=>"15x15") %> Can
only Register once from your
>>
>> </td>
>> </div>
>> </div>
>> <td><a href="http://cricinfo.com"
target="cricinfo" >
>> </div>
>>
>> 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
-- 
Posted via http://www.ruby-forum.com/.
-- 
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@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Could you not top post please, it makes it more difficult to follow the thread, and easier to forget to reply to something, for example you did not reply to my question asking what is in the log. See further question below On 20 July 2010 10:27, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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 > > > <div id ="changing_layout" >> style="position:absolute;top: > 500px;left:350px;"> >> <center> >> <table BORDER=1> >> <div class ="caption"> Registration </div> >> <tr> >> <td></td> >> </tr> >> </table> >> </center> >> </div> > > > for that i write one js file called change_layout.js.rjs(sorry for > not mentioning that) > given below > > puts"hhiiiiiiiiiiiiiiiiii"Is the puts output appearing? Colin> if params[:value] == ''registration'' > page[:change_layout].replace_html :partial => registration > > but its not replacing that div > > > - Show quoted text - > > On Tue, Jul 20, 2010 at 2:45 PM, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: > > On 20 July 2010 09:44, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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")%></td></tr> > > </div> > > <div id ="header" style="position:absolute;top:1px;left:1px"> > > <%= image_tag > ("indexbackground.jpg",:size=>"1000x120")%></td></tr> > > </div> > > > > > > <div id ="rules" style="position:absolute;top:200px;left:50px;"> > > <center> > > <table BORDER=1> > > <div class ="caption"> Rules And Regulations </div> > > > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > > ("cricinfoLogo.gif",:size=>"15x15") %> 10 Points for every correct > > Answer</font></td></tr> > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > > ("cricinfoLogo.gif",:size=>"15x15") %> Wrong Answers are not > > considered</font></td></tr> > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > > ("cricinfoLogo.gif",:size=>"15x15") %> Can only Register once from > your > > system</font></td></tr> > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > > ("cricinfoLogo.gif",:size=>"15x15") %> Can only Predict once a > > day</font></td></tr> > > <tr><td><font face=verdana size=2 color=#FF0000><%= image_tag > > ("cricinfoLogo.gif",:size=>"15x15") %> Enter ur details again if > > registration failed</font></td></tr> > > </table> > > </center> > > </div> > > > > > > <div id ="signin" style="position:absolute;top:200px;left:500px;"> > > <center> > > <table BORDER=1> > > <div class ="caption"> Login </div> > > <tr> > > <td><%=link_to_remote > image_tag("/images/cricinfoLogo.gif"),{:update > > => "changing_layout",:url => { :controller => ''home'',:action => > > ''change_layout'',:value => ''registration''},:method => > > :get},:id=>''registr'' %> > > </td> > > > > <td><%= link_to_remote ''reg'',{ :update => ''changing_layout'',:url > => { > > :controller => ''home'',:action => :change_layout, :value => > > ''registration''},:method => :get},:id=>''registr''%> </td> > > > > <td><%= link_to "Register",signupforuser_path(:value => > > "registration") %></td> > > </tr> > > </table> > > </center> > > </div> > > <div id ="changing_layout" > > style="position:absolute;top:500px;left:350px;"> > > <center> > > <table BORDER=1> > > <div class ="caption"> Registration </div> > > <tr> > > <td></td> > > </tr> > > </table> > > </center> > > </div> > > > > > > > > > > > > > > <div style="position:absolute;top:40px;left:10px"> > > <center> > > <table> > > <tr> > > <td><a href="http://cricinfo.com" target="cricinfo" > > > <%= image_tag ("cricket_logo.jpg",:size=>"30x30")%></a></td> > > > > <td><font face=verdana size=5 color=#ffffff><b> > > >               > > 2011 WORLD CUP INDIA- CRICKET CONTEST</font></b></td></tr> > > </table> > > </div> > > > > <div style="position:absolute;top:40px;left:1350px"> > > <%= image_tag ("beta.png",:size=>"50x50") %><br> > > </div> > > > > > > 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 > 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. > > > > > -- > -- > Thanks & Regards, > > -Mathew Augustine > > > > Colin Law wrote: >> On 20 July 2010 09:44, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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. >> >>> <center> >>> ("cricinfoLogo.gif",:size=>"15x15") %> Can only Register once from your >>> >>> </td> >>> </div> >>> </div> >>> <td><a href="http://cricinfo.com" target="cricinfo" > >>> </div> >>> >>> 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 > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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@googlegroups.com. > 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> Could you not top post please, it makes it more difficult to follow > the thread, and easier to forget to reply to something, for example > you did not reply to my question asking what is in the log. > > See further question below > > On 20 July 2010 10:27, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >>> </table> >>> </center> >>> </div> >> >> >> for that i write one js file called change_layout.js.rjs(sorry for >> not mentioning that) >> given below >> >> puts"hhiiiiiiiiiiiiiiiiii" > > > Is the puts output appearing? > > Colinok sir i willl follow in that mannnner in the console value parameter is getting its coming lik this halooooooooo "registration" [4;36;1mSQL (2.1ms) [0m [0;1mSET client_min_messages TO ''panic'' [0m [4;35;1mSQL (1.7ms) [0m [0mSET client_min_messages TO ''notice'' [0m Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 14:07:05) [GET] Parameters: {"value"=>"registration"} -- Posted via http://www.ruby-forum.com/. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> Could you not top post please, it makes it more difficult to follow > the thread, and easier to forget to reply to something, for example > you did not reply to my question asking what is in the log. > > See further question below > > On 20 July 2010 10:27, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> >>> </table> >>> </center> >>> </div> >> >> >> for that i write one js file called change_layout.js.rjs(sorry for >> not mentioning that) >> given below >> >> puts"hhiiiiiiiiiiiiiiiiii" > > > Is the puts output appearing? > > Colinin the console value parameter is getting its coming lik this halooooooooo "registration" [4;36;1mSQL (2.1ms) [0m [0;1mSET client_min_messages TO ''panic'' [0m [4;35;1mSQL (1.7ms) [0m [0mSET client_min_messages TO ''notice'' [0m Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 14:07:05) [GET] Parameters: {"value"=>"registration"} -- Posted via http://www.ruby-forum.com/. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 20 July 2010 10:39, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote: >> Could you not top post please, it makes it more difficult to follow >> the thread, and easier to forget to reply to something, for example >> you did not reply to my question asking what is in the log. >> >> See further question below >> >> On 20 July 2010 10:27, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> >>>> </table> >>>> </center> >>>> </div> >>> >>> >>> for that i write one js file called change_layout.js.rjs(sorry for >>> not mentioning that) >>> given below >>> >>> puts"hhiiiiiiiiiiiiiiiiii" >> >> >> Is the puts output appearing? >> >> Colin > ok sir i willl follow in that mannnner > > in the console value parameter is getting > its coming lik this > halooooooooo > "registration" > [4;36;1mSQL (2.1ms) [0m [0;1mSET client_min_messages TO > ''panic'' [0m > [4;35;1mSQL (1.7ms) [0m [0mSET client_min_messages TO ''notice'' [0m > > > Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 > 14:07:05) [GET] > Parameters: {"value"=>"registration"}Is there nothing in development.log after that? Colin> > > > > -- > Posted via http://www.ruby-forum.com/. > > -- > 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@googlegroups.com. > 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> On 20 July 2010 10:39, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>>> </center> >>> Is the puts output appearing? >> � [4;35;1mSQL (1.7ms) [0m � �[0mSET client_min_messages TO ''notice'' [0m >> >> >> Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 >> 14:07:05) [GET] >> �Parameters: {"value"=>"registration"} > > Is there nothing in development.log after that? > > Colinno sir, when i check the error console its showing that "ajax not defined" -- Posted via http://www.ruby-forum.com/. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 20 July 2010 11:13, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote: >> On 20 July 2010 10:39, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>>>>> </center> >>>> Is the puts output appearing? >>> � [4;35;1mSQL (1.7ms) [0m � �[0mSET client_min_messages TO ''notice'' [0m >>> >>> >>> Processing HomeController#change_layout (for 127.0.0.1 at 2010-07-20 >>> 14:07:05) [GET] >>> �Parameters: {"value"=>"registration"} >> >> Is there nothing in development.log after that? >> >> Colin > > no sir, when i check the error console its showing that > > "ajax not defined"Perhaps ajax is not defined then. Have you remembered to in include the Protoype javascript library? Put jacascript_include_tag :defaults in the head in your 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote:> On 20 July 2010 11:13, Tony Augustine <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> >>> Is there nothing in development.log after that? >>> >>> Colin >> >> no sir, when i check the error console its showing that >> >> "ajax not defined" > > Perhaps ajax is not defined then. Have you remembered to in include > the Protoype javascript library? Put > jacascript_include_tag :defaults > in the head in your layout. > > Colinthanks a lot sir now its working <%= javascript_include_tag :defaults %> done it for me -- Posted via http://www.ruby-forum.com/. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.