Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Assistance with XML file : button calling javascript function passing parameters and returning an answer then display it

By
Billiard R Made
on 12/4/14, 7:22 AM 1,517 views

Please help with very simple JavaScript logic.  I want a my xml button to call a javascript function passing parameters then calculate and return an answer for display. Below is the relavant part of my XML file

<field name="x" />
<field name="y" />                
<field name="z" />                
<script language="JavaScript">
     function findWriter() {                        
         //user to enter numeric values x and y
         //this script to calculate z = x + y and update <field name="z" />  
     }
</script>                                              
<input type="button" value="Display Writer" onClick="findWriter()"/> 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 12/4/14, 7:22 AM
Seen: 1517 times
Last updated: 3/16/15, 8:10 AM