Sometime the JavaScript function becomes undefined

Discussion in 'ASP .Net' started by AAaron123, Mar 16, 2009.

  1. AAaron123

    AAaron123 Guest

    In the master header I have
    <script type="text/javascript" src="JavaScripts\OpenWindow.js"></script>

    OpenWindow.js contains the function openWindow



    In the body of the master I have

    <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip



    When I click the anchor while the page showing is Default.aspx (which is at
    the root level as is .Master) the window opens OK.

    The folder JavaScripts is also at the root level and OpenWindow.js then one
    level below the root.

    If instead of showing Default.aspx which is at the root level I show the
    page Articles/Articles.aspx I find openWindow is undefined when I click the
    anchor.

    Do you see what is wrong?

    Thanks



    project

    Default.aspx

    Main.Master

    JavaScript(folder)

    OpenWondow.js (contains function openWindow)

    Articles(folder)

    Articles.aspx
    AAaron123, Mar 16, 2009
    #1
    1. Advertising

  2. AAaron123

    AAaron123 Guest

    I typed JavaScript in the site map below when I should have written
    JavaScripts. I revised it.
    JavaScripts is at the root level. Your suggestion did not work probably
    because of my typo.

    So it works when the page's .aspx is at root but not when the page is in a
    subfolder.

    When a master is merged with a contents page I think all the file
    descriptions are adjusted.

    1)Right?

    However, I'd guess that the quoted string containing openWindow would not be
    adjusted.
    <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..

    2)Right?

    Maybe it doesn't need to be "adjusted" because it's in some global
    namespace?

    3)Comment?


    Thanks


    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > src="JavaScripts/OpenWindows.js"
    >
    > So the script must in a folder that is called JavaScripts and that is in
    > the same folder than the current ASPX page.



    See site map below. JavaScripts is in the root folder.

    The anchor calling openWindows is in the master.

    It work OK if the contents page is at root level but not with a contents
    page that is in a subfolder.

    I hope this makes more sense to you than it does to me.

    Any suggestions?

    >
    > You may want to try src="/JavaScripts/OpenWindows.js" so that it takes the
    > folder that is named JavaScripts and is at the root of the web site...
    >
    > --
    > Patrice
    >
    > "AAaron123" <> a écrit dans le message de groupe
    > de discussion : ...
    >> In the master header I have
    >> <script type="text/javascript" src="JavaScripts\OpenWindow.js"></script>
    >>
    >> OpenWindow.js contains the function openWindow
    >>
    >>
    >>
    >> In the body of the master I have
    >>
    >> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>
    >>
    >>
    >> When I click the anchor while the page showing is Default.aspx (which is
    >> at the root level as is .Master) the window opens OK.
    >>
    >> The folder JavaScripts is also at the root level and OpenWindow.js then
    >> one level below the root.
    >>
    >> If instead of showing Default.aspx which is at the root level I show the
    >> page Articles/Articles.aspx I find openWindow is undefined when I click
    >> the anchor.
    >>
    >> Do you see what is wrong?
    >>
    >> Thanks
    >>
    >>
    >>
    >> project
    >>
    >> Default.aspx
    >>
    >> Main.Master
    >>
    >> JavaScripts(folder)
    >>
    >> OpenWindow.js (contains function openWindow)
    >>
    >> Articles(folder)
    >>
    >> Articles.aspx
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>

    >
    AAaron123, Mar 16, 2009
    #2
    1. Advertising

  3. AAaron123

    AAaron123 Guest

    If I do this in the master
    <script type="text/javascript" src="/JavaScripts/OpenWindow.js"></script>

    and this in the master

    <a href="JavaScript:eek:penWindow('Aerial','Ima

    I always get openWindow is undefined.



    I don't think I'll have a problem adjusting the Images folder

    but I don't know why it doesn't find openWindow.



    Thanks a lot

    ps
    Without the leading slash it works ok from Default.aspx which is in the root
    with the master



    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:D...
    > src="MyFolder" means the folder that is under the current page location.
    > src="/MyFolder" points to a folder to is under the root.
    > The master page doesn't play any role here. This is not a separate page.
    > Its content is just merged with the current page (much like a user
    > control).
    >
    > You can also check this using the IIS log. You should see that your app
    > ask for a js file that doesn't exists...
    >
    > So you'll have to adjust the js file name. You'll have also the same
    > problem for the Images folder....
    >
    > The problem is that you are using relative paths so it depends where you
    > are and works only when you are at the root of your site. You should add a
    > leading / to use absolute paths...
    >
    > --
    > Patrice
    >
    > "AAaron123" <> a écrit dans le message de groupe
    > de discussion : #...
    >> I typed JavaScript in the site map below when I should have written
    >> JavaScripts. I revised it.
    >> JavaScripts is at the root level. Your suggestion did not work probably
    >> because of my typo.
    >>
    >> So it works when the page's .aspx is at root but not when the page is in
    >> a subfolder.
    >>
    >> When a master is merged with a contents page I think all the file
    >> descriptions are adjusted.
    >>
    >> 1)Right?
    >>
    >> However, I'd guess that the quoted string containing openWindow would not
    >> be adjusted.
    >> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>
    >> 2)Right?
    >>
    >> Maybe it doesn't need to be "adjusted" because it's in some global
    >> namespace?
    >>
    >> 3)Comment?
    >>
    >>
    >> Thanks
    >>
    >>
    >> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >> news:...
    >>> src="JavaScripts/OpenWindows.js"
    >>>
    >>> So the script must in a folder that is called JavaScripts and that is in
    >>> the same folder than the current ASPX page.

    >>
    >>
    >> See site map below. JavaScripts is in the root folder.
    >>
    >> The anchor calling openWindows is in the master.
    >>
    >> It work OK if the contents page is at root level but not with a contents
    >> page that is in a subfolder.
    >>
    >> I hope this makes more sense to you than it does to me.
    >>
    >> Any suggestions?
    >>
    >>>
    >>> You may want to try src="/JavaScripts/OpenWindows.js" so that it takes
    >>> the folder that is named JavaScripts and is at the root of the web
    >>> site...
    >>>
    >>> --
    >>> Patrice
    >>>
    >>> "AAaron123" <> a écrit dans le message de groupe
    >>> de discussion : ...
    >>>> In the master header I have
    >>>> <script type="text/javascript"
    >>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>
    >>>> OpenWindow.js contains the function openWindow
    >>>>
    >>>>
    >>>>
    >>>> In the body of the master I have
    >>>>
    >>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>
    >>>>
    >>>>
    >>>> When I click the anchor while the page showing is Default.aspx (which
    >>>> is at the root level as is .Master) the window opens OK.
    >>>>
    >>>> The folder JavaScripts is also at the root level and OpenWindow.js then
    >>>> one level below the root.
    >>>>
    >>>> If instead of showing Default.aspx which is at the root level I show
    >>>> the page Articles/Articles.aspx I find openWindow is undefined when I
    >>>> click the anchor.
    >>>>
    >>>> Do you see what is wrong?
    >>>>
    >>>> Thanks
    >>>>
    >>>>
    >>>>
    >>>> project
    >>>>
    >>>> Default.aspx
    >>>>
    >>>> Main.Master
    >>>>
    >>>> JavaScripts(folder)
    >>>>
    >>>> OpenWindow.js (contains function openWindow)
    >>>>
    >>>> Articles(folder)
    >>>>
    >>>> Articles.aspx
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>

    >>
    >>

    >
    AAaron123, Mar 16, 2009
    #3
  4. AAaron123

    AAaron123 Guest

    Since your last post I've been looking for my log file.
    I find I am running IIS 5.1 and see that IIS 7 is around.
    Is 5.1 OK for XP Pro?

    I searched for all IIS files on my machine and no log showed up.
    Following some Internet information I right clicked my website in IIS and
    looked for the web tab but there isn't one.
    So I haven't yet found the log file. I did want to check as you suggested
    last time.


    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > Is your web application at the root of your web site ?


    In vs2008 under Solution Explorer there is the solution and under that 3
    projects.
    Directly under one of them is the Default.aspx, web.config and Global.asax
    files.
    And the root is the last folder in that project title?
    This is the folder that show in IIS properties for this site.
    I'm not sure what defines the application but the above sounds like the
    answer is yes.
    Agree?



    > If your web application is the web site root you'll have to use
    > src="/MySubFolder/JavaScripts/OpenWindow.js".

    But (I hate saying "but") MySubFolder will be different on my machine and a
    host's machine - won't it?

    Thanks for sticking with this


    >
    > IMO your best best is to check the IIS log as you'll see what is requested
    > and if the file is found or not...
    >
    > --
    > Patrice
    >
    >
    > "AAaron123" <> a écrit dans le message de groupe
    > de discussion : ...
    >> If I do this in the master
    >> <script type="text/javascript" src="/JavaScripts/OpenWindow.js"></script>
    >>
    >> and this in the master
    >>
    >> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>
    >> I always get openWindow is undefined.
    >>
    >>
    >>
    >> I don't think I'll have a problem adjusting the Images folder
    >>
    >> but I don't know why it doesn't find openWindow.
    >>
    >>
    >>
    >> Thanks a lot
    >>
    >> ps
    >> Without the leading slash it works ok from Default.aspx which is in the
    >> root with the master
    >>
    >>
    >>
    >> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >> news:D...
    >>> src="MyFolder" means the folder that is under the current page location.
    >>> src="/MyFolder" points to a folder to is under the root.
    >>> The master page doesn't play any role here. This is not a separate page.
    >>> Its content is just merged with the current page (much like a user
    >>> control).
    >>>
    >>> You can also check this using the IIS log. You should see that your app
    >>> ask for a js file that doesn't exists...
    >>>
    >>> So you'll have to adjust the js file name. You'll have also the same
    >>> problem for the Images folder....
    >>>
    >>> The problem is that you are using relative paths so it depends where you
    >>> are and works only when you are at the root of your site. You should add
    >>> a leading / to use absolute paths...
    >>>
    >>> --
    >>> Patrice
    >>>
    >>> "AAaron123" <> a écrit dans le message de groupe
    >>> de discussion : #...
    >>>> I typed JavaScript in the site map below when I should have written
    >>>> JavaScripts. I revised it.
    >>>> JavaScripts is at the root level. Your suggestion did not work probably
    >>>> because of my typo.
    >>>>
    >>>> So it works when the page's .aspx is at root but not when the page is
    >>>> in a subfolder.
    >>>>
    >>>> When a master is merged with a contents page I think all the file
    >>>> descriptions are adjusted.
    >>>>
    >>>> 1)Right?
    >>>>
    >>>> However, I'd guess that the quoted string containing openWindow would
    >>>> not be adjusted.
    >>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>
    >>>> 2)Right?
    >>>>
    >>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>> namespace?
    >>>>
    >>>> 3)Comment?
    >>>>
    >>>>
    >>>> Thanks
    >>>>
    >>>>
    >>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>> news:...
    >>>>> src="JavaScripts/OpenWindows.js"
    >>>>>
    >>>>> So the script must in a folder that is called JavaScripts and that is
    >>>>> in the same folder than the current ASPX page.
    >>>>
    >>>>
    >>>> See site map below. JavaScripts is in the root folder.
    >>>>
    >>>> The anchor calling openWindows is in the master.
    >>>>
    >>>> It work OK if the contents page is at root level but not with a
    >>>> contents page that is in a subfolder.
    >>>>
    >>>> I hope this makes more sense to you than it does to me.
    >>>>
    >>>> Any suggestions?
    >>>>
    >>>>>
    >>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it takes
    >>>>> the folder that is named JavaScripts and is at the root of the web
    >>>>> site...
    >>>>>
    >>>>> --
    >>>>> Patrice
    >>>>>
    >>>>> "AAaron123" <> a écrit dans le message de
    >>>>> groupe de discussion : ...
    >>>>>> In the master header I have
    >>>>>> <script type="text/javascript"
    >>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>
    >>>>>> OpenWindow.js contains the function openWindow
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> In the body of the master I have
    >>>>>>
    >>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> When I click the anchor while the page showing is Default.aspx (which
    >>>>>> is at the root level as is .Master) the window opens OK.
    >>>>>>
    >>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>> then one level below the root.
    >>>>>>
    >>>>>> If instead of showing Default.aspx which is at the root level I show
    >>>>>> the page Articles/Articles.aspx I find openWindow is undefined when I
    >>>>>> click the anchor.
    >>>>>>
    >>>>>> Do you see what is wrong?
    >>>>>>
    >>>>>> Thanks
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> project
    >>>>>>
    >>>>>> Default.aspx
    >>>>>>
    >>>>>> Main.Master
    >>>>>>
    >>>>>> JavaScripts(folder)
    >>>>>>
    >>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>
    >>>>>> Articles(folder)
    >>>>>>
    >>>>>> Articles.aspx
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>

    >>
    >>

    >
    AAaron123, Mar 16, 2009
    #4
  5. AAaron123

    AAaron123 Guest

    Your suggestion to use
    "/MySubFolder/JavaScripts..." and
    "/MySubFolder/Images..."
    fixed it.

    But the Hosting site gave me a different folder name to use.

    Can't I capture that folder name and store it in a session variable?

    Would that be a good way to go?

    Thanks for all the help


    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > Is your web application at the root of your web site ? If your web
    > application is the web site root you'll have to use
    > src="/MySubFolder/JavaScripts/OpenWindow.js".
    >
    > IMO your best best is to check the IIS log as you'll see what is requested
    > and if the file is found or not...
    >
    > --
    > Patrice
    >
    >
    > "AAaron123" <> a écrit dans le message de groupe
    > de discussion : ...
    >> If I do this in the master
    >> <script type="text/javascript" src="/JavaScripts/OpenWindow.js"></script>
    >>
    >> and this in the master
    >>
    >> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>
    >> I always get openWindow is undefined.
    >>
    >>
    >>
    >> I don't think I'll have a problem adjusting the Images folder
    >>
    >> but I don't know why it doesn't find openWindow.
    >>
    >>
    >>
    >> Thanks a lot
    >>
    >> ps
    >> Without the leading slash it works ok from Default.aspx which is in the
    >> root with the master
    >>
    >>
    >>
    >> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >> news:D...
    >>> src="MyFolder" means the folder that is under the current page location.
    >>> src="/MyFolder" points to a folder to is under the root.
    >>> The master page doesn't play any role here. This is not a separate page.
    >>> Its content is just merged with the current page (much like a user
    >>> control).
    >>>
    >>> You can also check this using the IIS log. You should see that your app
    >>> ask for a js file that doesn't exists...
    >>>
    >>> So you'll have to adjust the js file name. You'll have also the same
    >>> problem for the Images folder....
    >>>
    >>> The problem is that you are using relative paths so it depends where you
    >>> are and works only when you are at the root of your site. You should add
    >>> a leading / to use absolute paths...
    >>>
    >>> --
    >>> Patrice
    >>>
    >>> "AAaron123" <> a écrit dans le message de groupe
    >>> de discussion : #...
    >>>> I typed JavaScript in the site map below when I should have written
    >>>> JavaScripts. I revised it.
    >>>> JavaScripts is at the root level. Your suggestion did not work probably
    >>>> because of my typo.
    >>>>
    >>>> So it works when the page's .aspx is at root but not when the page is
    >>>> in a subfolder.
    >>>>
    >>>> When a master is merged with a contents page I think all the file
    >>>> descriptions are adjusted.
    >>>>
    >>>> 1)Right?
    >>>>
    >>>> However, I'd guess that the quoted string containing openWindow would
    >>>> not be adjusted.
    >>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>
    >>>> 2)Right?
    >>>>
    >>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>> namespace?
    >>>>
    >>>> 3)Comment?
    >>>>
    >>>>
    >>>> Thanks
    >>>>
    >>>>
    >>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>> news:...
    >>>>> src="JavaScripts/OpenWindows.js"
    >>>>>
    >>>>> So the script must in a folder that is called JavaScripts and that is
    >>>>> in the same folder than the current ASPX page.
    >>>>
    >>>>
    >>>> See site map below. JavaScripts is in the root folder.
    >>>>
    >>>> The anchor calling openWindows is in the master.
    >>>>
    >>>> It work OK if the contents page is at root level but not with a
    >>>> contents page that is in a subfolder.
    >>>>
    >>>> I hope this makes more sense to you than it does to me.
    >>>>
    >>>> Any suggestions?
    >>>>
    >>>>>
    >>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it takes
    >>>>> the folder that is named JavaScripts and is at the root of the web
    >>>>> site...
    >>>>>
    >>>>> --
    >>>>> Patrice
    >>>>>
    >>>>> "AAaron123" <> a écrit dans le message de
    >>>>> groupe de discussion : ...
    >>>>>> In the master header I have
    >>>>>> <script type="text/javascript"
    >>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>
    >>>>>> OpenWindow.js contains the function openWindow
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> In the body of the master I have
    >>>>>>
    >>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> When I click the anchor while the page showing is Default.aspx (which
    >>>>>> is at the root level as is .Master) the window opens OK.
    >>>>>>
    >>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>> then one level below the root.
    >>>>>>
    >>>>>> If instead of showing Default.aspx which is at the root level I show
    >>>>>> the page Articles/Articles.aspx I find openWindow is undefined when I
    >>>>>> click the anchor.
    >>>>>>
    >>>>>> Do you see what is wrong?
    >>>>>>
    >>>>>> Thanks
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> project
    >>>>>>
    >>>>>> Default.aspx
    >>>>>>
    >>>>>> Main.Master
    >>>>>>
    >>>>>> JavaScripts(folder)
    >>>>>>
    >>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>
    >>>>>> Articles(folder)
    >>>>>>
    >>>>>> Articles.aspx
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>

    >>
    >>

    >
    AAaron123, Mar 16, 2009
    #5
  6. AAaron123

    miher Guest

    Hi,

    Try to add the reference in code by putting this line into Your master pages
    Load instead of the <script> block in Your markup:

    Page.ClientScript.RegisterClientScriptInclude(GetType(), "scripts",
    ResolveClientUrl("~/JavaScripts/OpenWindow.js"));

    Hope You find this useful.
    -Zsolt


    "AAaron123" <> wrote in message
    news:eu#rH#...
    > Your suggestion to use
    > "/MySubFolder/JavaScripts..." and
    > "/MySubFolder/Images..."
    > fixed it.
    >
    > But the Hosting site gave me a different folder name to use.
    >
    > Can't I capture that folder name and store it in a session variable?
    >
    > Would that be a good way to go?
    >
    > Thanks for all the help
    >
    >
    > "Patrice" <http://www.chez.com/scribe/> wrote in message
    > news:...
    >> Is your web application at the root of your web site ? If your web
    >> application is the web site root you'll have to use
    >> src="/MySubFolder/JavaScripts/OpenWindow.js".
    >>
    >> IMO your best best is to check the IIS log as you'll see what is
    >> requested and if the file is found or not...
    >>
    >> --
    >> Patrice
    >>
    >>
    >> "AAaron123" <> a écrit dans le message de groupe
    >> de discussion : ...
    >>> If I do this in the master
    >>> <script type="text/javascript"
    >>> src="/JavaScripts/OpenWindow.js"></script>
    >>>
    >>> and this in the master
    >>>
    >>> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>>
    >>> I always get openWindow is undefined.
    >>>
    >>>
    >>>
    >>> I don't think I'll have a problem adjusting the Images folder
    >>>
    >>> but I don't know why it doesn't find openWindow.
    >>>
    >>>
    >>>
    >>> Thanks a lot
    >>>
    >>> ps
    >>> Without the leading slash it works ok from Default.aspx which is in the
    >>> root with the master
    >>>
    >>>
    >>>
    >>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>> news:D...
    >>>> src="MyFolder" means the folder that is under the current page
    >>>> location. src="/MyFolder" points to a folder to is under the root.
    >>>> The master page doesn't play any role here. This is not a separate
    >>>> page. Its content is just merged with the current page (much like a
    >>>> user control).
    >>>>
    >>>> You can also check this using the IIS log. You should see that your app
    >>>> ask for a js file that doesn't exists...
    >>>>
    >>>> So you'll have to adjust the js file name. You'll have also the same
    >>>> problem for the Images folder....
    >>>>
    >>>> The problem is that you are using relative paths so it depends where
    >>>> you are and works only when you are at the root of your site. You
    >>>> should add a leading / to use absolute paths...
    >>>>
    >>>> --
    >>>> Patrice
    >>>>
    >>>> "AAaron123" <> a écrit dans le message de
    >>>> groupe de discussion : #...
    >>>>> I typed JavaScript in the site map below when I should have written
    >>>>> JavaScripts. I revised it.
    >>>>> JavaScripts is at the root level. Your suggestion did not work
    >>>>> probably because of my typo.
    >>>>>
    >>>>> So it works when the page's .aspx is at root but not when the page is
    >>>>> in a subfolder.
    >>>>>
    >>>>> When a master is merged with a contents page I think all the file
    >>>>> descriptions are adjusted.
    >>>>>
    >>>>> 1)Right?
    >>>>>
    >>>>> However, I'd guess that the quoted string containing openWindow would
    >>>>> not be adjusted.
    >>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>>
    >>>>> 2)Right?
    >>>>>
    >>>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>>> namespace?
    >>>>>
    >>>>> 3)Comment?
    >>>>>
    >>>>>
    >>>>> Thanks
    >>>>>
    >>>>>
    >>>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>>> news:...
    >>>>>> src="JavaScripts/OpenWindows.js"
    >>>>>>
    >>>>>> So the script must in a folder that is called JavaScripts and that is
    >>>>>> in the same folder than the current ASPX page.
    >>>>>
    >>>>>
    >>>>> See site map below. JavaScripts is in the root folder.
    >>>>>
    >>>>> The anchor calling openWindows is in the master.
    >>>>>
    >>>>> It work OK if the contents page is at root level but not with a
    >>>>> contents page that is in a subfolder.
    >>>>>
    >>>>> I hope this makes more sense to you than it does to me.
    >>>>>
    >>>>> Any suggestions?
    >>>>>
    >>>>>>
    >>>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it
    >>>>>> takes the folder that is named JavaScripts and is at the root of the
    >>>>>> web site...
    >>>>>>
    >>>>>> --
    >>>>>> Patrice
    >>>>>>
    >>>>>> "AAaron123" <> a écrit dans le message de
    >>>>>> groupe de discussion : ...
    >>>>>>> In the master header I have
    >>>>>>> <script type="text/javascript"
    >>>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>>
    >>>>>>> OpenWindow.js contains the function openWindow
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> In the body of the master I have
    >>>>>>>
    >>>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> When I click the anchor while the page showing is Default.aspx
    >>>>>>> (which is at the root level as is .Master) the window opens OK.
    >>>>>>>
    >>>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>>> then one level below the root.
    >>>>>>>
    >>>>>>> If instead of showing Default.aspx which is at the root level I show
    >>>>>>> the page Articles/Articles.aspx I find openWindow is undefined when
    >>>>>>> I click the anchor.
    >>>>>>>
    >>>>>>> Do you see what is wrong?
    >>>>>>>
    >>>>>>> Thanks
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> project
    >>>>>>>
    >>>>>>> Default.aspx
    >>>>>>>
    >>>>>>> Main.Master
    >>>>>>>
    >>>>>>> JavaScripts(folder)
    >>>>>>>
    >>>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>>
    >>>>>>> Articles(folder)
    >>>>>>>
    >>>>>>> Articles.aspx
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>
    >>>

    >>

    >
    >
    miher, Mar 17, 2009
    #6
  7. AAaron123

    AAaron123 Guest

    Trying to make /MySubFolder/ work at the hosting and debugging sessions I
    tried to use Request.ApplicationPath.

    What can I put in the head?

    I tried
    <script type="text/javascript">

    function rootDir()

    {

    return '<%=ResolveUrl(Request.ApplicationPath)%>';

    //return '<%=Request.ApplicationPath%>';

    }

    </script >

    <script type="text/javascript" src= rootDir() +
    "/JavaScripts/OpenWindow.js"></script>

    But that didn't work.

    So I move to Global.asax

    setting a session variable to Request.ApplicationPathand tried

    <script type="text/javascript" src= Session("RootDir") +
    "/JavaScripts/OpenWindow.js"></script>

    But that didn't work either.

    Does the head have to have only nonexecutable markup?





    Thanks

    I'm not sure if I mentioned it in a previous post but your suggestion did
    work for me on my debugging station. Now I want to make it general so that
    it work at the hosting site as well.



    "Patrice" <http://www.chez.com/scribe/> wrote in message
    news:...
    > Is your web application at the root of your web site ? If your web
    > application is the web site root you'll have to use
    > src="/MySubFolder/JavaScripts/OpenWindow.js".
    >
    > IMO your best best is to check the IIS log as you'll see what is requested
    > and if the file is found or not...
    >
    > --
    > Patrice
    >
    >
    > "AAaron123" <> a écrit dans le message de groupe
    > de discussion : ...
    >> If I do this in the master
    >> <script type="text/javascript" src="/JavaScripts/OpenWindow.js"></script>
    >>
    >> and this in the master
    >>
    >> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>
    >> I always get openWindow is undefined.
    >>
    >>
    >>
    >> I don't think I'll have a problem adjusting the Images folder
    >>
    >> but I don't know why it doesn't find openWindow.
    >>
    >>
    >>
    >> Thanks a lot
    >>
    >> ps
    >> Without the leading slash it works ok from Default.aspx which is in the
    >> root with the master
    >>
    >>
    >>
    >> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >> news:D...
    >>> src="MyFolder" means the folder that is under the current page location.
    >>> src="/MyFolder" points to a folder to is under the root.
    >>> The master page doesn't play any role here. This is not a separate page.
    >>> Its content is just merged with the current page (much like a user
    >>> control).
    >>>
    >>> You can also check this using the IIS log. You should see that your app
    >>> ask for a js file that doesn't exists...
    >>>
    >>> So you'll have to adjust the js file name. You'll have also the same
    >>> problem for the Images folder....
    >>>
    >>> The problem is that you are using relative paths so it depends where you
    >>> are and works only when you are at the root of your site. You should add
    >>> a leading / to use absolute paths...
    >>>
    >>> --
    >>> Patrice
    >>>
    >>> "AAaron123" <> a écrit dans le message de groupe
    >>> de discussion : #...
    >>>> I typed JavaScript in the site map below when I should have written
    >>>> JavaScripts. I revised it.
    >>>> JavaScripts is at the root level. Your suggestion did not work probably
    >>>> because of my typo.
    >>>>
    >>>> So it works when the page's .aspx is at root but not when the page is
    >>>> in a subfolder.
    >>>>
    >>>> When a master is merged with a contents page I think all the file
    >>>> descriptions are adjusted.
    >>>>
    >>>> 1)Right?
    >>>>
    >>>> However, I'd guess that the quoted string containing openWindow would
    >>>> not be adjusted.
    >>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>
    >>>> 2)Right?
    >>>>
    >>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>> namespace?
    >>>>
    >>>> 3)Comment?
    >>>>
    >>>>
    >>>> Thanks
    >>>>
    >>>>
    >>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>> news:...
    >>>>> src="JavaScripts/OpenWindows.js"
    >>>>>
    >>>>> So the script must in a folder that is called JavaScripts and that is
    >>>>> in the same folder than the current ASPX page.
    >>>>
    >>>>
    >>>> See site map below. JavaScripts is in the root folder.
    >>>>
    >>>> The anchor calling openWindows is in the master.
    >>>>
    >>>> It work OK if the contents page is at root level but not with a
    >>>> contents page that is in a subfolder.
    >>>>
    >>>> I hope this makes more sense to you than it does to me.
    >>>>
    >>>> Any suggestions?
    >>>>
    >>>>>
    >>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it takes
    >>>>> the folder that is named JavaScripts and is at the root of the web
    >>>>> site...
    >>>>>
    >>>>> --
    >>>>> Patrice
    >>>>>
    >>>>> "AAaron123" <> a écrit dans le message de
    >>>>> groupe de discussion : ...
    >>>>>> In the master header I have
    >>>>>> <script type="text/javascript"
    >>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>
    >>>>>> OpenWindow.js contains the function openWindow
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> In the body of the master I have
    >>>>>>
    >>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> When I click the anchor while the page showing is Default.aspx (which
    >>>>>> is at the root level as is .Master) the window opens OK.
    >>>>>>
    >>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>> then one level below the root.
    >>>>>>
    >>>>>> If instead of showing Default.aspx which is at the root level I show
    >>>>>> the page Articles/Articles.aspx I find openWindow is undefined when I
    >>>>>> click the anchor.
    >>>>>>
    >>>>>> Do you see what is wrong?
    >>>>>>
    >>>>>> Thanks
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> project
    >>>>>>
    >>>>>> Default.aspx
    >>>>>>
    >>>>>> Main.Master
    >>>>>>
    >>>>>> JavaScripts(folder)
    >>>>>>
    >>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>
    >>>>>> Articles(folder)
    >>>>>>
    >>>>>> Articles.aspx
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>

    >>
    >>

    >
    AAaron123, Mar 17, 2009
    #7
  8. AAaron123

    AAaron123 Guest

    Boy, that looks the simplest of all. First I want to get my present approach
    working then I'll try this.

    Thanks a lot

    "miher" <> wrote in message
    news:...
    > Hi,
    >
    > Try to add the reference in code by putting this line into Your master
    > pages Load instead of the <script> block in Your markup:
    >
    > Page.ClientScript.RegisterClientScriptInclude(GetType(), "scripts",
    > ResolveClientUrl("~/JavaScripts/OpenWindow.js"));
    >
    > Hope You find this useful.
    > -Zsolt
    >
    >
    > "AAaron123" <> wrote in message
    > news:eu#rH#...
    >> Your suggestion to use
    >> "/MySubFolder/JavaScripts..." and
    >> "/MySubFolder/Images..."
    >> fixed it.
    >>
    >> But the Hosting site gave me a different folder name to use.
    >>
    >> Can't I capture that folder name and store it in a session variable?
    >>
    >> Would that be a good way to go?
    >>
    >> Thanks for all the help
    >>
    >>
    >> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >> news:...
    >>> Is your web application at the root of your web site ? If your web
    >>> application is the web site root you'll have to use
    >>> src="/MySubFolder/JavaScripts/OpenWindow.js".
    >>>
    >>> IMO your best best is to check the IIS log as you'll see what is
    >>> requested and if the file is found or not...
    >>>
    >>> --
    >>> Patrice
    >>>
    >>>
    >>> "AAaron123" <> a écrit dans le message de groupe
    >>> de discussion : ...
    >>>> If I do this in the master
    >>>> <script type="text/javascript"
    >>>> src="/JavaScripts/OpenWindow.js"></script>
    >>>>
    >>>> and this in the master
    >>>>
    >>>> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>>>
    >>>> I always get openWindow is undefined.
    >>>>
    >>>>
    >>>>
    >>>> I don't think I'll have a problem adjusting the Images folder
    >>>>
    >>>> but I don't know why it doesn't find openWindow.
    >>>>
    >>>>
    >>>>
    >>>> Thanks a lot
    >>>>
    >>>> ps
    >>>> Without the leading slash it works ok from Default.aspx which is in the
    >>>> root with the master
    >>>>
    >>>>
    >>>>
    >>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>> news:D...
    >>>>> src="MyFolder" means the folder that is under the current page
    >>>>> location. src="/MyFolder" points to a folder to is under the root.
    >>>>> The master page doesn't play any role here. This is not a separate
    >>>>> page. Its content is just merged with the current page (much like a
    >>>>> user control).
    >>>>>
    >>>>> You can also check this using the IIS log. You should see that your
    >>>>> app ask for a js file that doesn't exists...
    >>>>>
    >>>>> So you'll have to adjust the js file name. You'll have also the same
    >>>>> problem for the Images folder....
    >>>>>
    >>>>> The problem is that you are using relative paths so it depends where
    >>>>> you are and works only when you are at the root of your site. You
    >>>>> should add a leading / to use absolute paths...
    >>>>>
    >>>>> --
    >>>>> Patrice
    >>>>>
    >>>>> "AAaron123" <> a écrit dans le message de
    >>>>> groupe de discussion : #...
    >>>>>> I typed JavaScript in the site map below when I should have written
    >>>>>> JavaScripts. I revised it.
    >>>>>> JavaScripts is at the root level. Your suggestion did not work
    >>>>>> probably because of my typo.
    >>>>>>
    >>>>>> So it works when the page's .aspx is at root but not when the page is
    >>>>>> in a subfolder.
    >>>>>>
    >>>>>> When a master is merged with a contents page I think all the file
    >>>>>> descriptions are adjusted.
    >>>>>>
    >>>>>> 1)Right?
    >>>>>>
    >>>>>> However, I'd guess that the quoted string containing openWindow would
    >>>>>> not be adjusted.
    >>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>>>
    >>>>>> 2)Right?
    >>>>>>
    >>>>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>>>> namespace?
    >>>>>>
    >>>>>> 3)Comment?
    >>>>>>
    >>>>>>
    >>>>>> Thanks
    >>>>>>
    >>>>>>
    >>>>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>>>> news:...
    >>>>>>> src="JavaScripts/OpenWindows.js"
    >>>>>>>
    >>>>>>> So the script must in a folder that is called JavaScripts and that
    >>>>>>> is in the same folder than the current ASPX page.
    >>>>>>
    >>>>>>
    >>>>>> See site map below. JavaScripts is in the root folder.
    >>>>>>
    >>>>>> The anchor calling openWindows is in the master.
    >>>>>>
    >>>>>> It work OK if the contents page is at root level but not with a
    >>>>>> contents page that is in a subfolder.
    >>>>>>
    >>>>>> I hope this makes more sense to you than it does to me.
    >>>>>>
    >>>>>> Any suggestions?
    >>>>>>
    >>>>>>>
    >>>>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it
    >>>>>>> takes the folder that is named JavaScripts and is at the root of the
    >>>>>>> web site...
    >>>>>>>
    >>>>>>> --
    >>>>>>> Patrice
    >>>>>>>
    >>>>>>> "AAaron123" <> a écrit dans le message de
    >>>>>>> groupe de discussion : ...
    >>>>>>>> In the master header I have
    >>>>>>>> <script type="text/javascript"
    >>>>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>>>
    >>>>>>>> OpenWindow.js contains the function openWindow
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> In the body of the master I have
    >>>>>>>>
    >>>>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> When I click the anchor while the page showing is Default.aspx
    >>>>>>>> (which is at the root level as is .Master) the window opens OK.
    >>>>>>>>
    >>>>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>>>> then one level below the root.
    >>>>>>>>
    >>>>>>>> If instead of showing Default.aspx which is at the root level I
    >>>>>>>> show the page Articles/Articles.aspx I find openWindow is undefined
    >>>>>>>> when I click the anchor.
    >>>>>>>>
    >>>>>>>> Do you see what is wrong?
    >>>>>>>>
    >>>>>>>> Thanks
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> project
    >>>>>>>>
    >>>>>>>> Default.aspx
    >>>>>>>>
    >>>>>>>> Main.Master
    >>>>>>>>
    >>>>>>>> JavaScripts(folder)
    >>>>>>>>
    >>>>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>>>
    >>>>>>>> Articles(folder)
    >>>>>>>>
    >>>>>>>> Articles.aspx
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>

    >>
    >>
    AAaron123, Mar 17, 2009
    #8
  9. AAaron123

    AAaron123 Guest

    I seem to be stuck in coming up with a way to register the script in the
    head so that it works in my debug machine and in the hosting service so I
    tried your approach and it appears to work well. I only tried it on my
    machine but it appears that it should work on the host.

    I think GetType() in your code is not sufficient. I used Page.GetType()
    because of something in the msdn docs.

    Thanks


    "AAaron123" <> wrote in message
    news:...
    > Boy, that looks the simplest of all. First I want to get my present
    > approach working then I'll try this.
    >
    > Thanks a lot
    >
    > "miher" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> Try to add the reference in code by putting this line into Your master
    >> pages Load instead of the <script> block in Your markup:
    >>
    >> Page.ClientScript.RegisterClientScriptInclude(GetType(), "scripts",
    >> ResolveClientUrl("~/JavaScripts/OpenWindow.js"));
    >>
    >> Hope You find this useful.
    >> -Zsolt
    >>
    >>
    >> "AAaron123" <> wrote in message
    >> news:eu#rH#...
    >>> Your suggestion to use
    >>> "/MySubFolder/JavaScripts..." and
    >>> "/MySubFolder/Images..."
    >>> fixed it.
    >>>
    >>> But the Hosting site gave me a different folder name to use.
    >>>
    >>> Can't I capture that folder name and store it in a session variable?
    >>>
    >>> Would that be a good way to go?
    >>>
    >>> Thanks for all the help
    >>>
    >>>
    >>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>> news:...
    >>>> Is your web application at the root of your web site ? If your web
    >>>> application is the web site root you'll have to use
    >>>> src="/MySubFolder/JavaScripts/OpenWindow.js".
    >>>>
    >>>> IMO your best best is to check the IIS log as you'll see what is
    >>>> requested and if the file is found or not...
    >>>>
    >>>> --
    >>>> Patrice
    >>>>
    >>>>
    >>>> "AAaron123" <> a écrit dans le message de
    >>>> groupe de discussion : ...
    >>>>> If I do this in the master
    >>>>> <script type="text/javascript"
    >>>>> src="/JavaScripts/OpenWindow.js"></script>
    >>>>>
    >>>>> and this in the master
    >>>>>
    >>>>> <a href="JavaScript:eek:penWindow('Aerial','Ima
    >>>>>
    >>>>> I always get openWindow is undefined.
    >>>>>
    >>>>>
    >>>>>
    >>>>> I don't think I'll have a problem adjusting the Images folder
    >>>>>
    >>>>> but I don't know why it doesn't find openWindow.
    >>>>>
    >>>>>
    >>>>>
    >>>>> Thanks a lot
    >>>>>
    >>>>> ps
    >>>>> Without the leading slash it works ok from Default.aspx which is in
    >>>>> the root with the master
    >>>>>
    >>>>>
    >>>>>
    >>>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>>> news:D...
    >>>>>> src="MyFolder" means the folder that is under the current page
    >>>>>> location. src="/MyFolder" points to a folder to is under the root.
    >>>>>> The master page doesn't play any role here. This is not a separate
    >>>>>> page. Its content is just merged with the current page (much like a
    >>>>>> user control).
    >>>>>>
    >>>>>> You can also check this using the IIS log. You should see that your
    >>>>>> app ask for a js file that doesn't exists...
    >>>>>>
    >>>>>> So you'll have to adjust the js file name. You'll have also the same
    >>>>>> problem for the Images folder....
    >>>>>>
    >>>>>> The problem is that you are using relative paths so it depends where
    >>>>>> you are and works only when you are at the root of your site. You
    >>>>>> should add a leading / to use absolute paths...
    >>>>>>
    >>>>>> --
    >>>>>> Patrice
    >>>>>>
    >>>>>> "AAaron123" <> a écrit dans le message de
    >>>>>> groupe de discussion : #...
    >>>>>>> I typed JavaScript in the site map below when I should have written
    >>>>>>> JavaScripts. I revised it.
    >>>>>>> JavaScripts is at the root level. Your suggestion did not work
    >>>>>>> probably because of my typo.
    >>>>>>>
    >>>>>>> So it works when the page's .aspx is at root but not when the page
    >>>>>>> is in a subfolder.
    >>>>>>>
    >>>>>>> When a master is merged with a contents page I think all the file
    >>>>>>> descriptions are adjusted.
    >>>>>>>
    >>>>>>> 1)Right?
    >>>>>>>
    >>>>>>> However, I'd guess that the quoted string containing openWindow
    >>>>>>> would not be adjusted.
    >>>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip..
    >>>>>>>
    >>>>>>> 2)Right?
    >>>>>>>
    >>>>>>> Maybe it doesn't need to be "adjusted" because it's in some global
    >>>>>>> namespace?
    >>>>>>>
    >>>>>>> 3)Comment?
    >>>>>>>
    >>>>>>>
    >>>>>>> Thanks
    >>>>>>>
    >>>>>>>
    >>>>>>> "Patrice" <http://www.chez.com/scribe/> wrote in message
    >>>>>>> news:...
    >>>>>>>> src="JavaScripts/OpenWindows.js"
    >>>>>>>>
    >>>>>>>> So the script must in a folder that is called JavaScripts and that
    >>>>>>>> is in the same folder than the current ASPX page.
    >>>>>>>
    >>>>>>>
    >>>>>>> See site map below. JavaScripts is in the root folder.
    >>>>>>>
    >>>>>>> The anchor calling openWindows is in the master.
    >>>>>>>
    >>>>>>> It work OK if the contents page is at root level but not with a
    >>>>>>> contents page that is in a subfolder.
    >>>>>>>
    >>>>>>> I hope this makes more sense to you than it does to me.
    >>>>>>>
    >>>>>>> Any suggestions?
    >>>>>>>
    >>>>>>>>
    >>>>>>>> You may want to try src="/JavaScripts/OpenWindows.js" so that it
    >>>>>>>> takes the folder that is named JavaScripts and is at the root of
    >>>>>>>> the web site...
    >>>>>>>>
    >>>>>>>> --
    >>>>>>>> Patrice
    >>>>>>>>
    >>>>>>>> "AAaron123" <> a écrit dans le message de
    >>>>>>>> groupe de discussion : ...
    >>>>>>>>> In the master header I have
    >>>>>>>>> <script type="text/javascript"
    >>>>>>>>> src="JavaScripts\OpenWindow.js"></script>
    >>>>>>>>>
    >>>>>>>>> OpenWindow.js contains the function openWindow
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>> In the body of the master I have
    >>>>>>>>>
    >>>>>>>>> <a href="JavaScript:eek:penWindow('Aerial','Images/Aer..snip
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>> When I click the anchor while the page showing is Default.aspx
    >>>>>>>>> (which is at the root level as is .Master) the window opens OK.
    >>>>>>>>>
    >>>>>>>>> The folder JavaScripts is also at the root level and OpenWindow.js
    >>>>>>>>> then one level below the root.
    >>>>>>>>>
    >>>>>>>>> If instead of showing Default.aspx which is at the root level I
    >>>>>>>>> show the page Articles/Articles.aspx I find openWindow is
    >>>>>>>>> undefined when I click the anchor.
    >>>>>>>>>
    >>>>>>>>> Do you see what is wrong?
    >>>>>>>>>
    >>>>>>>>> Thanks
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>> project
    >>>>>>>>>
    >>>>>>>>> Default.aspx
    >>>>>>>>>
    >>>>>>>>> Main.Master
    >>>>>>>>>
    >>>>>>>>> JavaScripts(folder)
    >>>>>>>>>
    >>>>>>>>> OpenWindow.js (contains function openWindow)
    >>>>>>>>>
    >>>>>>>>> Articles(folder)
    >>>>>>>>>
    >>>>>>>>> Articles.aspx
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>
    >>>

    >
    >
    AAaron123, Mar 17, 2009
    #9
  10. AAaron123

    AAaron123 Guest

    I just want to say I've used various suggestions in this thread from all
    three of you in various places in my code and everything appears to be
    working find now.


    Thanks
    AAaron123, Mar 18, 2009
    #10
    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. vizlab
    Replies:
    3
    Views:
    4,202
    Michael Bar-Sinai
    Oct 17, 2007
  2. Replies:
    9
    Views:
    970
    Juha Nieminen
    Aug 22, 2007
  3. Stef Mientki

    and becomes or and or becomes and

    Stef Mientki, May 22, 2011, in forum: Python
    Replies:
    9
    Views:
    313
    Chris Angelico
    May 28, 2011
  4. Replies:
    15
    Views:
    175
    Brian McCauley
    Sep 23, 2007
  5. Taylor Venable

    variable bewilderingly becomes undefined

    Taylor Venable, Oct 17, 2007, in forum: Perl Misc
    Replies:
    14
    Views:
    167
    Taylor Venable
    Oct 18, 2007
Loading...

Share This Page