Why can't I edit the source of HTML files in Firebird?
January 4, 2004 3:45 AM   Subscribe

There is just one thing that is preventing me using Firebird as my default browser at this point, and it seems like it should be such a ridiculously simple issue that I am left scratching my head...

I can't edit the source of my html pages using Firebird. I have installed the mozex extension, and after much fiddling around, finally got it to show me the source in notepad. I appended "%t" to the end of my preference line for "source" in the settings for mozex as per the author's instructions (so that I have specified C:\Windows\notepad.exe %t as the program to use), and I also had to change the name of the folder where I keep my html pages so that it doesn't include any spaces (something I finally managed to figure out on my own), so now I can open and edit the source with notepad, but when I try to save, I get an error that says "Common Dialog error (0x3002)". I am using WinXP, Firebird .06, and my html work folder is on a separate partition of my hard drive from C. Both notepad and Firebird are on C, though when I try viewing source on a page located on C, it doesn't work at all ("the system cannot find the path specified").

Why, oh why, is this such a difficult thing to do? Or am I missing something so obvious that no Google search reveals it?
posted by taz to Computers & Internet (13 answers total)
Response by poster: Ack. Okay. I just realized that I can, actually, "save", but I can't "save as", and "save as" is pretty much what I always, always use (a safety precaution ingrained for years....)
posted by taz at 4:31 AM on January 4, 2004

it maybe a forwards/backwards slash thing - see here.
posted by andrew cooke at 5:44 AM on January 4, 2004

This doesn't answer your specific question but here's something I did when I used to teach HTML classes back in the dark ages (when IE was a miserable excuse for a browser and Netscape was what we used):
Create a shortcut to Notepad.exe (find it in your system folder and use Send To->Desktop as Shortcut)
Open the properties of the Notepad shortcut and give it a keyboard shortcut (like Ctrl-Alt-N) and have it Start In a folder of your choosing (if you don't want to use the desktop)
Now when you View Source from Firebird, use a quick succession of Ctrl-A, your notepad keyboard shortcut, and Ctrl-V to get everything in notepad.
Students quickly became adept at the key combinations.
posted by TimeFactor at 7:05 AM on January 4, 2004

I have specified C:\Windows\notepad.exe %t as the program to use...

Try setting it to notepad "%t" including the quotes, to resolve your directory-with-spaces problem. Also you should pretty much never need to specify the location of notepad.exe since it's in the system's PATH (though if you're using it as an example and actually using another editor, you would need to do so, and probably want to throw quotes around it as well if it has spaces in the pathname). Sorry it doesn't solve your fundamental issue, but it might alleviate at least one of your woes.

It's never occurred to me to use a browser as the main component of an development environment -- it's a viewer, not an editor, right? -- perhaps one "solution" would be to reconsider your workflow?
posted by majick at 7:54 AM on January 4, 2004

Response by poster: Well, I have HomeSite, though I haven't installed it yet on this new computer... and I guess I don't consider what I do a "development environment"; I just make pages, and it's so easy to open my page in the browser, right click to view source, make some changes and save. Am I the last person left doing this, then?
posted by taz at 8:27 AM on January 4, 2004

Nope, that's how I do it too.
posted by Nothing at 10:32 AM on January 4, 2004

Well, if you view the source and save, it won't go back to where the original file came from -- Notepad won't FTP -- so what's the point?
posted by kindall at 2:20 PM on January 4, 2004

Well, if you view the source and save, it won't go back to where the original file came from -- Notepad won't FTP -- so what's the point?

If you're viewing the page locally, then there's a point.
posted by armoured-ant at 4:22 PM on January 4, 2004

Best answer: Otherwise, you could use Mozilla instead, which includes an HTML editor in addition to (effectively) the Firebird browser.
posted by dg at 6:02 PM on January 4, 2004

I don't understand why you would possibly want to let the source of your own page through your browser before modifying it. The browser might not even be returning the original source! (This is obviously true if the page is dynamic, though with static ones, as is the case here, Firebird seems to only do that for empty pages.)

Why not open the local copy (or scp/smb/nfs/ftp/what have you mounted copy) with an editor and refresh it in the browser after saving in the editor? Or use an IDE if you want all the bells and whistles? Firebird is not for editing.
posted by azazello at 6:20 PM on January 4, 2004

Response by poster: Thanks, dg! I've downloaded Mozilla and am trying it out.

For everyone confused by why I would want to do what I want to do, I don't what to tell you - call me exotic. For about seven years now I've been making my pages this way: I write the html/css in notepad and save the page. Usually, I'm starting out with some page I've already created that has the same basic template, so I open the page in the browser (click one), right-click to view source in notepad (click two), make whatever changes I want, and save as "new-file-name" (click three, and finished). I use Homesite when I when I have something more complicated to do, but I much prefer the bare bones approach, and I made well over 1,000 pages last year this way. I might be a little bit sloppy on my own site, but when I make a site for somebody else, I check to make sure every page validates, so, no harm, no foul, eh?
posted by taz at 1:21 AM on January 5, 2004

The confusion seems to be that people think those of us using the browser as a viewer are doing so on remote pages. Browsers can view local files as well, and when doing so, any good browser should simply pass the file reference to a text program of some kind when viewing source. (That is, what gets passed is not the interpreted source. It has not "run through" anything) Obviously a dynamic page or a remote one could not be edited this way, but it is a very simple, quick, and efficient way to work on HTML and CSS templates locally, which is the best place to do that anyway. It's a waste of time to send plain old html back and forth across a network just to check it. The way I see it, there's no need to mess around with supposed wysiwyg when you have an actual browser to view changes, and no need to load large, relatively slow programs like homesite or dreamweaver when you can edit in notepad (not much beats notepad for speed).
posted by Nothing at 7:21 AM on January 5, 2004

Also note: Setting a shortcut to notepad on your desktop as suggested above will disable the ability to view source in IE on many XP systems. Crazy, but true.
posted by Nothing at 7:24 AM on January 5, 2004

« Older Why not make college or university free for...   |   What's the best way to dice an onion? Newer »
This thread is closed to new comments.