Author Topic: Is there a way in HTML to reset the page without the submit info just submitted?  (Read 8736 times)

Offline thamanjd

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
This isn't really a problem. It's just cosmetic. I have a page with a couple of submit buttons. All the submits operate correctly and refreshthe page. The refreshed page shows that the changes made by the submit button have been effective.

However after the refresh caused by the submit button, the submit info still exists in the browsers url edit box. Is there a way to make the submit buttons refresh the page without the submit info there.

If i can do that it would mean the user could just press the browsers refresh button whenever to refresh data showing on the page. If the submit suffix was still attached to the url it runs that submit again.


By the way ive been running that snippet of modification that changed padding inside of html edit boxes that have had an InsertString applied to them. I haven't seen any problems with it yet.

Thanks again
JD

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Hi John

I know this problem and don't know of a method to cure it directly in the URL.

However it has been worked around by using a meta refresh as follows.
1. The submit is made and the page displays (the ULR still contains the command).
2. In the head of the HTML file the following is included:
<html><head>£vR0<meta http-equiv="content-type"content="text/html;charset=UTF-8">
3. In fnInsertString() the escape sequence £vR0 is filled out with "<meta http-equiv=""refresh"" content=""1;URL=BI_O.htm"">";
where the web page is defined as BI_O.htm (the name of the side).
4. This causes the side to be automatically refreshed after 1s (longer delays can also be set). On the second refresh, the escape sequence can be ignored so that it doesn't get refreshed for ever.

This refresh using the page name leaves the URL without any additional command information.

This may not be the best example since it was taken from a project where a side is refreshed automatically (in fact the refresh rate could be set as a paremeter since it is inserted by the application). There is also a meta tab to cause a jump to another side after a delay, which would probably be better suited (jumping to the same page of course) since there is no more requirement for ensuring it only takes place once.

Another method is of course to include a refresh button on the web page rather than the user having to Browser's refresh button (it is also possible to remove the frame around the Browser window so that the user is forced to use this).

Regards

Mark

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Hi John

In the mean time there is a new topic from Thomas, where a plain text post is being discussed. This is in fact a useful method of transferring parameters by posting them, which also means that they are not displayed in the URL. See
http://www.utasker.com/forum/index.php?topic=100.0

We have managed to add this support in the development version. Although it presently has a limitiation which requires that the parameters are passed in one single TCP frame - when using a small TCP buffer (say 512 bytes which is often used by the NE64) this would limit the maximum invformation to a couple of hundred bytes -  is a possible solution in many cases.

If you would like to try this out please send me an email and I can give you the appropriate changes to http.c.

Regards

Mark