function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arek S.Arek S. 

Pass Parameters (Query String) based on Fields on the Page

I have two fields on a VisualForce page


<apex:inputText id="fromDate" title="From Date" value="!mInputFromDate}"/>
<apex:inputText id="toDate" title="To Date" value="!mInputToDate}"/>

and I have a outputLink that needs to take the values from those two input text fields and pass them as parameters (also knows as the query string) to the next page.  The problem is that the values being passed are empty when I use the following code


<apex:outputLink value="/apex/Report" styleClass="btn" style="color: gray; padding: 2px 3px 2px 3px; text-decoration: none;">
  <apex:param name="from" value="{!mInputFromDate}" />
<apex:param name="to" value="{!mInputToDate}" /> Generate Report </apex:outputLink>

I'm guessing one of two things are the problem.  Either I'm not doing things correctly, or the query string for the link is created at the time of rendering of the page and isn't being updated to reflect values entered in the the From and To fields, which means that I would probably have to use JavaScript to create the query string based on what's in those two fields at the time the link is clicked.  If that's the case does anyone happen to have any examples handy?