Ticket #626 (closed New feature: duplicate)
Provide a function to safely submit logs from within Javascript functions
| Reported by: | robe | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Core | Keywords: | |
| Cc: | Sensitive: |
Description
Please provide a function to safely log requests from within javascript functions which modify the DOM.
Currently, when you try to log a visit from within a Javascript function which generates HTML output, calling piwik_log results in a document.writeln which apparently clobbers "large parts" of the DOM.
We worked around this issue by using something like
var imgsrc = _pk_getUrlLog('pix/' + io.filename, 5, pkBaseURL + 'piwik.php');
box.innerHTML += '<img src="'+imgsrc+'" border="0">';
in the Javascript which we use to dynamically generate our pages, but this is Bad Practice (tm).
Change History
Note: See
TracTickets for help on using
tickets.
