Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. AJAX Timer causes javascript error on page

AJAX Timer causes javascript error on page

Scheduled Pinned Locked Moved ASP.NET
javascriptdesignhelpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Steve Holdorf
    wrote on last edited by
    #1

    I have an AJAX asp:Timer that when added to my LogView.aspx page causes a javascript error in the browser: Expected ';' Default.aspx Line: 963 Code:0 First, the page that is being displayed in LogView.aspx and not Default.aspx. Also there is no javascript on my LogView.aspx page:

    The code behind is: protected void Timer1_Tick(object sender, EventArg e) { TextBox1.Text = "Hello"; } Also, when run the Timer event is never called. I did a view source and the error line shows where the onLoad () System.Application.add.init(function () {$create(Sys.UI._Timer, ... This is confusing. Any Ideas? Thanks, Steve Holdorf

    D 1 Reply Last reply
    0
    • S Steve Holdorf

      I have an AJAX asp:Timer that when added to my LogView.aspx page causes a javascript error in the browser: Expected ';' Default.aspx Line: 963 Code:0 First, the page that is being displayed in LogView.aspx and not Default.aspx. Also there is no javascript on my LogView.aspx page:

      The code behind is: protected void Timer1_Tick(object sender, EventArg e) { TextBox1.Text = "Hello"; } Also, when run the Timer event is never called. I did a view source and the error line shows where the onLoad () System.Application.add.init(function () {$create(Sys.UI._Timer, ... This is confusing. Any Ideas? Thanks, Steve Holdorf

      D Offline
      D Offline
      dusty_dex
      wrote on last edited by
      #2

      Try using proper closing tags instead of using /> on a single tag. ajax-timer-ontick-event-how-to-use.html

      "It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.

      S 1 Reply Last reply
      0
      • D dusty_dex

        Try using proper closing tags instead of using /> on a single tag. ajax-timer-ontick-event-how-to-use.html

        "It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.

        S Offline
        S Offline
        Steve Holdorf
        wrote on last edited by
        #3

        Thanks for your help. I did try both ways and still the javascript error. Again thanks!!!! Steve Holdorf

        D 1 Reply Last reply
        0
        • S Steve Holdorf

          Thanks for your help. I did try both ways and still the javascript error. Again thanks!!!! Steve Holdorf

          D Offline
          D Offline
          dusty_dex
          wrote on last edited by
          #4

          What language is the ASP page coded with, C#? I just wonder what's being sent to the browser, like an erroneous block of C#.

          "It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.

          S 1 Reply Last reply
          0
          • D dusty_dex

            What language is the ASP page coded with, C#? I just wonder what's being sent to the browser, like an erroneous block of C#.

            "It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan That's what machines are for. Got a problem? Sleep on it.

            S Offline
            S Offline
            Steve Holdorf
            wrote on last edited by
            #5

            It is writen in C#. When the ajax timer is removed from the page no javascript errors occur. The timer event is correct and on compile no build errors. Thanks, Steve Holdorf

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups