Jump to content

Javascript


Recommended Posts

I have a submission page with an iframe in it. Within the iframe is a report. I have js within the iframe that copies field values from the iframe report into the submission page fields. One of the fields (rx_2 below) in the iframe report is a number value. When copying this rx_2 field to the submission page (field labeled rx_2 as well) I'd like to copy the number value and add 1. For example if the iframe rx_2 field value is "3" I would like 4 to appear in the submission page  after the copy. Here is the code:

 

<script>
window.onload = function(){
// this runs when the iframe has been loaded
 
var parentInsertRecordrx_2Field = parent.document.getElementsByName('InsertRecordrx_2');
var iframeEditRecordtreatment_note_rx_2Field = document.getElementsByName('EditRecordtreatment_note_rx_2');
parentInsertRecordrx_2Field[0].value = iframeEditRecordtreatment_note_rx_2Field[0].value;
 
}
</script>
 
 
Thanks in advance for the help.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...