Results 1 to 11 of 11

Thread: i need help in this

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2004
    Location
    world
    Posts
    19

    Question 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.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    What does myfile.asp return and what does it do?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2004
    Location
    world
    Posts
    19
    myfile.asp contains code to search database and get data from the data base.
    and i need output in the html file!!!!!

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2004
    Location
    world
    Posts
    19

    Exclamation

    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!!

  6. #6
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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 :

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2004
    Location
    world
    Posts
    19

    Exclamation

    I need to call asp file from my html file!!

  8. #8
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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 :

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Oct 2004
    Location
    world
    Posts
    19

    Exclamation

    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?????

  10. #10
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    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 :

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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
  •  



Click Here to Expand Forum to Full Width