AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones del navegador
  • Operating mode
  • Preventing the use of the browser's "Back" key
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Modifies the data of current entry in the navigation history. This data will be transmitted when going back to the current entry.
Ejemplo
// Passe dans le plan suivant de l'application.
CELL_Principale.Plan++
// Interdit le retour sur l'affichage du plan précédent : remplace l'entrée d'historique
// Les données transmises sont simplement le numéro du plan
BrowserHistoryModify(CELL_Principale.Plan, MyPage.Titre, "#Plan" + CELL_Principale.Plan)
Sintaxis
BrowserHistoryModify(<Data> [, <Title> [, <URL>]])
<Data>: Type of data
Status associated with the page for the current history entry.
<Title>: Optional character string
New title for the page.
Please note: this title is currently ignored by most browsers.
<URL>: Optional character string
New URL that will be displayed by the browser. This URL is used for the display in the address bar only. Therefore, there is no need to use a valid URL. However, if the user copies this URL in order to use it in another browser, the page load will fail if the URL is not valid.
Observaciones

Operating mode

The added data describes the status associated with the page for the current history entry.
If the Web user goes back to an entry in the history, the stored data will be transmitted to the "Move in the navigation history" event (optional page event). This event must process the data in order to restore the page status. This process must be associated with a procedure that expects the transmitted data as parameter:
// Evénement "Déplacement dans l'historique de navigation (onpopstate)"
PROCEDURE <NomProcédure>(<Données>)
Example: This example adds the page into the history and stores the insertion time. Going back to the previous history page displays the time.
x is Variant
x.Heure = TimeSys()
BrowserHistoryAdd(x, MyPage.Titre, "#avant") 

x.Heure = TimeSys()
BrowserHistoryAdd(x, MyPage.Titre, "#apres")
// Evénement "Déplacement dans l'historique de navigation (onpopstate)" 
PROCEDURE TraitementHistorique(stEtat)
Info(stEtat.Heure)
Note: Depending on the browser, the "Move to browsing history (onpopstate)" event is also executed when the page is loaded, and when the page is returned to its initial display.. In this case, the <Data> parameter transmitted to the event corresponds to Null.

Preventing the use of the browser's "Back" key

You can prevent the use of the browser's "Back" key. For more details, see Preventing the use of the browser's "Back" key.
Componente: WDJS.DLL
Versión mínima requerida
  • Versión 23
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local