Getting tab index in nsIWebProgressListener:: onStateChange in C++ - c++

I am developing Firefox extension in C++
I want to get the tab index of the tab window for which I have got STATE_STOP for STATE_IS_NETWORK.
i.e. I want to find the tab index associated with the request.
How do i get it?
Please help me !!!
Thanks in advance,
Vaibhav.

Solution is available at:
http://groups.google.com/group/mozilla.dev.tech.dom/browse_thread/thread/52ff471516662056#

Related

How to link to html page at specific ID bookmark?

Using Diagrams.net (draw.io), I would like to link specific elements to web pages. This is easily accomplished currently by creating a link for the element (say a rectangle).
However, I would like to navigate directly to a specific id bookmark in the HTML page. I cannot seem to get that to work.
For example, if I try to use this syntax (which works in the browser location bar):
https://en.wikipedia.org/wiki/Canada#Geography
I will be taken to the main page:
https://en.wikipedia.org/wiki/Canada
However, the goal is to go to the "Geography" section of this page.
I have also tried the json syntax without any success:
data:action/json,{"actions":[{"open":"https://en.wikipedia.org/wiki/Canada#Geography"}]}
I have also played with different action syntax such as:
data:action/json,{"actions":[{"open":"https://en.wikipedia.org/wiki/Canada"},{"scroll":{"tags":["Geography"]}}]}
Note: I'm using the diagrams.net desktop version 14.1.8.
Thank you for taking the time to read this question.
Paul
On Windows this only seems to work if the browser isn't already open. There is not much we can do to fix this as we're passing the link to the OS.

Server Side Includes are not being shown

I've gone through every fix online I'm pretty sure but I just can't seem to get this to work. I'm trying to have <#include virtual="footer.ssi" but not matter what it doesn't work.
footer.ssi and the page are in the same place
I really have no clue how to fix this issue but I can't get ANY server sides to show up on any of my pages so I know it's on my end. If anyone has any thoughts they're greatly appreciated!
I believe your code should be this: <!--#include virtual="footer.ssi" -->, this is what I use on my website, and it works perfectly!
See this reference: Html Goodies, and scroll down to The File Argument section.

content empty when using scrapy

Thanks for everyone in advance.
I encountered a problem when using Scrapy on Python 2.7.
The webpage I tried to crawl is a discussion board for Chinese stock market.
When I tried to get the first number "42177" just under the banner of this page (the number you see on that webpage may not be the number you see in the picture shown here, because it represents the number of times this article has been read and is updated realtime...), I always get an empty content. I am aware that this might be the dynamic content issue, but yet don't have a clue how to crawl it properly.
The code I used is:
item["read"] = info.xpath("div[#id='zwmbti']/div[#id='zwmbtilr']/span[#class='tc1']/text()").extract()
I think the xpath is set correctly and I have checked the return value of this response and it indeed told me that there is nothing under this directory. Results shown here:'read': [u'<div id="zwmbtilr"></div>']
If it has something, there should be something between <div id="zwmbtilr"> and </div>.
Really appreciated if you guys share any thoughts on this!
I just opened your link in Firefox with NoScript enabled. There nothing inside the <div #id='zwmbtilr'></div>. If I enable the javascripts, I can see the content you want. So, as you already new, it is a dynamic content issue.
Your first option is try to identify the request generated by javascript. If you can do that, you can send the same request from scrapy. If you can't do it, the next option is usually to use some package with javascript/browser emulation or someting like that. Something like ScrapyJS or Scrapy + Selenium.

Facebook Like button doesnt show

Im developing a RPG page and our Like Button has dissapeared.
I used the generator to create the code, and tried the diffrent versions there off non of them works.
I also used the LINTER and it shows no errors.
I asked my provider and they can find no error.
The page is http://www.wodgotham.com/ and next to the Facebook homepage link above the twitter link the Like button should be.
I have looked through the code and stared myself blind... I dont know what to do
Suggestions and assistance would be highly appriciated
You're not using the code from the generator - you're trying to load
http://connect.facebook.net/us_US/all.js - us_US is not a valid locale
The Javascript console on my browser shows the error as a 500 error from that URL, which when clicked says /* Not a valid locale. */
I believe Igy is correct. "en_US" would be the valid locale.

CFBuilder 2 insert closing tag does not work

I am using CFBuilder 2 (free version) and the insert closing tag functionality does not seem to work.
Here are my settings:-
Now if I type in a new openning tag e.g. <cfscript> I never get the closing tag. Am I misunderstanding what it is supposed to do or is there some other setting I should be changing?
This worked well in cfeclipse and so is incredibly frustrating.
Thanks.
Check the "typing" preferences page. There is a setting called: "auto-close tags". You probably have this set to "never". Try setting it to "When typing '>' of start tag". See attached image: