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