JavaScript on one Serve page interact with another server page?

Discussion in 'JavaScript' started by lilryno, May 21, 2006.

  1. #1
    I'm wanting to program a javascript feed but I'm not sure if it will be able to do the following. I don't need to know how to do it....I just want to be sure it can be done.

    Javascript app resides in HTML of Website A on Server A
    The Javascript app allows a user to register with username and password and once succesfully done...download content from links on Website A

    The trick is with the registration/login process. The JS app needs to send the information to an asp.net Website B on Server B and wait for some kind of response from Website B on Server B to the Javascript App confirming registration.

    Am I smoking crack thinking JS can do this?

    If so, does anyone know of a 100% client side script that could be placed in the HTML of Website A that would interact with Website B to get the functionality I'm looking for? Any help would be greatly appreciated.
     
    lilryno, May 21, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Normally ajax can do this but you can't use ajax on site1.com to contact site2.com

    The best thing is to create your javascript file using asp and then you can host it on site1.com and site2.com can just use it like a normal js file.

    You would need to alter the headers that the page sends from text/html to be javascript instead.
     
    mad4, May 21, 2006 IP