Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

JS Interface on HTML5

I. Mobile H5 supports calling JS

  Web eventPagination Preview  
  Load start event    √ 
  Load end event    √


Widget event  Parameter widgetDashboard widget
  After initialization  √  √
  Before editing

  After editing  √
  End of edit  √
  Click on  √  √
  Value change

  Node generation

  State change  √  √
  After uploading

Note 1: The widget of the dashboard refers to the widget in the body of the dashboard, excluding the widget in the parameter panel of the dashboard.

Note 2: The mobile terminal only supports the initialization of the parameter interface widget , but does not support the initialization of the parameter panel

Note 3: The component does not support click events.

II. Object

Function nameOverviewScope of useExample
contentPaneThe container for storing the content of the CPT report, that is, the entire CPT report object

1) Only available in CPT, not available in FRM  

2) Web events, cell hyperlink JS, cell widget events in the report, CPT parameter interface widget events, you can get the object directly through contentPane

Get the CPT reporting cell widget: 

contentPane.getWidgetByCell("cell")      


_g()

1) In CPT, _g() is the entire report objectcontentPane,supportcontentPaneAll supported methods under

2) In FRM, _g() is the entire form objectglobalForm,supportglobalFormAll supported methods under

1) The parameter interface widget event in CPT/FRM can pass_g().parameterCommit()Realize automatic query

2) In the cell widget event reported in the CPT, you can pass_g().verifyAndWriteReport()And other reporting methods to achieve submission and storage

3) The report block and icon block events in FRM can pass_g().options.formGet the object in the body of the form

4) Get the FRM main widget :

_g().options.form.getWidgetByName("name")

parameterEl

Get the parameter panel widget :

parameterEl.getWidgetByName("name")

The parameter interface in CPT and FRM are bothparameterEl:

1) Passed in CPTcontentPane.parameterElTo get the parameter interface, it is mainly used in the loading start and end events of Web events in CPT, and in CPT cell JS

2) Passed in FRM_g().parameterElTo get the parameter interface, it is mainly used in the body initialization event of FRM, the widget in the FRM body, the report block cell/chart JS of the FRM body, and the chart block JS

Get the value of the parameter interface widget in the CPT loading end event:

var a = contentPane.parameterEl.
getWidgetByName("aa").getValue();        
FR.Msg.alert("Tips",a)  


thisIn the event of the widget, you can passthisGet the current widget object directlywidget  refers to the widgetin the reporting cell, the widget in the parameter interface, and the widget in the body of the form

Get the value of the widget in the edit end event of the CPT parameter interface file widget: 

var a = this.getValue();      
FR.Msg.alert("Tips",a)


form1) FORM is a form object

2) The parameter interfaces in CPT and FRM are both forms, and the main body of FRM is also a form

2) For each widgetoptionsThere is the current form object FORM

Therefore, in the event of the parameter interface or the widget of the form body, passthis.options.formTo getcurrentForm object

Get the CPT/FRM parameter panel widget, get the FRM main widget:

this.options.form.getWidgetByName("name")  


III. Attributes

Function nameOverviewExample
reportTotalPage

1)contentPaneThe properties under the report object, the total number of pages of the current report 

2) OnlyPaginationWhen the attribute will have a value, passcontentPane.reportTotalPageTo make a call

Note: This function cannot be used in forms, parameter interfaces, and web events

Get the total number of pages of the current report in the CPT cell hyperlink JS:

FR.Msg.alert("Tips",contentPane.reportTotalPage());


IV. Query operation

Function nameOverviewExample
parameterCommit() 

1) Query operation, whether it is CPT or FRM, there will be a built-in query button on the parameter interface, and the user can trigger the query operation through JS instead of the built-in query 

2) Pass contentPane.parameterCommit()  or_g().parameterCommit()Triggered in two ways, only through _g().parameterCommit() Way to trigger

1) The custom button in the CPT parameter interface first verifies the widget, and then triggers the query according to the conditions:

var a = this.options.form.getWidgetByName("a").getValue();
var b = this.options.form.getWidgetByName("b").getValue();
if (a > b) {
    FR.Msg.alert("Warning","The start month cannot be

greater thanthe end month!")

else {
    contentPane.parameterCommit();
    // or _g().parameterCommit();

2) The query is triggered in the click event of the custom button in the FRM parameter interface:

_g().parameterCommit();    

V. Page turning operation

Function nameOverviewExample
gotoFirstPage()1)contentPaneA method under the report object, used to jump to the first page of the report

 2) OnlyPaginationThis method will be useful only whencontentPane.gotoFirstPage()To make a call

Note: This function cannot be used in forms, parameter interfaces, and web events

Jump to the first page in the CPT cell hyperlink JS:

contentPane.gotoFirstPage();


gotoLastPage()1)contentPaneA method under the report object to jump to the last page of the report

 2) This method is only useful when paging, throughcontentPane.gotoLastPage()To make a call

Note: This function cannot be used in forms, parameter interfaces, and web events

Jump to the last page of the report in the CPT cell hyperlink JS:

contentPane.gotoLastPage();  


gotoPreviousPage()1)contentPaneA method under the report object to jump to the previous page of the current page

 2) OnlyPaginationThis method will be useful only whencontentPane.gotoPreviousPage()To make a call

3) If the current page is the first page, there should be no response to the trigger event, and the page number should not be less than or equal to 0.

Note: This function cannot be used in forms, parameter interfaces, and web events

Jump to the previous page of the current page in the CPT cell hyperlink JS:

contentPane.gotoPreviousPage();


gotoNextPage()1)contentPaneA method under the report object to jump to the next page of the current page

 onlyPaginationThis method will be useful only whencontentPane.gotoNextPage()To make a call

2) If the current page is the last page, there should be no response to the trigger event, and there should be no page number greater than the total number of pages.

Note: This function cannot be used in forms, parameter interfaces, and web events

Jump to the previous page of the current page in the CPT cell hyperlink JS:

contentPane.gotoNextPage();  


VI. Widget operation

Function nameOverviewExample
getValue()

1) The value method of the widget

2) Obtain the widget, for example, the obtained widgetvariable isWidget, Then you can passWidget.getValue()To get the value of the widget

3) If the widgetis a drop-down box, etc., there is a distinction between the displayed value and the actual value,getValue()Take isActual value


1) Get the value of the current drop-down box and the values of other widget in the edit end event of the drop-down box of the CPT parameter interface:

var comboBox = this.getValue();
var textEditor = this.options.form.getWidgetByName
("textEditor").getValue();
FR.Msg.alert("Tips",comboBox + " - "
+ textEditor)

2) CPT fills in the edit end event of the drop-down box of the cell to obtain the value of the current drop-down box and the values of other widget:

var comboBox = this.getValue();
var textEditor = contentPane.getWidgetByName
("textEditor").getValue();
FR.Msg.alert("Tips",comboBox + " - " 
+ textEditor)
setValue(value)1) Assignment method of widget

2) Obtain the widget, for example, the obtained widgetvariable isWidget, Then you can passWidget.setValue(value)To set the value of the widget.

3) If the widget is a drop-down box, etc., there is a distinction between the displayed value and the actual value,setValue()Set isActual value

4) The parameter description is as follows:

Parameters: value

Parameter type: Object

Parameter description: value

Assign values to other widget in the CPT parameter interface button click event:

this.options.form.getWidgetByName("textEditor")
.setValue("Haha")


getText()1) Take the display value of the widget

2) Obtain the widget, for example, the obtained widget variable isWidget,able to passWidget.getText()To get the display value of the widget

3) Only the five widgetof drop-down box, drop-down check box, drop-down tree, radio button group, and check box group have display values and actual values. These widget are usedgetValue()What is obtained is the actual value,getText()What you get is the display value

4) If the widget is a drop-down box, etc., there is a distinction between the displayed value and the actual value,getValue()andgetText()Take the actual value

Get the actual value and display value of the current drop-down box from the edit end event of the drop-down box in the CPT parameter interface:

var shijizhi = this.getValue();
var xianshizhi = this.getText();
FR.Msg.alert("Tips","actual value" + shijizhi
" ;
dispaly value"
 + xianshizhi)


reset()1) Clear the data of the widget

2) Obtain the widget , for example, the obtained widget variable isWidget, Then you can passWidget.reset()To clear the data of the widget

After clicking the button on the CPT parameter interface, the other widget on the parameter interface will be uniformly reset:

this.options.form.getWidgetByName("a").reset();
this.options.form.getWidgetByName("b").reset()


isVisible()1) Determine whether the widget is visible

2) Obtain the widget, for example, the obtained widget variable isWidget, Then you can passisVisible()To determine whether the widget is visible. Return if visibletrue, Return if not visiblefalse

Judge whether the widget is visible after clicking the button on the CPT parameter interface:

var a = this.options.form.
getWidgetByName("a").isVisible();
var b = this.options.form.
getWidgetByName("b").isVisible();
FR.Msg.alert("Tips",a + " - " + b)


setEnable(enable)

Note 1: The use of reporting cells is not supported

Note 2: It is not supported to widget the properties in the cell through the parameter panel

1) Set whether the widget is available

2) Obtain the widget, for example, the obtained widget variable isWidget, Then you can passWidgeti.setEnable(enable)To set whether the widgetis available

3) The parameter description is as follows:

Parameters: enable

Parameter type: Boolean

Parameter description: if the parameter is true, it is available, false is not available

In the edit end event of the CPT parameter interface drop-down widget a, whether widget b is available, when a is selectedJiangsuWhen the widget b is available; when the value of aShanghaiWhen, widget b is unavailable:

var a = this.getValue();
var b = this.options.form.
getWidgetByName("b");
if(a == "Jiangsu"){
    b.setEnable(true);
}else if (a == "Shanghai"){
    b.setEnable(false);
}
isEnabled()1) Determine whether the widgetis available

2) Get the widget, for example, the widget variable we get isWidget, Then you can passisEnabled()To determine whether the widget is available

3) True if available, false if not available

Judge whether the widget is visible after clicking the button on the CPT parameter interface:

var a = this.options.form.getWidgetByName("a")
.isEnabled();
var b = this.options.form.getWidgetByName("b")
.isEnabled();
FR.Msg.alert("Tips",a + " - " + b)
fireEvent(eventName)1) Trigger the widget event with the specified name

2) Obtain the widget , for example, the obtained widget variable isWidget, Then you can passfireEvent(eventName)To trigger events of the widget

3) The parameter description is as follows:

Parameters: eventName

Parameter type: String

Parameter description: the name of the event to be triggered

The click event that triggers the built-in query button in the edit end event of the CPT parameter interface drop-down box:

this.options.form.getWidgetByName("formSubmit0")
.fireEvent("click")


contentPane.getWidgetByCell("cell")Get the widget according to the location of the cell where the widget is located

The parameter is the cell name


VII. Hyperlink

1. FR.doHyperlinkByGet function

Function nameOverviewExample
FR.doHyperlinkByGet

Hyperlink, tool methods under FR can be passedFR.doHyperlinkByGet(url,config,target,feature)Call it anywhere you can write JS

Click on the hyperlink of the CPT cell to open the sub-template and pass the parameters:

var url = "/WebReport/ReportServer?reportlet=
WorkBook2.cpt"
;
var a = "123";
FR.doHyperlinkByGet(url,{a:a, b:"456"}, 
"_self")

FR.doHyperlinkByGet The parameter description is shown in the following table:

parametertypeinstruction
urlObject

Required, url or Json hyperlink definition, url support

Absolute path such ashttp://192.168.100.1:8080/WebReport/ReportServer?reportlet=WorkBook2.cpt

Relative path such as/WebReport/ReportServer?reportlet=WorkBook2.cpt Or  ReportServer?reportlet=WorkBook2.cpt 

configObjectOptional, passed parameters
targetObjectOptional, the opening position of the hyperlink page
featureObjectOptional, the attribute of the opening position of the hyperlink, this attributeMobile terminal is invalid


2. FR.doHyperlinkByPost function

Function nameOverviewExample
FR.doHyperlinkByPostHyperlinks, tool methods under FR, can be passedFR.doHyperlinkByPost(url,config,target,feature)Call it anywhere you can write JS

Click on the hyperlink of the CPT cell to open the sub-template and pass the parameters: 

var url = "/WebReport/ReportServer?reportlet=WorkBook2.cpt";
var a = "123";
FR.doHyperlinkByPost(url,{a:a, b:"456"},"_self")


FR.doHyperlinkByPost The parameter description is shown in the following table:

parametertypeinstruction
urlObjectRequired, URL or Json hyperlink definition

The absolute path is like:http://192.168.100.1:8080/WebReport/ReportServer?reportlet=WorkBook2.cpt

Relative paths such as: /WebReport/ReportServer?reportlet=WorkBook2.cptOr  ReportServer?reportlet=WorkBook2.cpt 

configObjectOptional, passed parameters
targetObjectOptional, the opening position of the hyperlink page
featureObjectOptional, the attribute of the opening position of the hyperlink, this attributeMobile terminal is invalid

VIII. Platform Operation

Function nameOverviewExample
FS.tabPane.closeActiveTab1) Close the current Tab option page

2) Can passwindow.parent.FS.tabPane.closeActiveTab()Call in any place where JS can be used in the report

Note: It cannot be called in the parameter interface

Close the current Tab tab page in CPT cell hyperlink JS:

window.parent.FS.tabPane.closeActiveTab();


FR.logoutApp1) Logout, the method under the FR tool category

2) Can passFR.logoutApp()Call it anywhere you can write JS

Note: It cannot be called in the parameter interface

Log out in CPT cell hyperlink JS:

FR.logoutApp();


FS.tabPane.addItem1) Add items to the Tab column of the decision-making platform

2) Can passwindow.parent.FS.tabPane.addItem(entry)Call in any place where JS can be used in the report

In the CPT cell hyperlink JS, open the sub-report of the hyperlink in the new Tab of the decision-making platform:

window.parent.FS.tabPane.addItem({title:"Subreport",
src:"/WebReport/ReportServer?reportlet=template1.
cpt"
})

Note: "title" is only supported in the App, not in the browser.

Note: FR.logoutApp will be invalid in the report parsed by H5 in the App, and will not return to the login interface of the App; when used in H5, such as WeChat, logout can be triggered.

FS.tabPane.addItem The parameter description of the function is shown in the following table:

ParameterTypeInstruction
entryObjectRequired, entry object corresponding to Tab item

Entry withJsonThe format is provided, and the attributes are shown in the following table:

AttributesTypeInstruction
titleString, numberThe title of the tab page, string and number are all available
srcStringThe address to which the content of the tab page points

IX. Tab component operation

getShowIndexpass throughgetShowIndexGet the Tab number currently displayed by the Tab componentRefer toshowCardByIndex Function example
setTabVisible

1) PasssetTabVisible(tabName String, isVisible Boolean)Can hide part of Tab title

2)Parameter 1The instructions are as follows:

Parameter 1: tabName

Parameter 1 type: String

Description of Parameter 1: Required, Tab widget name, such as Tab0

3)Parameter 2The description is shown in the figure below: Parameter 2: isVisible

Parameter 2 type: Boolean

Description of parameter 2: Required, whether the tab is visible,turevisible/falsehide

Note: Cannot be used in the initialization event and parameter interface of tablayout

Different users can see different Tabs:

var user = this.options.form.getWidgetByName("user")
.getValue();
if(user=='a'){
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab0"true);
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab1"true);
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab2"true);
}else{
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab0"false);
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab1"true);
    this.options.form.getWidgetByName("tabpane0")
    .setTabVisible("Tab2"false);
}
Show code
showCardByIndex

showCardByIndex(Number:cardID);

Effect: Jump to the specified Tab block can be realized

Parameters: cardID

Description: required, the displayed Tab number, starting from 0


showCardByIndex(Number: cardID, Boolean: animated);

Effect: Added an animated parameter to widget whether there is an animation effect on the switching Tab page,

          Only takes effect when the style of the mobile terminal title bar allows horizontal scrolling

Parameters: animated

Description: Optional, animated is 1 to turn on the animation, 0 to turn off the animation


Add a post-initialization event to the body to realize automatic loop jump Tab within a fixed time interval:

setInterval(function(){   
    var aa=_g().getWidgetByName("tabpane0")
    .getShowIndex(); 
    if(aa==2){ 
      _g().getWidgetByName('tabpane0')
      .showCardByIndex(0); 
    }
    else { 
      _g().getWidgetByName('tabpane0')
      .showCardByIndex(aa+1); 
    } 
},2000)

Note: For specific examples, please refer to 

JS Click on Hyperlink to Switch TAB Page




X. JSON Object Operations

OverviewExample

Some requests or methods return JSON data,

able to passjson.nameTo get the value of the name attribute

Pass in cell JSFR.Mobile.getDeviceInfoObtain device information, and take out the Model device model in it:

var a = FR.Mobile.getDeviceInfo();
FR.Msg.alert(a.Model)

XI. Other operations

Function nameOverviewExample
FR.cjkEncode1) Perform special encoding conversion on Chinese, Japanese and Korean, and return the converted string to passFR.cjkEncode(Object text)Call, generally cooperate with Hyperlink JS to transcode Chinese characters in Hyperlink to prevent garbled characters

2) The parameter description is as follows:

Parameters: text

Parameter type : Object

Parameter description : required, string to be encoded

Hyperlink to Chinese name template in CPT cell Hyperlink JS:

var url = FR.cjkEncode("/WebReport/ReportServer
?reportlet=template 1.cpt"
);
var a = "123";
FR.doHyperlinkByGet(url, {a:a, b:"456"}, "_self")


FR.cjkDecode1) Convert the string processed by cjkEncode into the original string and passFR.cjkDecode(Object text)Make a call

2) The parameter description is as follows:

Parameters: text

Parameter type: Object

Parameter description: required, the string to be decoded

Use it first in CPT cell hyperlink JSFR.cjkEncodeEncode Chinese, and then useFR.cjkDecodeTo decode:

var a = "Haha";
var b = FR.cjkEncode(a);
var c = FR.cjkDecode(b);
FR.Msg.alert("Tips",b + ":" + c)


FR.ajax1) PackagedjQuery.ajax()Function, the data parameter has been encoded in Chinese, Japanese and Korean, which can be passedFR.ajax(options)Call it wherever JS can be used

2) Refer to chapter 12.1 for parameter description

Send an ajax request in the cell hyperlink JS of CPT, and handle different situations in different callback functions:

var username = "1";
var password = "1";
FR.ajax({   
   url:"http://env.finedevelop.com:59204/Test
/ReportServer?op=fs_load&cmd=sso"
,
   data:{
        fr_username:username,
        fr_password:password
   },
   dataType:"jsonp",   
   timeout:5000,
   //success:function(data){
        //FR.Msg.alert("success",data.status);
   //},   
   //error:function(errorThrown){   
        //FR.Msg.alert("error",errorThrown);
   //},
   complete: function(res,textStatus)
        FR.Msg.alert("complete",textStatus); 
   }  
})

setInterval1)setInterval() The method can call the function or calculate the expression according to the specified period (in milliseconds)

2)setInterval() The method will keep calling the function until clearInterval()Is called or the window is closed. Depend onsetInterval()The ID value returned can be used asclearInterval()Method parameters

3) PasssetInterval(code,millisec)Make a call

4) For parameter description, please refer to chapter 12.2 of this article

Define the report refresh every 3s in the report loading end time:

setInterval("self.location.reload();",3000);  


setTimeout

1) Used to call a function or calculation expression after the specified number of milliseconds.

pass throughsetTimeout(code,millisec)Make a call

2) For parameter description, please refer to chapter 12.3 of this article

Note: The JS code issetTimeout(function(){})When formatting, "this" needs to be used outside the declaration

1) A prompt will pop up 3s after the report loading end time:

setTimeout("FR.Msg.alert('Tips','I am delay tips')",
3000);

2) A prompt will pop up 3s after the report loading end time:

setTimeout(function({
    FR.Msg.alert('Tips','I am delay
tips'
);
}, 3000)


location.reload1) Refresh the current page, which has the same effect as manual refresh

2) If the report has multiple pages, it will return to the first page after refreshing; if the report has a parameter interface, the result of the last parameter condition query will be displayed directly after refreshing

Write refresh JS in the report success event to refresh the current page after the report is successful:

location.reload();



window.closeClose the current window

Write JS in the report success event, and close the template after the report is successful and return to the directory:

window.close();


FR.remoteEvaluateAsync

Return the result of formula calculation

Note 1: App support after version 10.4.46

Note 2: To use this interface, you need to close the script call formula limit

2 parameters, respectively representing:

1) formula: required, specific formula

2) callback: required, the specific callback method, you can get the value calculated by the formula

FR.location

1) Usage scenario

FR.location is used to realize the positioning function and obtain the latitude and longitude, which can be used in https, enterprise WeChat, and Dingding

2) Function usage

FR.location(function(status, message){...})

3) Matters needing attention

If you want to use it in corporate WeChat and Dingding, you need to update the HTML5 mobile display plug-in and WeChat or Dingding management plug-in to version 10.4.975

Get the current latitude and longitude in cell JS:

FR.location(function(status, message)
if(status=="success") { 
    FR.Msg.alert("Current location is: " 
    + message);   
else { 
    FR.Msg.alert(message); 

})
FR.cellStr2ColumnRow("cell")

Can convert cells to row and column numbers

Know the specific cell and be able to locate the row and column number of the cell

FR.cellStr2ColumnRow('B1') 

The return value is {"col":1,"row":0}

1. FR.ajax parameter description

FR.ajax The parameter description of the function is shown in the following table:

ParameterTypeInstruction
optionsObjectRequired, ajax parameter

[Options] withJsonThe format is provided, and the attributes are shown in the following table:

AttributesTypeInstruction
urlStringRequired, the address to send the request
dataObjectThe data sent to the server. The GET request will be automatically converted to the request string format and appended to the URL

Value must beKey/ValueThe format can be a string such asp1=pavalue&p2=p2value, Or an object such as{p1:p1value,p2:p2value}

typeStringRequest method POST/GET, the default isGET
dataTypeString

The type of data that the server is expected to return. If it is not specified, it will be automatically judged intelligently based on the MIME information of the HTTP package. Available values are:

Json: Return JSON data

text: return a plain text string

jsonp: jsonp method used across domains

successFunctionThe callback function after the request is successful:
success: function(data, textStatus)
errorFunctionCall this function when the request fails:
error: function(XMLHttpRequest, textStatus, errorThrown)
completeFunctionCallback function after the request is completed (call after the request succeeds or fails):
complete: function(XMLHttpRequest, textStatus)
timeoutNumberSet the request timeout time (milliseconds)
async BooleanThe default istrue, All requests are asynchronous requests. If you need to send a synchronization request, set this option tofalse 


2. setInterval parameter description

ParameterTypeInstruction
codeObjectRequired, the function to be called or the code string to be executed
millisecNumberThe time interval between periodically executing or calling code, in milliseconds


3. SetTimeout parameter description

ParameterTypeInstruction
codeObjectRequired, the JavaScript code string to be executed after the function to be called
millisecNumberThe number of milliseconds to wait before executing the code


4. FR.remoteEvaluateAsync parameter description

parametertypeinstruction
formulaStringRequired, specific formula
callbackfunctionRequired, the specific callback method, you can get the value calculated by the formula

XII. MSG popup

Function nameOverviewExample
FR.Msg.alert1) A prompt dialog box with a pop-up message

able to passFR.Msg.alert(Object title, Object message[, Object callback])Call it anywhere you can write JS

2) For parameter description, please refer to chapter 13.1 of this article


1) After clicking the fill in cell button, a prompt pops up:

FR.Msg.alert("Tips","First Tips");

2) After clicking the fill in cell button, a prompt will pop up, and it will automatically close after 2s:

FR.Msg.alert("Tips","Second Tips",2000);

3) After clicking the fill-in cell button, a prompt pops up, and click the OK button in the prompt box to trigger a callback event and prompt:

FR.Msg.alert("Tips","Third Tips",function(value){
    FR.Msg.alert("Tips",value);
});
FR.Msg.toast1) A floating reminder pops up, disappears automatically in 5s, you can passFR.Msg.toast(Object message)Call it anywhere you can write JS

2) The parameter description is as follows:

Parameters: message

Parameter type: Object

Parameter description: the message to be displayed

A floating prompt pops up after clicking the Fill in Cell button:

FR.Msg.toast("Tips"," Suspension Tips");


FR.Msg.confirm1) The pop-up confirmation dialog box

accessibleFR.Msg.confirm(Object title, Object message[,Object callback, Object min_width ])Call it anywhere you can write JS

2) For parameter description, please refer to chapter 13.2 of this article

1) After clicking the fill in cell button, a confirmation box will pop up:

FR.Msg.confirm("Tips","First Tips");

2) After clicking the fill-in cell button, a pop-up confirmation box will pop up, and when the OK and Cancel buttons are clicked, different callback prompts will pop up:

FR.Msg.confirm("Tips","Second Tips",function(value){
    FR.Msg.alert("Tips",value);
});
FR.Msg.prompt1) The pop-up input dialog box

able to passFR.Msg.confirm(Object title, Object message, Object value, Object callback, Object min_width)Call in any place where js can be written

2) For parameter description, please refer to chapter 13.3 of this article

1) After clicking the fill in cell button, an input box will pop up:

FR.Msg.prompt("Tips","First input box");
2) After clicking the fill in cell button, an input box will pop up, and the input value will be prompted when you click OK:
FR.Msg.prompt("Tips","Second input box",
null,function(value){
    FR.Msg.alert("Tips",value);
});


1. FR.Msg.aler parameter description

FR.Msg.aler The parameter description of the function is as follows:

parametertypeinstruction
titleObjectRequired, the title of the message box
messageObjectRequired, the content of the message prompt box
callbackObjectOptional, the dialog box displays future callback functions. If the parameter is a number type, it means that the dialog box is automatically closed after the specified time (unit: milliseconds)


2. FR.Msg.confirm parameter description

FR.Msg.confirm The parameter description of the function is as follows:

parametertypeinstruction
titleObjectRequired, the title of the message box
messageObjectRequired, the content of the message prompt box
callbackObjectOptional, click to confirm the callback function
min_widthObjectOptional, confirm the minimum width of the dialog box, this attribute is invalid on the mobile terminal


3. FR.Msg.prompt parameter description

FR.Msg.prompt The parameter description of the function is as follows:

ParameterTypeInstruction
titleObjectRequired, enter the title of the dialog
messageObjectOptional, enter the message displayed in the dialog box
valueObjectOptional, enter the default value of the dialog box
callbackObjectOptional, click to confirm the callback function
min_widthObjectOptional, confirm the minimum width of the dialog box, this attribute is invalid on the mobile terminal

XIII. Matters needing attention

WeChat DingTalk provides partial support for the JS interface developed by a third party.

Attachment List


Theme: Fine Mobile
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback