problem with cache information in sun stdio creator

Hi,

i am using sun stdio creator and i designed a page

<script>

function forward(){

alert("forward");

history.go(+1);

}

function back(){

alert("back");

history.go(-1);

}

</script>

<sun stdio code >

<ui:button name="farword"onclick=" forward(); " />

<ui:button name="back"onclick=" back(); " />

</sun stdio code>

problem is alert are comming and page is not caching the previous infomation.

how to work withhistory object in sun stdio creator.

with regards

ss

[897 byte] By [shannua] at [2007-11-26 20:22:29]
# 1

Hi,

I'd recommend you not to use your own defined javascript-functions "forward()" and "back()".

You should insert the appropriate javascript-code inside of a tag <ui:button ... /> in Page1.jsp:

<ui:button

binding="#{Page1.btnBack}"

id="btnBack"

onClick="{alert(&quot;back&quot;); window.history.go(-1); return false;}"

style="left: 71px; top: 168px; position: absolute"

text="Back"/>

<ui:button

binding="#{Page1.btnForward}"

id="btnForward"

onClick="{alert(&quot;forward&quot;); window.history.go(+1); return false;}"

style="position: absolute; left: 72px; top: 96px"

text="Forward"/>

I used Sun Java Studio Creator 2.1: created a new project, put 2 buttons "Forward" and "Back" on project's Design View, modified their property "onClick" in the window "Properties".

This approach definitely works with web-browsers Internet Explorer and Mozilla FireFox.

alexey.petrova at 2007-7-10 0:48:12 > top of Java-index,Development Tools,Java Tools...