wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Firebug question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Firebug question" Watch "Firebug question" New topic
Author

Firebug question

Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
I inspected a page's code but when I do view source on that page, I do not see the code I saw when I inspected (Using the inspect button of firebug) using firebug. Am I doing something wrong?

Thanks.


Be Humble... Be Nice.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60738
    
  65

View source will show you the response. Firebug inspection will show you that actual DOM.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Ok say I want to put a div tag around the div tag I am currently inspecting right now. What should I be doing then? Where should I do the changes as I cannot see these in the view page source.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60738
    
  65

I repeat: View Source shows the source; that is, the original HTML as it was sent as the response. Period. Anything you do to the page after that is not reflected in this. It is will always and forever show the response.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Bear Bibeault wrote:I repeat: View Source shows the source; that is, the original HTML as it was sent as the response. Period. Anything you do to the page after that is not reflected in this. It is will always and forever show the response.


I am not talking about the changes showing up in the html page's view source. I am talking about how to make changes to the inspecting div tag I am looking at right now using firebug.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60738
    
  65

No getting you.
Arjun Reddy
Ranch Hand

Joined: Nov 10, 2007
Posts: 627
Ok. I am looking at two tables in separate div tags say div1 and div2 and I want to put a new div tag say div3 around div1 and div2. I can see div1 and div2 using the firebug inspect option but cannot see them when I do view page source. So right now, I don't know where to put the div3. Sorry for the confusion.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60738
    
  65

Do you mean under JavaScript control? What does all this have to do with Firebug and View Source?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
As Bear has said many times, the View Source that you get from Ctrl-U or the View Menu is the data from the server that was originally brought down. The changes to the DOM are in memory, they are not in a physical file so viewing the page source open helps when you are looking at what was returned from the server, not when you want to see what JavaScript did to the page.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Firebug question
 
Similar Threads
Generic method
JavaScript in Firebug
anchor tag , click and livequery
No. of String Objects
How to debug an Android web app