whereby the buildURL is called, in Apex, each time a user selects an Account from a list. All it does is compile an URL and rerender some VF blocks. When the user clicks a button or link, he gets redirected to a server which unfortunately does not accept UTF-8 encoded URLs. I prefer buttons, but here is what I have defined on the page:
Elsewhere I have defined a OutputLink as follows:
<apex:pageblock title="test" id="outlink">
<apex:outputLink value="{!generatedURL}" target="_self" id="outurl">
link is {!generatedURL}
</apex:outputLink>
</apex:pageblock>
- the URL works perfectly fine, except for the fact that the redirect does not happen in the "right-hand" frame in SF
- the button: does not work at all, but I am not a JavaScript expert either, but I think that the javascript is not picking up the ajax-modified value of the URL, but is rather taking the standard value as defined by the initial load of the page. Is there a way to read out value on a html page that were modified through Ajax?
When I try the code above, nothing works. However, pasting the rendered part of location.replace.... in the console of Chrome it *does* redirect. Clicking the button does nothing at all
Hi,
In Visualforce, the way ids should be accessed is little different.
Try the below code and see.
Thanks
Tried it, but the value is "undefined", however, the $Component reference is valid (checked through JS aler() function)
K
This should work.
Can you post your VF page code, so that i can see?
When I try the code above, nothing works. However, pasting the rendered part of location.replace.... in the console of Chrome it *does* redirect. Clicking the button does nothing at all
Here is the VF "as is stands"