I have an InPlaceEditor, when it is clicked on it loads the unformatted textile text from the server. When i click on menu items, I change the content to the formatted text and i want to change the file the InPlaceEditor will load. I thought a simple loadTextURL: "getPage.php?page=" + currentPage; would do. But currentPage is always empty... It''s baffling :p Is there a way to fix this problem, or perhaps, is there a better way of going about this? Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it''s FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
I have an InPlaceEditor, when it is clicked on it loads the unformatted textile text from the server. When i click on menu items, I change the content to the formatted text and i want to change the file the InPlaceEditor will load. I thought a simple loadTextURL: "getPage.php?page=" + currentPage; would do. But currentPage is always empty... It''s baffling :p Is there a way to fix this problem, or perhaps, is there a better way of going about this? Thanks. _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it''s FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
The loadTextURL only gets evaluated once, when the control is created. This is just how JavaScript works. To change the loadTextURL you need to explicitly change it every time you change the currentPage, like this: inPlaceEditor.options.loadTextURL = "getPage.php?page=" + currentPage; On 11/24/05, Jono Young <cowlauncher9-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> I have an InPlaceEditor, when it is clicked on it loads the unformatted > textile text from the server. When i click on menu items, I change the > content to the formatted text and i want to change the file the > InPlaceEditor will load. > I thought a simple > > loadTextURL: "getPage.php?page=" + currentPage; > > would do. But currentPage is always empty... It''s baffling :p > Is there a way to fix this problem, or perhaps, is there a better way of > going about this? > > Thanks. > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it''s FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >