Chris
Chris

Reputation: 3657

Javascript, HTML, and iFrames

We have a web based type application which controls workflows for my place of business. Setting up how each user interacts with the application (Basically a web page) is a pretty straight forward process. We have the option of adding iframes into the layout.

I have written a very basic bit of javascript which sits inside an onChange function (part of the program) the script just calculates some numbers together and returns the value in a field.

What I am trying to do is get that total sum into an iframe instead of a form/element (?)

I understand this isn't very clear but is hard to go into great detail for company policy reasons.

Information is taken and calculated

for (var i = 0; i < grid.contentWindow.GetRowCount(); i++) 
{ 
Numof = grid.contentWindow.GetSingleColumnValue(i, 'info').replace(re, "");  
total =  parseFloat(Numof) - total;

And is printed out into a pre created field using

CF_SetFieldValue("Printed_Field", dec_ToDecimalValue(total.toString(), 2));

Question is: how do I get the information to print in the iframe instead of "Printed_Field"?

Sorry for the lengthy and randomish post. any help would be much appreciated.

Edit: I guess at the most simplest question - How do I get the information in the forms into the inframe instead? (To be displayed in a table)

Upvotes: 1

Views: 85

Answers (1)

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324790

That depends on how CF_SetFieldValue is defined. By the looks of it there's a lot of very strange and probably superfluous functions that get in the way of easy-to-read-and-understand code.

Probably what you need is something like grid.contentDocument.getElementById('Printed_Field').value = dec_ToDecimalValue(total.toString(),2);

Upvotes: 1

Related Questions