Is there a way to see all the DOM events that fire on a page - like onClick and onBlur? I am not finding any way in Firebug to see those.
You can right-click an element in HTML tab and choose Log events option. If you do it on <body> you'll basically see all the events on the page. It will be a flood of events, but you can then turn it off, and use find bar in Firebug to filter the events that are interesting to you.
Blog article from Firebug's developer on this:
http://www.softwareishard.com/blog/firebug/firebug-tip-log-dom-events/
Related
I discovered a strange anomaly with GTM event Triggers.
I am capturing event clicks on PDF documents on my web pages and triggering an event record to my Google Analytics. The trigger is shown in the attached screen shot.
(1) when you click a PDF document on the web page (link does not contain a target="_blank" attribute in the html markup), the PDF opens in the current tab and a GA event is recorded -- "success".
(2) when you right-click a PDF document on the web page (link does not contain a target="_blank" attribute in the html markup), and open the link in a new tab or a new window, the PDF opens and a GA event is NOT recorded -- "NO success".
How can I adjust my GTM trigger to successfully capture and record event clicks opened in new tabs and new windows?
I've run into this before, and never found a solution; I think it's just the nature of the way GTM tracks people.
Every click on the web page triggers the click listener, which quickly identifies the DOM element you were clicking on, and sends a small packet of data to GTM.
However, right clicking is not the same thing, and doesn't trigger this behavior. The menu that then appears is not part of the web page, so a click on there won't be noticed by GTM.
I can think of two ways around this; the first would be to write your own click listener that listens for right clicks. Simo Ahava has some great advice about this. http://www.simoahava.com/analytics/custom-event-listeners-gtm/ The issue here is that, unlike a regular click, a right click doesn't guarantee that somebody will travel through a link.
The other would be to put custom code into either your buttons or your links that would allow you to track them without relying on the click listener in the first place. However, I suspect that this would be a lot more trouble than it's worth.
Because right-clicking and opening in a new tab is not a "click" in the eyes of JavaScript. It is however an event that can be tracked. It will require the use of jQuery and a GTM Variable that is Custom JavaScript.
This post has decent instructions on tracking it.
How to Track "Open New Tab" traffic in Google Analytics
<span class="allMnuHdr">Marketing</span>
Campaigns
Accounts
Contacts
Webmail
I am trying to click a link within a link. In this case, when I hover the mouse on the link, I'll see a list of links & I want to click on one of those. I've tried many a few things, but no luck.
From the above HTML code, you can see "Marketing" is a parent link & it has some more links within. I want to click on "Accounts" after hovering the mouse on "Marketing".
I've tried getRoproperty("allitems") method & that doesn't return anything. While I record the script, I can see the reference to child link as below:
Browser("admin - My Home Page -").Page("admin - My Home Page -").Link("Accounts").Click
Object spy utility can't be used as links are displayed only when mouse cursor is hovered. Post recording, OR shows accounts as link. I can't get this working using dynamic scripting. Can you please suggest an approach this can be worked in UFT?
You need to cause the Marketing link to display the other links, unfortunately UFT's Link object doesn't have a Hover function.
Does clicking on Marketing work as well as hovering? (How does it work on mobile devices?).
If not you can try using FireEvent with "mouseover" to try to simulate the event.
I have a news-type website that I am looking to create using N2CMS, but besides the regular operations (being able to see a calendar, viewing lists of news, viewing news details etc.), part of the content in the website is displayed in "modal" popups (similar to the ModalPopupExtender from the AjaxToolkit) inside the page (for example if you click Login, a popup panel appears with the login controls).
My question is: is there a way of adding a handler for a link, and displaying a "modal" popup when the link is clicked? If so, can this be done from the template GUI editor (and how)?
Thank you
N2CMS doesn't have any built-in handlers to create modal pop-ups for links. However, N2CMS does ship with the Jquery JavaScript library. My suggestion would be to use JavaScript in your site template to select and format the desired links with modal dialogs -- but that can't be done from the GUI editor, you'd need to do it in the template code directly.
Is there any way to see the page in Firebug or other software after the content of a div has been replaced with ajax?
Yes, that's exactly what Firebug will show you: the current state of the DOM. Same with Chrome's developer tools.
Sure, you can inspect the DOM with FireBug which always shows the DOM at its most recent state (and of course accounts for AJAX updates):
yes
firebug marks the changed div in yellow and you can see the html dynamic updates in the html view
Some web pages such as GMail and Reddit(with the Reddit Enhancement Suite) have useful keyboard shortcuts that I'd like to use. However, whenever I start typing on one of these pages, the first onkeypress event fires, but then the "Search for text when I start typing" search bar opens and blocks further keys.
I don't want to disable "Search for text when I start typing" as I use it on most other web pages. Is there any way to selectively disable it, or to make a keyboard shortcut/bookmarklet to toggle it?
To disable this in firefox, just go to "Options->General Tab->Browsing and disable "Search for text when I start typing". More info here . This is very useful in some cases, for example when you try to play WebGL games or when using pages like Gmail or Protonmail that have their own kb shortcuts.
UPDATED to version 73.0.1- In previous versions of Firefox this is in "Tools->Options->Advanced->General Tab" or in "Preferences->General->Browsing"
This is still an issue huh? I love this feature but It also bothers me every now and then. There are some pages that get it right. I never dug into how they do it. For instance:
zty.pe - JS browser typing game. Would be pretty bad if typing caused searching here. It actually captures the keys just when the game starts and NOT by default on the page.
That is not Firefox or any other browser feature. To do this, you have to write server and client side code.
Catch text that user types into input, and send it using preferably AJAX to server-side script. Then server side script should look up for matches in DB (some search engine), and return possible combinations. All you have to do on client side (JS) is to show returned results in some nice way - like in google - you can use for example simple html lists, but you have to code some css to make it look properly. Also nice feature is to code JS to work on up/down keys and enter for selecting element (it should also work for mouse).
It's not very simple to do by yourself, but you have now idea how to do it. You could also google for some scripts - surely there is something :)
Good luck!