
|
Talking to the Fox
Hi,
I’m a little uncomfortable asking a technical question on this forum, as it seems more geared to "softer" topics ("all outsourcing all the time…"), but I’m desperate and a lot of smart people hang out here. I’m working on an app that’s a front end to a bunch of reference material on our proprietary systems, our intranet, and the public internet. One of the features is a button that launches the user’s web browser and navigates to certain pages. The requirement is that I launch the user’s independent browser and not embed the browser in my app (I’ve tried arguing this one).
Initially, I launched the default browser by ShellExecuteing the URL. Unfortunately, this takes a few seconds on most of the machines at my company, so it wasn’t a great user experience. I modified the code to check if IE is running, and if it is use COM automation to tell it to navigate to a page. This works great and is nearly instantaneous. IE automation also gives me the option to launch in a new browser window and even play with the page’s DOM to pre-fill fields in html forms.
Here’s the problem: A large number of users have started using Firefox as their default browser, so navigating to a new page has a few second delay. I’ve spent a number of hours googling, but can’t seem to find any information on how to communicate directly with an instance of Firefox that’s not embedded in my app. I find it hard to believe that Firefox is an island, but I’m reluctantly reaching that conclusion. Does anyone have any experience telling Firefox to navigate to a page, open a page in a new tab, enter data in form fields, etc. from an external app?
Btw, the app is developed in Delphi 7. Any thoughts would be greatly appreciated.
Regards,
Dan
Dan
Thursday, April 1, 2004
...and when Opera or Mozilla becomes the new favorite browser are you going to issue a patch?
Shellexecute the URL. Point out to project management they have a choice - a few seconds waiting for the browser to launch or embed a browser window. Let them choose. In writing. Then do it and forget about it.
Philo
Philo
Thursday, April 1, 2004
What Philo said.
Jack of all
Thursday, April 1, 2004
"I’m a little uncomfortable asking a technical question on this forum, as it seems more geared to "softer" topics ("all outsourcing all the time…"), but I’m desperate and a lot of smart people hang out here."
I actually prefer these kinds of posts and wish there were more of them! I tried doing a cursory search for an answer but came up short.
So I recommend doing what Philo says.
*bows to his greatness*
G'night.
Almost Anonymous
Thursday, April 1, 2004
I agree with the previous replies - use ShellExecute (or ShellExecuteEx). You could also launch a minimized browser window as your application starts up, and then ShellExecute can use that existing browser window when needed, with much less delay.
[Note: ShellExecuteEx is not supported on NT version 3.x]
Philip Dickerson
Friday, April 2, 2004
> Any thoughts would be greatly appreciated.
Well, duh, aske the people that developed Firefox?
Friday, April 2, 2004
You could try DDE
http://developer.netscape.com/docs/manuals/communicator/DDE/
Firefox supports WWW_OpenURL.
Joel Spolsky
Fog Creek Software Friday, April 2, 2004
Death to Netscrap and FireFox!
Down with open-source!!!
Jay
Friday, April 2, 2004
Thanks for all the quick replies!
“...and when Opera or Mozilla becomes the new favorite browser are you going to issue a patch?”
Philo, I plan to always support all browsers by defaulting to ShellExecute, but I’d like to take advantage of the features of popular browsers to enhance the user experience where possible. Yeah, a few of the users may be using Opera, but the vast majority are on IE or a Mozilla derivative (such as Firefox) so why not make their lives better? Also, the fact that I use the app myself may be influencing my usability quest :).
Joel, thanks for the DDE link - it looks promising for navigation. I just wish they gave access to the DOM etc.
Dan
Friday, April 2, 2004
Recent Topics
Fog Creek Home
|