当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How to fetch value from select tag in rails2?

问题描述:

How to fetch the value from the select tag and how can display that selected value in pdf page when click on generate pdf. But the value i using to select is from different model

<%= select_tag 'header',options_from_collection_for_select(@reciept_header, 'id', 'receipt_mainheader'), :include_blank => true %>

网友答案:

Seems you need to send this value to another action, where you will generate pdf. You can wrap this select in form and submit it, or use ajax to send select value in another action, and generate/download pdf file asynchronously

分享给朋友:
您可能感兴趣的文章:
随机阅读: