Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving HTML values in offline mode

Status
Not open for further replies.

aadejumo

Programmer
Joined
May 16, 2005
Messages
2
Location
GB
Hi All,
I have a jsp page that works fine on Windows CE 4.0 with Xda II. However, I am trying to get dynamic questions to work on the page which requires me to use the innerHTML property. The business scenario is within a Field Service Mgmt sytem wherby calls can be progressed from one status to another; and this can be done offline before a "sync" (Synchronization to the server)is performed.

Sample Scenario:
A CALL can be progressed from DISPATCHED status -ACKNOWLEDGED - ONSITE - COMPLETE status; with a submit button.

Problem:
Free text values entered in...say ACKNOWLEDGED status are not seen in the next Status when the page reloads while in the offline status.

Code Segment:
<head>
<script>
function displayStatement()
{
var s1 = '<font color="black"> <u> <b> STATEMENT </b>
</u> </font><br>' ;
s1 = s1 + '<textarea rows="2" wrap="physical"
name="FIELD_subjectStatement" cols="50">
<%=actionSubjectStatement%>
</textarea>';
---
---
---

document.eventsForm.StatementDisplay.innerHTML = '';
---
---
---
}
</script>
</head>
<body onload="onLoad="displayStatement();">
---
---

<form action="<%=MobileSerializeServlet.encodeRedirectUrl(request,response,"/servlet/RequestHandler")%>" method="GET" name="eventsForm">
---
---
<tr>
<td class="TextField">
<span id="StatementDisplay">
&nbsp;
</span>
</td>
</tr>

---
---
---
//end of Code Segment

The innerHTML allows the dynamic tags/rows to be displayed but the resulting page. I've tried using STYLE (with display:attribute) object but it's not working. Only innerHTML works on my moobile device but then i am stuck with this non-retrieval of free-text values entered in the previous state.

Can anyone help me on this, please.

Cheers.
aadejumo
 
The innerHTML allows the dynamic tags/rows to be displayed but the resulting page.

Can you clarify what you mean here? "But the resulting page" what?

I've tried using STYLE (with display:attribute) object but it's not working.

What is it not doing? Showing? Hiding? Something else?

Can you clarify what it is you are actually wanting to do, and what your code currently does not do as you expect?

Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Thanks Dan,
The code dynamically constructs the textarea field when the page is loaded using the displayStatement()
function. This is needed because i want to display the textarea based on the status of my CALL. For instance, i want the textarea field to show when the CALL is in ACKNOWLEDGED status, but not in DISPATCHED status.

The displayStatement() uses the statement: document.eventsForm.StatementDisplay.innerHTML = 's1';

THE PROBLEM:
However, when i enter a free-text into the textarea and i progress the Call with a Submit button...the page is reloaded and the status is changed. This is all done in an offline state on the mobile device but i cannot see my previously entered free-texts. But when i remove the innerHTML functionality and construct the textarea explicitly in the body of the page, i do see my previously entered free-texts.

How can i make the previously entered texts to show when the page reloads offline?


Thanks.
aadejumo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top