FileUploadField Script Bug

  1. #1

    FileUploadField Script Bug

    Hi,

    When i place i FileUploadField on my form, the scriptmanager gives an error: "')' expected" after i call my save method.

    This is my Save method:

     Private Sub Save(ByVal CloseWindow As Boolean)
        Dim ID As Integer
        Dim Row As DataRow
        Dim Result As ProcessResult
        
        ID = Convert.ToInt32(Me.hiddenID.Text)
        
        If ID > 0 Then
            Row = UnitBusiness.GetUnit(ID)
        Else
            Row = UnitBusiness.CreateNewUnit()
        End If
        
        Result = Me.FillRowValuesFromControls(Row)
        
        If (Result.GlobalSuccess) Then
            Result = UnitBusiness.Save(Row)
            If (Result.GlobalSuccess) Then
                CooliteHelper.ParentAjaxMethod(Me.ScriptManagerMain, "RefreshStore", Row("ID").ToString())
                If CloseWindow Then
                    CooliteHelper.RegisterCloseWindow(Me.ScriptManagerMain)
                Else
                    Row.Table.DataSet.AcceptChanges()
                    Me.hiddenID.Text = Row("ID").ToString()
                End If
            Else
                CooliteHelper.DisplayProcessResultToClient(Result, Me, Me.ScriptManagerMain)
            End If
        Else
            CooliteHelper.DisplayProcessResultToClient(Result, Me, Me.ScriptManagerMain)
        End If
    End Sub
    And this is the script i call via my Save method

        
    
    
    Public Shared Sub ParentAjaxMethod(ByVal ScriptManager As ScriptManager, ByVal ParentAjaxMethod As System.String, ByVal Param As System.String)
    
    
        Dim Js As System.String
        Js = ""
        Js += vbTab + vbTab + "try"
        Js += vbCrLf + vbTab + vbTab + "{"
        Js += vbCrLf + vbTab + vbTab + vbTab + "if (window.opener && !window.opener.closed)"
        Js += vbCrLf + vbTab + vbTab + vbTab + "{"
        Js += vbCrLf + vbTab + vbTab + vbTab + vbTab + "window.opener.Coolite.AjaxMethods." & ParentAjaxMethod & "(" & Param & ");"
        Js += vbCrLf + vbTab + vbTab + vbTab + "}"
        Js += vbCrLf + vbTab + vbTab + "}"
        Js += vbCrLf + vbTab + vbTab + "catch(err)"
        Js += vbCrLf + vbTab + vbTab + "{ // Permissions denied, do nothing "
        Js += vbCrLf + vbTab + vbTab + "}"
        ScriptManager.AddScript(Js)
    End Sub
    When i replace the fileuploadfield by a textfield or something else, everything works fine...

    In case of a textfield, the executescript is this:

    try
      {
           if (window.opener && !window.opener.closed)
           {
                window.opener.Coolite.AjaxMethods.RefreshStore(48);
           }
      }
      catch(err)
      { // Permissions denied, do nothing 
      }  window.close();btnSave.setDisabled(false);btnSaveClose.setDisabled(false);txtStatus.setDisabled(false);cboForwarder.setDisabled(false);txtChassisNumber.setDisabled(false);cboConstructor.setDisabled(false);cboModel.setDisabled(false);cboDestination.setDisabled(false);chkActive.setDisabled(false);chkArchived.setDisabled(false);
    in case of a fileuploadfield, the execute script is this:

    try
      {
           if (window.opener && !window.opener.closed)
           {
                window.opener.Coolite.AjaxMethods.RefreshStore(49);
           }
      }
      catch(err)
      { // Permissions denied, do nothing 
      }  window.close();btnSave.setDisabled(false);btnSaveClose.setDisabled(false);txtStatus.setDisabled(false);cboForwarder.setDisabled(false);txtChassisNumber.setDisabled(false);cboConstructor.setDisabled(false);cboModel.setDisabled(false);cboDestination.setDisabled(false);chkActive.setDisabled(false);chkArchived.setDisabled(false);
    So u can see the '&&' is replaced by '&&'

    Please Help, thanx.
  2. #2

    RE: FileUploadField Script Bug

    *Any news on this?<br class="webkit-block-placeholder">
    Kind regards,
    <br class="webkit-block-placeholder">
    Reno
  3. #3

    RE: FileUploadField Script Bug

    Hi,

    We are working on it. We will update this topic when the problem will be fixed
    *
  4. #4

    RE: FileUploadField Script Bug

    *Thanks!!!<br class="webkit-block-placeholder">
    Thanks again for the quick intervention!
  5. #5

    RE: FileUploadField Script Bug

    *Hi,

    We made some changes. Can you update and retest?
  6. #6

    RE: FileUploadField Script Bug

    Thanks a lot!!

    It works fine now

Similar Threads

  1. ext:Script issue
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Sep 28, 2011, 1:15 PM
  2. Can we use this script for Notification??
    By gayancc in forum 1.x Help
    Replies: 0
    Last Post: Jan 15, 2011, 2:00 AM
  3. bug in the script
    By maxdiable in forum 1.x Help
    Replies: 1
    Last Post: Sep 26, 2010, 10:56 AM
  4. Replies: 2
    Last Post: Jul 29, 2009, 1:57 PM
  5. Script Error
    By jack_jj in forum 1.x Help
    Replies: 2
    Last Post: Dec 26, 2008, 8:53 AM

Posting Permissions