Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi & ISAPI & HTML

Posted on 2000-04-04
8
Medium Priority
?
267 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

636 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