script functions in <script> tag

Discussion in 'Javascript' started by kal, Aug 6, 2007.

  1. kal

    kal Guest

    Hi

    I have a aspx page that has a function in a script tag which is called from
    code in a javascript src file that is loaded in the <head> tag.

    the thing is that that browser complains that it cant find this function -
    any ideas?

    Kal
     
    kal, Aug 6, 2007
    #1
    1. Advertising

  2. kal

    David Mark Guest

    On Aug 6, 6:07 am, "kal" <> wrote:
    > Hi
    >
    > I have a aspx page that has a function in a script tag which is called from
    > code in a javascript src file that is loaded in the <head> tag.


    That seems backwards.

    >
    > the thing is that that browser complains that it cant find this function -
    > any ideas?


    What function? I can't find it either. Post the code.
     
    David Mark, Aug 6, 2007
    #2
    1. Advertising

  3. kal

    kal Guest

    Hi Mark,


    in my aspx page i have

    <script src="mag.js" type="text/javascript" language="javascript"></script>

    in the head tag.

    and then in the body tag i have
    <script language="javascript">

    function shout()

    { alert("hello");}

    </script>


    in mag.js i simply put

    shout();

    The error i get is that shout is not defined

    if i copy the function to the js file it works. but i need it in the aspx
    file

    thanks







    "David Mark" <> wrote in message
    news:...
    > On Aug 6, 6:07 am, "kal" <> wrote:
    >> Hi
    >>
    >> I have a aspx page that has a function in a script tag which is called
    >> from
    >> code in a javascript src file that is loaded in the <head> tag.

    >
    > That seems backwards.
    >
    >>
    >> the thing is that that browser complains that it cant find this
    >> function -
    >> any ideas?

    >
    > What function? I can't find it either. Post the code.
    >
    >
     
    kal, Aug 6, 2007
    #3
  4. kal

    kal Guest

    Ive solved this thanks -
     
    kal, Aug 6, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jstack
    Replies:
    1
    Views:
    611
    Tor Iver Wilhelmsen
    Jul 4, 2003
  2. kishan bisht

    struts tag inside a tag

    kishan bisht, Jul 8, 2003, in forum: Java
    Replies:
    1
    Views:
    1,489
    Wendy S
    Jul 9, 2003
  3. shahbaz
    Replies:
    0
    Views:
    911
    shahbaz
    Oct 27, 2003
  4. shruds
    Replies:
    1
    Views:
    834
    John C. Bollinger
    Jan 27, 2006
  5. Xiangliang Meng
    Replies:
    1
    Views:
    1,609
    Victor Bazarov
    Jun 21, 2004
Loading...

Share This Page