You need to sign in to do that
Don't have an account?
apex:iframe source link problem
I'm trying to use a call to apex:iframe as below (this isn't the exact code but same situation)
<apex:iframe src="{!IFrameLink}" scrolling="false" frameborder="false" width="810" height="620"/>
and here is what my function looks like
public String getIFrameLink() {
if (searchString != null)
return 'http://www.google.ca/search?hl=en&q='+searchString;
else
return 'javascript:void();';
}
When I view source in IE7 the iframe is constructed like
<iframe src="http://www.google.ca/search?hl=en&q=query+string" scrolling="false" frameborder="false" width="810" height="620"/>
This doesn't work because of the & in the link. Any suggestions on how to resolve this? I'd still like to have a blank iframe if the test value is empty
Hi,
Perhaps you could use this:
<iframe src="<apex:outputText value="{!IFrameLink}" escape="false"/>" scrolling="false" frameborder="false" width="810" height="620"/>
Bit of a hack but it might work...
R.
When I'm trying to use the syntax as you specified it's throwing an error saying that :"The value of attribute "src" associated with an element type "iframe" must not contain the '<' character"
Is there any workaround or option to stop Apex:iFrame from getting the SRC values with &
Regards,
Prashant