logo

New Response

« Return to the main article

You are replying to:

  1. Hello,

    Just to share with you a technic (maybe you know it) in order to open the view you just come from when you save a document on the Web.

    If you have expanded one category of a view to find and open document, and then save the document with a "[fileSave], [FileClose]", you will return to the view, but all the categories will be collapsed or expanded (depends of the properties of the view). So you have lost your document (if you have done 15 "Next page" to found if, you are also very angry! :-)

    What I do is that :

    In my form $$ViewTemplateDefault, I have on the onUnload event a JavaScript code who writes in a cookie the url of the current location (which is obviously the url of a view command).

    In all my forms, in the onLoad event, I have a JavaScript code who write the value of the cookie in a hidden field of the form.

    Finaly in the $$Return of my forms I have this code "[" + FieldWhoNowContainsValueOfCookie + "]".

    If the document is in read mode you can put a JavaScript code like this :

    location.href = functionThatGetCookieWhoContainsUrlOfTheViewYouComeFrom()

    in a "close" button.

    This is usefull when you can't use "history.back()" because the document contains sections or is refreshed/reloaded a number of time you can't estimated.

    This is not my computer so I can't do "copy paste" of my code, sorry.

    Congratulations for your scores at JavaScript exam !

    Mine was 92% (I am also CLPP dev).

    CodeStore.net is very cool !

    Bye,

    Fabrice

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: