?
Solved

Delphi & ISAPI & HTML

Posted on 2000-04-04
8
Medium Priority
?
266 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 800 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 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