dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] javascript problem on IE10 - onclick()

  1. #1
    Join Date
    Oct 2013
    Posts
    2

    resolved [RESOLVED] javascript problem on IE10 - onclick()

    hi guys. im new in this forum.
    i have this problem. my javascript is acting strange on IE10.
    i have this code.(please see below). i simply wants it to refresh the page. but transfer to different page. can anyone help me? is document.location is no longer supported on IE10?



    *****************

    .Write("<button id=""btnRefresh"" class=""exButton"" type=""button"" onclick=""document.location='Home.aspx?re_" & sControlUniqueID & _
    "=1';"" onmouseover=""this.className='exButtonOver'"" onmouseout=""this.className='exButton'"" onmousedown=""this.className='exButtonDown'""> " & _
    env.Term.String(8746, "Refresh") & " </button>")

    *****************

    thanks for the help.

  2. #2
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,671
    this is not a browser problem, check your syntax

  3. #3
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,774
    It looks like the original poster's code is Visual Basic generating some HTML, or some other server side templating language. Either way, can you post the HTML source code given to the browser instead of the server side template code? I think that will provide a clue.

    Also, if you are getting a JavaScript error, can you post that as well?

  4. #4
    Join Date
    Oct 2013
    Posts
    2
    its a function that is called. the fact that i dont write this code, the previous programmer did. please see below for the code.


    Dim sw As New System.IO.StringWriter()

    CheckParameter(env, "env")

    Dim writer As New System.Web.UI.HtmlTextWriter(sw)
    With writer
    .WriteBeginTag("div")
    .WriteAttribute("id", sControlUniqueID & "_Pivot")
    .WriteAttribute("style", "border-bottom 0px;" & _
    "border-left:0px;border-right:0px;border-top:0px;" & _
    "margin:0px;width:100%;")
    .Write(System.Web.UI.HtmlTextWriter.TagRightChar)
    .WriteBeginTag("table")
    .WriteAttribute("width", "100%")
    .Write(System.Web.UI.HtmlTextWriter.TagRightChar)
    .WriteFullBeginTag("tr")
    .WriteFullBeginTag("td")
    If Not bUXMode Then
    '.Write("<button id=""btnRefresh"" class=""exButton"" type=""button"" onclick=""alert('test');"" onmouseover=""this.className='exButtonOver'"" onmouseout=""this.className='exButton'"" onmousedown=""this.className='exButtonDown'""> " & _
    'env.Term.String(8746, "Refreshs") & " </button>")

    '.Write("<button id=""btnRefresh"" class=""exButton"" type=""button"" onclick=""document.location='dashboardese.aspx?id=" & sControlUniqueID & "DBAction=1&EditorZone$AppearanceEditor$ctl01=False&EditorZone$AppearanceEditor$ctl02=False&EditorZo ne$AppearanceEditor$ctl04=1&EditorZone$AppearanceEditor$ctl06=1&EditorZone$AppearanceEditor$ctl07=-1&EditorZone$AppearanceEditor$ctl08=False';"" onmouseover=""this.className='exButtonOver'"" onmouseout=""this.className='exButton'"" onmousedown=""this.className='exButtonDown'""> " & _
    'env.Term.String(8746, "Refreshs") & " </button>")

    .Write("<button id=""btnRefresh"" class=""exButton"" type=""button"" onclick=""document.location='Home.aspx?re_" & sControlUniqueID & _
    "=1';"" onmouseover=""this.className='exButtonOver'"" onmouseout=""this.className='exButton'"" onmousedown=""this.className='exButtonDown'""> " & _
    env.Term.String(8746, "Refreshs") & " </button>")
    End If
    .WriteEndTag("td")
    .WriteEndTag("tr")
    .WriteFullBeginTag("tr")
    .WriteFullBeginTag("td")
    If Len(sChartContent) > 0 Then
    .Write(sChartContent)
    .WriteEndTag("td")
    .WriteEndTag("tr")
    .WriteEndTag("table")
    .WriteEndTag("div")
    Return sw.ToString
    End If
    .WriteBeginTag("table")
    .WriteAttribute("id", sControlUniqueID & "_PivotHolder")
    .WriteAttribute("width", "100%")
    .WriteAttribute("height", "100%")
    .WriteAttribute("cellpadding", "0")
    .WriteAttribute("cellspacing", "0")
    .WriteAttribute("style", "display:none;")
    .Write(System.Web.UI.HtmlTextWriter.TagRightChar)
    .WriteEndTag("table")

    .WriteEndTag("td")
    .WriteEndTag("tr")
    .WriteEndTag("table")
    .WriteEndTag("div")
    End With
    Return sw.ToString
    thank you so much for helping.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles