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>     
0

1 Answer 1

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> 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .