why doesn't JavaScript work in ASP.NET? / refreshing a page?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: why doesn't JavaScript work in ASP.NET? / refreshing a page?

    Client side javascript hasn't changed - so there is something wrong with
    your javascript.

    Try using a meta refresh tag to do the refresh.

    <meta http-equiv="refresh" content="1000">

    "Laszlo Szijarto" <lszijarto@nospam.mrdoc.cc> wrote in message
    news:eCdwsc$PDHA.560@TK2MSFTNGP10.phx.gbl...
    > Thank you in advance for your help.
    >
    > I have the following client-side script in the HTML of my .aspx page --
    >
    > <script language="javascript">
    > setTimeOut('document.location=document.location',1 000);
    > </script>
    >
    > I get an error "Object expected" by the JScript debugger.
    >
    > What the heck? I'm specifying this is JavaScript. Is this more Microsoft
    > Anti-Trust nonsense?
    >
    > Can anyone help me?
    >
    > I'm trying to get a page to refresh every second. Is there a better way
    to
    > do this in ASP.NET? I really only need to refresh a particular label's
    > text.
    >
    > Thank you in advance,
    > Laszlo
    >
    >

    Marina Guest

  2. Similar Questions and Discussions

    1. Programmatically Refreshing the Page
      One thing that I have often needed to do that I have been unable to find a way to do is refresh the page (basically do the same thing as pressing...
    2. refreshing page...
      I have page that is opened in a small window and after a user submits the form on that page I want the window to close and then refresh the page...
    3. Refreshing a Page
      I have a menu that calls a specific asp page and passes a variable data1page.asp?year=2001 where the value of the year variable is determined...
    4. Web Page Refreshing...
      I was just wondering... Our company must use a web site for order information from one of our customers. They place an order on the web site and...
    5. Refreshing the page
      I was wondering if there is any way through for instance getURL(), to refresh the current page? (Like the page the SWF is currently included on.)...
  3. #2

    Default Re: why doesn't JavaScript work in ASP.NET? / refreshing a page?

    OK, thank you, Marina,

    I found my problem -- it should be setTimeout, not setTimeOut.

    The latter works in IE, but I guess VS.NET enforces more strictly -- except
    that when I typed the opening parenthesis, it showed the function prototype,
    as if it understood setTimeOut( -- but I guess it was tricking me.

    Thank you,
    Laszlo

    "Marina" <zlatkinam@nospam.hotmail.com> wrote in message
    news:uTxBkf$PDHA.2248@TK2MSFTNGP11.phx.gbl...
    > Client side javascript hasn't changed - so there is something wrong with
    > your javascript.
    >
    > Try using a meta refresh tag to do the refresh.
    >
    > <meta http-equiv="refresh" content="1000">
    >
    > "Laszlo Szijarto" <lszijarto@nospam.mrdoc.cc> wrote in message
    > news:eCdwsc$PDHA.560@TK2MSFTNGP10.phx.gbl...
    > > Thank you in advance for your help.
    > >
    > > I have the following client-side script in the HTML of my .aspx page --
    > >
    > > <script language="javascript">
    > > setTimeOut('document.location=document.location',1 000);
    > > </script>
    > >
    > > I get an error "Object expected" by the JScript debugger.
    > >
    > > What the heck? I'm specifying this is JavaScript. Is this more
    Microsoft
    > > Anti-Trust nonsense?
    > >
    > > Can anyone help me?
    > >
    > > I'm trying to get a page to refresh every second. Is there a better way
    > to
    > > do this in ASP.NET? I really only need to refresh a particular label's
    > > text.
    > >
    > > Thank you in advance,
    > > Laszlo
    > >
    > >
    >
    >

    Laszlo Szijarto 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