Solved

Delphi & ISAPI & HTML

Posted on 2000-04-04
8
264 Views
Last Modified: 2010-04-04
hi guys,

I am trying to get my ISAPI to "automatically" direct a user from one URL to another, without him/her doing anything..how do I do that.

I tried various solutions such as a simple one like this one :

HTML := HTML + '<A HREF="http://'+ServerName+'/index.htm">hej.gif</A>';

Had this is been reguliar HTML on a browser - it would have as soon as the gif file is displayed directed me to servername/index.htm - however it does not..this is prop. because of my ISAPI..

What about TWebResponse..can I do something there ?

Any bright ideas ?


Regards,

GOMF
0
Comment
Question by:GOMF
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Author Comment

by:GOMF
ID: 2683824
to put aside any confusion..the hej.gif is not complete..should have had a

<img src="hej.gif"> ....
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2683873
Try using JavaScript instead:

<script language="JavaScript">
function Redirect() {
  window.location = "http://www.lischke-online.de"}
   
}
}
</script>

<body onload=Redirect>
</body>

Ciao, Mike
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2683880
Oops, some typos. It should be:


<script language="JavaScript">
function Redirect() {
  window.location = "http://www.lischke-online.de"}
</script>

<body onLoad="Redirect();">
</body>

Ciao, Mike
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Expert Comment

by:Epsylon
ID: 2684068
You can use SendRedirect('http://blahblahblah') for automatic redirection.

But can you describe more in detail what you want to achive 'coz I don't understand your question fully..?
0
 

Author Comment

by:GOMF
ID: 2684070
I found a solution to the proble myself, I use a meta name

<META http-equiv="refresh" content="3; URL=http://www.myserver.com">

;-)

Thanks for your help.

Regards,

GOMF
0
 
LVL 1

Accepted Solution

by:
Probie earned 200 total points
ID: 2697568
Put a "Location" in the header that you are sending back to the browser.

The browser will check the header and jump there direct.

TWebResponse.CustonHeaders.add('Location=http://mynewlocation.com');

rgds
Probie
0
 
LVL 1

Expert Comment

by:Probie
ID: 2697570
Opps, sorry...
you can write the new URI direct to the
TWebResponse.Location instead...
(it's the same as my example above but this is an easier way to do it)

rgds
Probie
0
 

Author Comment

by:GOMF
ID: 2746527
goodie.


GOMF
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
tidtcpserver connection lost handle 2 111
creating threads in delphi 1 164
migrate this code to work on android 1 32
Firemonkey Tcameracomponent resultion 1 25
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question