You need to sign in to do that
Don't have an account?
Alaa
encoding the URL in src atrribute when using the apex:iframe tag
Hi, am writing a visualforce page and using the <apex:iframe> tag the src attribute .. I need to encode the URL am passing in the src ..how can I do so?
The URLENCODE function should do the trick.
Something like:
All Answers
I'm not quite sure what you mean by encode the URL, but you can use merge fields/formula in the src attribute, eg.
yes I know this so suppose in your example that the value of Account.id contains some special character like "&" then the whole url will be wrong ... this is exactly what am facing now... am sending some parameter in the url and it does contain the "&" character so when I recieve it will be broken into two paramters... any idea?
The URLENCODE function should do the trick.
Something like:
Thats it .. thank you.
But what if the text I want to encode is actual text and not a variable?
For example,
a href="mailto:user@company.com?subject={!urlencode(resource plan for ){!somevariable}&body={!urlencode(thebody)}"
Must the user enter resource%20plan%20for%20{!somevariable} ???