1

I have been trying to figure out how I can render a page in rails without refreshing the application.html.erb. I only want to refresh a the part that goes in the <=% yeald %> part and no other. I did this using ajax but I am using latex code on my pages(mathjax) that will not compile unless the page is refreshed, so ajax does not work in my case.

I have searched for tutorials but have not found a clear way to do this. So is this possible, render a page as partial without using ajax?

Thanks.

baron aron
  • 169
  • 8

1 Answers1

3

If you want to reload part of a web page you only have two options - use Javascript (AJAX), or use an iframe.

If you use Javascript to update parts of the page you need to tell MathJax to reparse the page after you have changed it.

To do that see this related question here:
How to recall or restart MathJax?

Community
  • 1
  • 1
Casper
  • 33,403
  • 4
  • 84
  • 79