cancel
Showing results for 
Search instead for 
Did you mean: 

Client side eventing with HTMLB in a jsp file

Former Member
0 Kudos

Hi All,

Can u give me the solution to work with client side eventing with HTMLB with a jsp page but not with a dynpage.

Regards,

sireesha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi sireesha,

Check this.

<%@ taglib uri="tagLib" prefix="hbj" %>

<%@ page import="com.sapportals.htmlb.enum.EventTrigger,com.sapportals.htmlb.event.Event" %>

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<script language="Javascript">

function checkinput(){

var funcName = htmlb_formid+"_getHtmlbElementId";

func = window[funcName];

var inputfield1 = eval(func("inf1"));

var input1 = inputfield1.getValue();

if (input1==""){

alert("Enter mandatory fields");

}

}

</script>

<hbj:form>

<hbj:textView id="tv1" text="Name"/>

<hbj:inputField id="inf1"

type="String"

required="true"

jsObjectNeeded="true">

<% inf1.setClientEvent(EventTrigger.ON_BLUR, "checkinput()"); %>

</hbj:inputField>

<br>

<hbj:textView id="tv2" text="City"/>

<hbj:inputField id="inf2" type="String"/>

<hbj:button id="b1" text ="submit" onClick="onSubmitclicked"/>

</hbj:form>

</hbj:page>

</hbj:content>

Regards,

Harini S

Answers (0)