cancel
Showing results for 
Search instead for 
Did you mean: 

send submit when iview is loaded

Former Member
0 Kudos
64

Hi.

I made a iview that is redirected other page using property action value.

So, I made a this code.

I want to send a submit when iview is loaded and move to myBean.getAction() URL.

When I tested it, It show blank screen.

Where is my problem ?

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

<jsp:useBean id="myBean" scope="session" class="com.CallOfficeURLBean" />

<html>

<body onload="go();">

<FORM METHOD="post" name="mainFrm" ACTION="<%= myBean.getAction() %>">

<INPUT TYPE=hidden NAME="%%ModDate" VALUE="0000242500000000">

<INPUT NAME="RedirectTo" VALUE="<%= myBean.getRedirectTo() %>" type=hidden>

<INPUT NAME="username" VALUE="<%= myBean.getUsername() %>" type=hidden>

<INPUT NAME="password" VALUE="<%= myBean.getPassword() %>" type=hidden>

</FORM>

</body>

</html>

<script language="javascript">

function go(){

mainFrm.submit();

}

</script>

Regards, Arnold.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try this...

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

<jsp:useBean id="myBean" scope="session" class="com.CallOfficeURLBean" />

<html>

<head>

<script language="javascript">

function go(){

document.mainFrm.action = '<%=myBean.getAction() %>';

mainFrm.submit();

}

</script>

</head>

<body onload="go();">

<FORM METHOD="post" name="mainFrm">

<INPUT TYPE=hidden NAME="%%ModDate" VALUE="0000242500000000">

<INPUT NAME="RedirectTo" VALUE="<%= myBean.getRedirectTo() %>" type=hidden>

<INPUT NAME="username" VALUE="<%= myBean.getUsername() %>" type=hidden>

<INPUT NAME="password" VALUE="<%= myBean.getPassword() %>" type=hidden>

</FORM>

</body>

</html>

Hope this helps, points are appreciated