On Fri, 2009-07-24 at 05:09 -0700, JannaB wrote: > it is posting somewhere and I believe that because in firefox, > the error concole is clean.
The console tab in the Firebug plugin is what you want to be looking at. It will tell you if / where your app is making requests and the parameters it's passing. HTH, Bill > Can someone tell me from my js below where I am > posting, or why my controller method isnt getting the post? Thanks, > Janna B > > //this function is getting called by an onchange in the associates > select > function assocchange(therow){ > var s = document.getElementById("assoc"+therow).value; > var url = "/channels/assocboxchange/" > var parameters = "assoc=" + escape(encodeURI(s)) + "&id=" + therow; > formid="assoc" + therow; > makePOSTRequest(url, parameters, formid) > } > > function makePOSTRequest(url, parameters, formid){ > req3 = new XMLHttpRequest(); > if (req3) { > req3.onreadystatechange = alertContents(formid); > req3.open('POST', url, true); > req3.setRequestHeader("Content-type", "application/x-www-form- > urlencoded"); > req3.setRequestHeader("Content-length", parameters.length); > req3.setRequestHeader("Connection", "close"); > req3.send(parameters); > } > } > > > function alertContents(formid) { > if (req3.readyState == 4) { > if (req3.status == 200) { > result = req3.responseText; > document.getElementById("'"+formid+"'").innerHTML = > result; > } else { > alert('There was a problem with the request.'); > } > } > } --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---