customising external .js files

Ask a Question related to ASP, Design and Development.

  1. #1

    Default customising external .js files

    can you use asp to customise external js files e.g.

    <script src="fred.js"></script>

    where fred gets the page id and changes an image in the .js file to suit?

    mark


    mark | r Guest

  2. Similar Questions and Discussions

    1. external .js files
      Hi all, I see there is a way to setup external app to edit source files, but is there a way to use an external app (notepad.exe) to edit .js...
    2. Customising List/Menu appearance
      Hello Can anyone help as I am struggling to create a customised list/menu in dreamweaver. How do you alter the border style etc using CSS as all I...
    3. customising PagerStyle
      hi, In a datagrid that allows paging i m using PagerStyle-Mode=NextPrev. i want to customize the pager style in order to display two images (or...
    4. external exe files
      Hi Michael, No. You cannot effect your user's computer in any way from a web application. This isn't a Shockwave thing, it's a web security...
    5. Customising the interface
      I often see training schools with their logo set into the photoshop background/interface. Instead of the dull grey background the logo's are inset...
  3. #2

    Default Re: customising external .js files

    What I would do, is have a function in fred.js that accepts a parameter

    For example in fred.js

    function Start(aString)
    {
    alert(aString);
    }

    then in your "asp" code...

    <%
    Dim sString
    sString="'Hello'"
    %>

    <script src="fred.js"></script>
    <script language=Javascript>
    Start(<%=sString%>)
    </script>

    which would result in
    <script src="fred.js"></script>
    <script language=Javascript>
    Start('Hello')
    </script>


    "mark | r" <mark@nmd.freeuk.com> wrote in message
    news:3f5e0376$0$261$cc9e4d1f@news.dial.pipex.com.. .
    > can you use asp to customise external js files e.g.
    >
    > <script src="fred.js"></script>
    >
    > where fred gets the page id and changes an image in the .js file to suit?
    >
    > mark
    >
    >

    Tom B Guest

  4. #3

    Default Re: customising external .js files

    wjat i mean is can the contents of a .js file be built?

    mark


    mark | r Guest

  5. #4

    Default Re: customising external .js files

    <script src="fred.ASP">

    Use that, and then in fred.asp, response.write your client-side code as
    needed.

    Ray at work

    "mark | r" <mark@nmd.freeuk.com> wrote in message
    news:3f5e112e$0$265$cc9e4d1f@news.dial.pipex.com.. .
    > wjat i mean is can the contents of a .js file be built?
    >
    > mark
    >
    >

    Ray at Guest

  6. #5

    Default Re: customising external .js files

    I suppose you could ask ... why? If it's dynamic then what's the point of it
    being a src="" since there is no point in caching it.

    Generalise your scripts enough to be cacheable and then put the dynamic
    stuff direct into the html page?

    Do you have a specific aim in mind for this since it's not clear what the
    context or final intention is?

    Chris.


    "mark | r" <mark@nmd.freeuk.com> wrote in message
    news:3f5e112e$0$265$cc9e4d1f@news.dial.pipex.com.. .
    wjat i mean is can the contents of a .js file be built?

    mark



    Chris Barber Guest

  7. #6

    Default Re: customising external .js files

    "Chris Barber" wrote:
    >
    > I suppose you could ask ... why? If it's dynamic then what's
    > the point of it being a src="" since there is no point in
    > caching it.
    One reason comes to mind. I believe it has been explored in
    ms.public.scripting.jscript as a means for hiding source code from prying
    eyes. I don't recall the consensus on its effectiveness, however.


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.


    Dave Anderson Guest

  8. #7

    Default Re: customising external .js files

    its an include to hide a non accessible element from a text browser.

    mark

    "Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
    news:OvAp5YwdDHA.2432@TK2MSFTNGP10.phx.gbl...
    > "Chris Barber" wrote:
    > >
    > > I suppose you could ask ... why? If it's dynamic then what's
    > > the point of it being a src="" since there is no point in
    > > caching it.
    >
    > One reason comes to mind. I believe it has been explored in
    > ms.public.scripting.jscript as a means for hiding source code from prying
    > eyes. I don't recall the consensus on its effectiveness, however.
    >
    >
    > --
    > Dave Anderson
    >
    > Unsolicited commercial email will be read at a cost of $500 per message.
    Use
    > of this email address implies consent to these terms. Please do not
    contact
    > me directly or ask me to contact you directly for assistance. If your
    > question is worth asking, it's worth posting.
    >
    >

    mark | r Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139