Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Launch Javascript command in D2005

Status
Not open for further replies.

KB8WFH

Programmer
Feb 6, 2005
3
US
I need to launch a javascript command that opens a browser window of a specific size and loads a specific page. I have not been able to find a way to do it.

I have tried using the shell execute commend to launch the following html/Javascript commend:

javascript:window.open("filename.html",'_blank','status=yes,top=0,left=0,width=661,height=421')

Maybe I don't even need the HTML javascript if there is a way to launch a browser and populate it with what I need. Does any one have an idea for launching a browser window of a specific type, then loading up a specific HTML document inside it? Thanks.

MC
 
You could create a TForm of the desired size. I can't speak for D2005, but in D6 there is a TWebBrowser component. You could drop this component onto the form (or instantiate it dynamically), ensuring that you set it's Align property to alClient, so it fills the sized form.

Then call TWebBrowser's Navigate method passing the desired URL.

Hope this helps!

Clive
Runner_1Revised.gif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"To err is human, but to really foul things up you need a computer." (Paul Ehrlich)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To get the best answers from this forum see: faq102-5096
 
That's an idea I had as well. i went ahead and just did that and its a lot easier to control that way anyhow. Thanks for the input. It is appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top