Matthew Williams
2007-Feb-08 18:59 UTC
Using Prototype functionality in DIVs with Ajax.Updater data
In my Index I have the basic: <script type="text/javascript" src="include/prototype.js"></script> On my index page I take advantage of the $F(form) functionality to grab form values. I pass the value to a function which makes an AJAX.Updater call and populates a DIV with no problems at all. However, the content I imported has another $F(form) use but it flakes out because it can no longer see prototype.js and if I put <script type="text/javascript" src="include/prototype.js"></script> in the page I''m pulling content from with the AJAX.Updater call. How can I make sure everything can see prototype.js? I''m stuck using getLRUs(window.document.rackForm.rackNumber.options[selectedIndex].value); opposed to getLRUs($F(rackForm)); Any thoughts or tips on effectively getting Prototype seen? My AJAX.Updater call: function getLRUs(selected_value){ var url = ''page.cfm''; var pars = ''id=''+selected_value; var target = ''mainBox''; var myAjax = new Ajax.Updater(target, url, {method: ''get'', parameters: pars, asynchronous:true, evalScripts: true}); initLightbox(); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---