2

I am trying to use apex:actionSupport to trigger an URL (along with calling a value , c.sfprn , from {!RowList}.

Currently, dropdown menu works, but when an user clicks the dropdown, nothing triggers.

Here is my code.
How do I go about doing it?

<apex:pageBlockTable value="{!RowList}" var="c">
    <apex:column >
         <apex:facet name="header">All Surveys</apex:facet>
            <span>All Surveys: </span>
                <apex:selectList id="AllSurvey" size="1">
                    <apex:selectOption itemValue="http://www.test.com?sfprn={!c.sfprn}&id=1" itemLabel="Test1"></apex:selectOption>                     
                </apex:selectList>
     </apex:column>
</apex:pageBlockTable>     
2

If I understand correctly, you are trying to open the selected URL on a new window.

Then no need to use actionSupport. Javascript window.open() at onchange event will serve your purpose.

<apex:pageBlockTable value="{!RowList}" var="c">
    <apex:column >
         <apex:facet name="header">All Surveys</apex:facet>
            <span>All Surveys: </span>
                <apex:selectList id="AllSurvey" size="1" onchange="javascript:window.open(this.value)">
                    <apex:selectOption itemValue="http://www.test.com?sfprn={!c.sfprn}&id=1" itemLabel="Test1"></apex:selectOption>                     
                </apex:selectList>
     </apex:column>
</apex:pageBlockTable> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.