SAP CRM uses JavaScript to trigger SAP Server Event

Source: Internet
Author: User
Tags setinterval

650) this.width=650; "Src=" http://images2015.cnblogs.com/blog/994049/201610/994049-20161019165217029-463210813. JPG "alt=" tag "style=" border:0px;line-height:1.5; "/>

In order to trigger the server event in BSP using JavaScript, you need to use the <bsp:event> tag in the. htm file to generate a JavaScript method. If necessary, two parameters can be passed through the label:

<bsp:htmlbevent name = "Fireserverevent" Id = "fireserverevent" P1 = "P1" P2 = "P2"/>

Next, create a method like this:

<script language= "JavaScript" > fireserverevent (p1 = "First_parameter" P2 = "Second_parameter ");</script>

You need to create an event handler with Serveevent ( case sensitive ) to handle events. Next, access the data inside the event handler like this:

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

Data:lr_event type REF to Cl_bsl_htmlb_event, Lt_event_items type TIHYYPNVP, Ls_event_items type IHTTPNVP .       IF HTMLB_EVENT_EX is BOUND.       Lr_event? = htmlb_event_ex. IF lr_event->name = ' fireserverevent '. * Your code here* access the parameters as Lr_event->p1 and Lr_even T->P2 Endifendif

650) this.width=650; "src="/img/fz.gif "alt=" Copy Code "style=" border:0px; "/>

You can use the following code in an. htm file to periodically trigger a server event, that is, by using the SetInterval () method in JavaScript. In this example, it is triggered every 10 seconds.

<bsp:htmlbevent name = "Fireserverevent" id = "Fireserverevent"/><script language= "JavaScript" &    Gt var ointerval = setinterval ("Fireserverevent ()", 10000);</script>

  


SAP CRM uses JavaScript to trigger SAP Server Event

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.