Skip to main content

I've only been able to execute javascript within the same view on controls.  I haven't been able to get it to work between two diffrent views or from the form to the view.  Has anyone been able to accomplish this?

Di Disa,

Have you try add your javascript as form level, it should be works. Can I see your javascript are you using? So I can try on my end, if it works on view, it should be works on form as well.


Hi,

Could you please explain what you're trying to achieve?
do you have a sample script that is not working for you?

Macky,

 

I've tried to inject javascript at the form level by injecting it into a data label from an espression after the form has initialized but that doesn't work if you are trying to manipulate controls within a form.  I've only been successful manipulating controls by injecting javascript within the view to access controls within that view only.


Thank you for the reply Mustafa, this what time trying to do.

 

1. How can you have Javascript that is injected at the Form level manipulate controls at the View level.  (example: How can I inject javascript in a data label on a form and have it read the value of a textbox on a view.)

 

2. How can you have Javascript that is injected at the View level manipulate controls in another view within the same Form.  (example: How can I inject javascript in a data label on a view within a form and have it read the value of a textbox on another view within the form.)

 

This code below works for reading a value with a view as long as I'm injecting it within a datalabel within that same view.

 

<script type="text/javascript">
var v1 = $("[name='tb_FirstName']").SFCTextBox('option','text');
alert(var);
</script>

 

Thanks

Disa


Reply