After releasing an input report made in RAQ Report to web page, it will generate an submitting button on the toolbar automatically. Then, if users click this button, it will submit data directly without prompt.
However, some web report users may wish that a prompt box will appear after clicking the submitting button, and users can decide whether to submit data by clicking Ok or Cancel. With this prompt box, users can avoid incorrect manipulations.
Next, we will learn how to make a prompt box for data submitting in input report.
According to the general idea, the operations are as follows.
function firm()//The name of the submitted function.
if(confirm(”Save?”))//Use the return value of the prompt box（true or false）
//If it is true, call _submitTable( report1 ) to submit data.
_submitTable( report1 );
alert(”You click cancel, and it will return to the web page.”);
With this easy piece of codes, we realize the prompt box. Next, we only need to modify the button to call this piece of codes. If we need other prompt boxes, the operations are all the same.
Step 2: Set the codes of submitting button as shown below:
Find the codes of submitting button in toolbar.jsp.
Then, after modifying the JSP file, the input report with prompt box for submitting data is shown below:
With this method, we can use prompt box for data submitting in input report. This will make web report users convenient to submit data to database, and avoid error operation.