Firebug - Console - Filter information shown - javascript

I use firebug a lot but but really just the basics and I don't pretend to understand it in any detail though it is very useful.
I would like to just show the console.log entries that I have inserted in the javascript and not the other stuff. You can filter what is shown and I thought that "DebugInfo" may show console.log entries but it doesn't.
The problem with reading the console is that I have ajax requests every few milliseconds and these fill up the page in no time and it starts scrolling and it is difficult to spot the relevant info passing by.
Ideally I would like to filter out all the GET http...... and just have the console.log info, is there a way to do this or a different approach that would make it easier for me to debug? A pause button would work but having googled that it doesn't seem to be possible.
My application is on a webserver on a microchip so I don't want to set break points as I would need to reprogram often as I tested different things and that takes too long.

Beside the word "Console" in Firebug you should see a little down arrow. If you click that you get an option for "Show XMLHttpRequests". Untick that and try again.
You can also filter in Chrome's Developer Tools by clicking the blue filter icon.

Related

Print without printing dialogue

I know someones will say that there is a too many links opening such kind of problem but none of them worked.
I have this website: http://windory.club/locres/
when people selecting some products at the top of the website in the basket field is written (number) goods. When you click there there is an option to print. When you click print it shows print dialogue, which I dont want...
I just want to print imediately after click on default printer...
There is a good reason for the print dialogue. So that the user can review the print layout and more importantly not start a print job when an accidental click has happened. Is there a reason why you want to circumvent these restrictions and don't follow common human-computer-interaction guidelines?
As for the question i have to admit, that i don't know a solution to the problem, but can imagine that at least with javascript there will be no possibility (for said above reasons).
PHP is a server language, so you will not be able to execute a print command on the users computer.
Edit: On Second Thought: Do you want to print the basket at your(!) computer?

Find a value anywhere in a web application

This is not a real programming question, but it's driving me crazy...
Please do not close it immediately as "asking for tools" (even if I do :-D)
At the moment I have to fix something in a JavaScript/AngularJS web-application. This was not done by me, I'm digging for nuggets in cubic meters of sand...
The application is loading rows from a web-service. The application shows, that there are 22 rows loaded, 22 unique IDs are there in an array. The web-service' response via DevTools tells me, that 18 rows were fetched. 4 rows seem to exist some where.
I know the unique IDs (GUIDs), which were not part of the loading. Now I'd like to do something like a full-text search at runtime if I can find these strange GUIDs somewhere in any context...
Does Crome DevTools offer such a tool? Might be you have another suggestion...
One approach is to search all the source files for the GUID text.
Open the Search pane. It opens up as a tab in the Console drawer.
Enter the GUIDs in the text box.
Another approach is be to investigate the call stack when the GUIDs are populated into the DOM.
Add a Subtree modification breakpoint on the <ol> element that the GUID gets populated into.
DevTools pauses every time the <ol> gets modified, so you may have to press Resume Script Execution a few times.
When you're paused on the relevant modification, you can investigate the Call Stack to see the call stack of functions that led to the GUID getting populated into the DOM.
While DevTools is paused you can use the Console to inspect the JS heap at that point in time.

Blank screen and necessary scroll event to get values in a store with few records in Sencha Touch

Working with Sencha touch application, I am having the next problem and I think is a bug from time ago..
When the user is filtering from a searchfield and the values found are (for instance) 1 or 2 records, the ipad screen sometimes does not appear items, it appears blank screen and it is necessary a light scroll movement to see the values.
Anyone know this bug and I have a solution?
Thank you.
If I'm correct, in order to reproduce the problem you have to open a long, paged list, then swipe down until you are at least on the second page, then call store.setFilter(...) and store.load() on the list's store.
The calls to setFilter and load are not resetting the page number to 1, so you are asking for the second (or third) page of the searched data.
If your server side works like mine, you'll get an empty result set, with a total number of 1 or 2 records.
You can search by yourself for the problem, debugging from Chrome dev tools (or whatever suits you best), and checking the start, limit and page parameters included in the request for data issued by the "incriminated" store load.
One possible, simple solution, is to call store.loadPage(1) instead of load.
Good luck!

Combo box behaviour in IE7

Hi I know its not a good idea but due to one use case I am populating a combo box with more 10000 items. Its behaving very weired in IE7 in all other browsers its working fine in IE7 its taking too much time for downloading the page. Sometime IE7 also hangs up
Is there any known bug with IE7 for this issue.
Thanks,
Amit
Not sure whether anything can be done to speed this up. One thing to look into would be loading the options dynamically through Ajax, and adding them as DOM nodes to the existing select element. That would at least allow the whole page to load before the rest of the data is fetched.
There are ready-made JS/jQuery-based Ajax combo boxes as well. One with a good loading strategy might yield better results.
I have no experience with them so I can't tell which one is suitable for you, but these seem worth checking out:
DHTMLXCombo (not free)
More in this question
I would suggest abandoning any attempt at having 10k entries in a single select box -- as others have said, it's a user interface nightmare, even if you can solve the problem with it killing the browser (which I don't think you can).
What to do instead?
Break the selection into categories. Then have one <select> box for the category, and have a second <select> get populated according to the category that is picked. This second <select> could be populated via Ajax or a page reload; both techniques are common. Given the quantity of options you want to provide, you may even want to break it down into category and sub-category.
The other alternative (which may be better, given the number of options you're providing) is to implement a Google-style auto-complete. There are a number of easy-to-use Javascript and JQuery scripts out there which allow you to implement this sort of thing without having to write it from scratch - it's almost as easy as writing the select box.
Here's one for you to try: http://docs.jquery.com/Plugins/autocomplete (but there are plenty of others if you google)
Hope that helps.

Back button bug in Chrome/Safari

I've been trying to find a workaround to the back button bug in Safari/Chrome (browser putting bogus data in fields where they don't belong). I haven't had any luck, and it seems like there should be a good solution to this by now (I see posts about this going back to 2009, but no good solution).
In this example: http://jsfiddle.net/eGutT/13/
you can see that everything is fine on the initial page load. However, after clicking the link, then clicking the back button on the browser, values are propagated the the wrong fields. Please use Safari or Chrome to test. It works fine on Firefox.
This is a very serious problem, especially when:
User goes hits the back button, and this bug occurs
User doesn't notice the bogus data
User makes some unrelated change to the form (in a different unaffected field)
User submits form
Now you are left with a situation where the bogus data is committed to the database!!
BTW, this problem may be related to jQuery, since if you uncomment this line in the example:
updateRowNums(); // IF YOU COMMENT OUT THIS LINE...
no extra/bogus data gets introduced.
Thanks,
Galen
Are you talking about the 0, 1, and 2? Because your function updateRowNums is automatically forcing those values. If you want to maintain that first column, you could change updateRowNums to something like this:
if (!$('#some_id').val()) { $('#some_id').val(x); }
(Obviously it's not the most efficient code, but it resets the field if no value is present.)
However, if that isn't what you're talking about, then I couldn't reproduce your problem. I'm using Chrome 9.0.597.83, and it saved all the right data in all the right places.

Categories