link_to

I have this general menu that appears on every page so you can navigate to other pages. On a couple of pages I need to add some code that checks to see if certain text_fields are filled in or not, if they are and they are not saved I need to prompt the user to save them. My issue is that I am not find anything options for the link_to helper that would allow something like this. I was thinking about having link_to_if along with some javaScript to check the value of that field to first make usre that it is filled out. Is there a way to do that with a link_ot_if or does anyone have a better way? Thanks,

-S