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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GET URL

Status
Not open for further replies.

math

Programmer
Mar 21, 2001
56
BE
hi,

I want to go to a URL when a button is pushed... well actually I want to access Javascript, but I can do that if I know how to go to a url (
Does anyone know???

Thanks,
math
 
hi,
You can do like this,

<Input type=button onclick=pushbtn()>

function pushbtn()
{
window.location = '}

this will do for you.

Regards
Pradeep mail me : spradeepraj@dsqsoft.com
Delphidhasan
 
Hi,

thanks for your reply, but what I can tell from your reply is that your button is a HTML-form button. I want to go to a URL in Delphi, You know, For example, a online help button... The button in Delphi has to open a Internet Explorer (or the default browser) and go to a specified URL... Getting a HTML-form-button to do that is easy...

Any ideas for that?

Thanx anyway,
math
 
If you simply what to visually see the page in the default browser then

add ShellAPI to your uses clause and

uses
ShellAPI;

var
MyUrl: String;

procedure DoIt;
begin
ShellExecute(0,
'open', PChar(MyUrl), '', '.', SW_SHOWMAXIMIZED);
end;


If you want to do it behind the scenes so that you can interogate the we site HTML then use the FastNet components (or Indy). With FastNet HTML component (TNMHTTP) say called 'Downloader' do

var
MyUrl: String;

DownLoader.Get(MyUrl);




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top