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
pcristinipcristini 

Apex outputText in link href

Hi,

I'm attempting to concatenate a value from the user's organization into a link. Here's an example of what I'm looking to do

<a href="http://www.google.ca/search?hl=en&q=<apex:outputText value="{!SomeSearchMethod}" />">Search Google</a>

 

Now of course this isn't the exact code I'd be using, but its the same principle. How would I go about doing this? or should my method just return the whole link?

 

wesnoltewesnolte

Hey

 

There's a nice way to do this:

 

<apex:outputLink value="http://www.google.ca/search?hl=en&q={!SomeSearchMethod}">Search Google</apex:outputLink>

 

Cheers,

Wes