new to JS , need help

Discussion in 'JavaScript' started by henry_nguyen, Feb 8, 2011.

  1. #1
    Hi,

    instead of having a "text 123" in test.js and insert as:
    < script type=" text/javascript " src=" test.js"></script> in a website.

    how do i make people to see "text 123" instead of < script type=" text/javascript " src=" test.js"></script> in a page?

    in another word i dont want people to see the <script> tag on my source code and they only see the "test 123" text

    thnks
     
    Last edited: Feb 8, 2011
    henry_nguyen, Feb 8, 2011 IP
  2. mikaradmall

    mikaradmall Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    Try this code:
     
    mikaradmall, Feb 8, 2011 IP
  3. henry_nguyen

    henry_nguyen Well-Known Member

    Messages:
    710
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    130
    #3
    this is not what i am looking for... i dont want to add any more code or tag to my pages beside fixing the "test.js"

    is this possible?
     
    henry_nguyen, Feb 8, 2011 IP
  4. srisen2

    srisen2 Peon

    Messages:
    359
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    from what i know this is not possible. The reason is because the browser must compile the javascript itself and cannot be cloaked or it could not be read to be rendered
     
    srisen2, Feb 14, 2011 IP