What would this 1 line of code be in JavaScript? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

What would this 1 line of code be in JavaScript?

FSUKXAZFSUKXAZ Posts: 26Member
What would the code be to do the same thing in JavaScript (or HTML) for the following ASP code:



This ASP code does exactly what you might think. It includes a file, in this case a Header for a webpage. This way you do not have to write the code for the Header for all the pages in your site. You write this one line and it adds it for you. The system I'm developing for does not read ASP and Chilisoft may not be an option. I need some HTML or JavaScript that can do the same thing.

Comments

  • Secret_DoomSecret_Doom Posts: 116Member
    Well...
    To include a javascript that's in a file, you do:



    I don't think that's quite what you're looking for, but try playing around with that (maybe putting language="ASP").

    -- Secret_Doom - Leonardo Pignataro --

    [email protected]
    www.batch.hpg.com.br

    : What would the code be to do the same thing in JavaScript (or HTML) for the following ASP code:
    :
    :
    :
    : This ASP code does exactly what you might think. It includes a file, in this case a Header for a webpage. This way you do not have to write the code for the Header for all the pages in your site. You write this one line and it adds it for you. The system I'm developing for does not read ASP and Chilisoft may not be an option. I need some HTML or JavaScript that can do the same thing.
    :

  • FSUKXAZFSUKXAZ Posts: 26Member
    You may have misunderstood me. I am rewriting the entire Website in HTML, DHTML, and JavaScript. I am looking for the code that would replace the following asp code completely:

    How would you include a file that has already been written like "Head.html" using JavaScript or HTML?


    Well...
    : To include a javascript that's in a file, you do:
    :
    :
    :
    : I don't think that's quite what you're looking for, but try playing around with that (maybe putting language="ASP").
    :
    : -- Secret_Doom - Leonardo Pignataro --
    :
    : [email protected]
    : www.batch.hpg.com.br
    :
    : : What would the code be to do the same thing in JavaScript (or HTML) for the following ASP code:
    : :
    : :
    : :
    : : This ASP code does exactly what you might think. It includes a file, in this case a Header for a webpage. This way you do not have to write the code for the Header for all the pages in your site. You write this one line and it adds it for you. The system I'm developing for does not read ASP and Chilisoft may not be an option. I need some HTML or JavaScript that can do the same thing.
    : :
    :
    :

  • FirestormFirestorm Posts: 162Member
    Leo was right at the point that you include the js file with the source property. (src = source)

    It can be used in the script tag:
    [code]

    [/code]

    or in also table in the table cell tag (sth. I developed on my own for the case the text in a tale cell is long and you don't want to write it into the source code)
    [code]

    [/code]

    FSUKXAZ, you are wrong when saying you are converting your site into DHTML, HTML, and JS, simply because DHTML isn't a language but a term standing for the combination of HTML, JS and CSS!
    Firestorm
    [email protected]
    ;-)

Sign In or Register to comment.