cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop back button navitation of browser from jspDyn page

Former Member
0 Kudos

Hi

Can any one give me suggestion that how to stop back button navigation from jspDyn page.

My criteria is once the order is complete ie. after reaching to the last page then if user tries to navigate to back screen using browser back button , we should not allow him.

I have use this statement in html:

<script language="javascript">

window.history.forward(1);

</script>

this is working fine , but if i keep the same in jspDyn page it is not working.

Please suggest me how to solve this issue.

This is quiet urgent issue, early suggestion/answer will be highly appreciated.

Regards,

Joseph

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try like this in your jsp page.

<html>

<script>window.history.forward(1)</script>

</html>

Hope it helps.

Regards,

M.Subathra

Message was edited by: Subathra M

Former Member
0 Kudos

Hi Subrata I have tried out like that earlier but no use. Not working out.

Regards,

Joseph

Former Member
0 Kudos

Hi Joseph,

Getting the window in htmlb is not same as normal html. Get the htmlb window something like this. Not sure if it will work but give a try.

<script>

var funcName = htmlb_formid+"_getHtmlbElementId";

func = window[funcName];

func.history.forward(1);

</script>

Regards,

Harini S

Former Member
0 Kudos

Hi Harini,

I have tried out like that also. It is same as usual.

This is the page i created.

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

<hbj:content id="myContext" >

<hbj:page title="PageTitle">

<script>

var funcName = htmlb_formid+"_getHtmlbElementId";

func = window[funcName];

func.history.forward(1);

</script>

<hbj:form id="myFormId" >

<h1>Request Submitted</h1>

</hbj:form>

</hbj:page>

</hbj:content>

Pls do let me know any other options

Regards,

Joseph

Former Member
0 Kudos

Hi SDN

I have the same problem.

I would like to avoid them using button BACK in IE

Did you find a solution?

Thanks in advance

Peter

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

When using javascript in your JSPDynPage, for it to reflect you must include the following line:

<hbj:form id="myFormId" encodingType="multipart/form-data">

rather than a simple

<hbj:form id="myFormId" >

Try this, it should work, cause it has worked for me.

Regards,

Sujana