Results 1 to 7 of 7

Thread: InnerHTML problem

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769

    Lightbulb InnerHTML problem

    Hi,

    I have an html page which has a div tag. I can use the innerhtml property to change the text between the two tags. But how can I use java script to get the html from another file, such as an include or an asp file?

    Can I call an asp file from javascript and print the output to the innerhtml property?

    Please help, project might depend on it!

  2. #2
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    You cant read the content of another file using client-side javascript. The only way to do it is to use either a server-side language or something like an IFrame or ILayer (not advised).
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I am using javascript client side and vb server side. But how do I call the asp from the client side script and get html back without replacing the current page? I would like to use the returned html in a div tag using the innerhtml property.

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    You might be able to use Remote Scripting to do this

    http://www.aspfree.com/authors/salim...escripting.asp
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Three Anchor Bay, Cape Town, South Africa
    Posts
    769
    I see that remote scripting is not recommended. Do you have any information about SOAP?

  6. #6
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    I don't know anything about it, but I've been curious.

    http://www.w3.org/TR/SOAP/
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  7. #7
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    I only know little bits of it as I've used it briefly with XML.

    W3Schools has a good introduction or guide
    http://www.w3schools.com/soap/default.asp
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

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