|
-
Nov 22nd, 2004, 02:10 AM
#1
Thread Starter
Junior Member
i need help in this
how to run asp file from html page without using frames and get the out put in html page.
i found site using this code
<script language="Javascript" src="http://www.mydomain.com/myfile.asp?tmp=const."></script>
i tried to use the same script but i get error?
please if any body could help !!!!
PS. myfile.asp written in vbscript.
Last edited by alawra; Feb 22nd, 2005 at 03:37 AM.
-
Nov 22nd, 2004, 02:12 AM
#2
What does myfile.asp return and what does it do?
-
Nov 22nd, 2004, 02:21 AM
#3
Thread Starter
Junior Member
myfile.asp contains code to search database and get data from the data base.
and i need output in the html file!!!!!
-
Nov 22nd, 2004, 02:34 AM
#4
I don't see why you include it in your <script> tag then...
If you don't want to use frames, how about an IFRAME to include that asp page?
-
Nov 22nd, 2004, 02:47 AM
#5
Thread Starter
Junior Member
what i need
to run the myfile.asp and get the ip address and then seach the data base for the country of visitor and then display it in the html file
and i know that i could use iframs but if possible i need to include the file like this one
<script language="Javascript" src="http://www.mydomain.com/myfile.asp?tmp=const."></script>
but when i use this code i get an error
and when i use there code it gave ok.
so what is the problem?
they use script language="Javascript" but they use asp file how this happen!!
-
Nov 22nd, 2004, 09:15 AM
#6
ASP Include file is designed for things just like this, there is no need to use anything else.
Search for asp include file in 4guysfromrolla.com you will find plenty example.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 22nd, 2004, 09:28 AM
#7
Thread Starter
Junior Member
I need to call asp file from my html file!!
-
Nov 22nd, 2004, 09:49 AM
#8
Originally posted by alawra
I need to call asp file from my html file!!
Ooops sorry, didnt see the "HTML" bit. Must you use HTML, if you have an asp extension then you can easily do it with include file.
Also the src of JavaScript file must be a JS file meaning the content of the code must be Client Side JavaScript. You are trying to load asp file as client side JavaScritp, that wont work.
I can only think of one way of doing it if you cant use Frame/iFrame or ASP page. That will be by using MSXMLHTTP object. You coud have that in client side and then use that to read the asp file and print it out using client side javascript. That will be like trying to kill a fly with a cannon, but if you insist thats the only possible way i can think of.
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 22nd, 2004, 10:29 AM
#9
Thread Starter
Junior Member
Danial
it is really like what you said...
i can't find any way to do that.
and i need to have it in html file
why we could easily call js file from html but not asp file?????
-
Nov 22nd, 2004, 10:34 AM
#10
Originally posted by alawra
Danial
it is really like what you said...
i can't find any way to do that.
and i need to have it in html file
why we could easily call js file from html but not asp file?????
Because ASP is server side technology, where as the js the way you are using it is client side. ASP Code is executed on the server so when you have a asp file you can include any other asp file.
Here is an example of XMLHTTP :http://www.4guysfromrolla.com/webtech/110100-1.shtml
This example is used in serverside, you can use the same object in client side using JavaScript, search you will fnd example.
Hope this helps.
Danial
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
-
Nov 22nd, 2004, 12:18 PM
#11
I was going to suggest XMLHTTP but decided against it... as long as there was another option, would have been better.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|