Text input, URL and Frame Control

I have several text input controls whose input I’m using to build a URL and when a button is clicked I want the content of the what the URL points to displayed in a Frame Control. I’m building the URL with JavaScript that is ran when an onClick event for the button fires.

How do I get the URL that I build with the JavaScript to target a Frame Control?

I tried this:


document.getElementById('#{caf:cid("frameURLTest")}').value = url;

where url is the URL I built with the JavaScript and frameURLTest is the Frame Control I want the content displayed in but it did not work.

Is there a way of doing what I want?

Try this:

CAF.model('#{caf:cid("frameURLTest")}').element.src = url;
1 Like

That did the trick. Thanks!

On a general note is there any documentation that describes how to determine what the properties are for any given control that can be accessed by JavaScript like this?

For example in Designer and the CAF Developer documentation there is not a src property associated with the Frame Control and says to use the Value property for the URL. If you hadn’t told me to what to use would I know to use src?

Thanks again.