Calling ASP (dynamic content) within a .JS file

Results 1 to 3 of 3

Thread: Calling ASP (dynamic content) within a .JS file

  1. #1
    Join Date
    Dec 1969

    Default Calling ASP (dynamic content) within a .JS file

    Hi guys, <BR><BR>I&#039;m a newbie to ASP, but am learning it quite rapidly. My problem is I have a .js file which inside it I want to be able to call information from my SQL database using ASP. Whats the best method to do it? <BR><BR>I&#039;m pretty sure it can be done as i&#039;ve seen those extremely popular java scrollers that have have dynamic content. If you know how to do it or a website that explains how please let me know.<BR><BR>Thanks in Advance<BR><BR>James

  2. #2
    Join Date
    Dec 1969

    Default RE: Calling ASP (dynamic content) within a .JS fi

    Since your a self-proclaimed newbie I&#039;ll be gentle<BR><BR>Javascript is client-side - you cannot use ASP once the page is loaded. However, you can use javascript to request information from an asp page. We typically use the xmlhttp object for this<BR><BR>Note that if the client computer doesn&#039;t have msmxl or is using an older browser such as Netscape 4.7x you are going to have problems.

  3. #3
    Join Date
    Dec 1969

    Default Or the other way

    What I have typically done in the past, is dynamically create the content in the first place. So, instead of calling dynamic content from js (which you can&#039;t do), create the js from dynamic content.<BR><BR>~~Chaotix

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts