www.webdeveloper.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: document.getElementById('<%= lstFieldList_TrajectType(0)%>').value dynamic index...

  1. #16
    Join Date
    Dec 2010
    Posts
    13

    Don'search to long....

    The origin of the data in the javascript can be found in CodeBehind: (part III).

    Look for the part:
    Select Case strFieldType
    Case "varchar"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex))
    Case "int"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetInt32(intPrimaryRecordFieldIndex))
    Case "decimal"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetDecimal(intPrimaryRecordFieldIndex))
    Case "datetime"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetDateTime(intPrimaryRecordFieldIndex))
    Case "boolean"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetBoolean(intPrimaryRecordFieldIndex))
    Case "money"
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetDecimal(intPrimaryRecordFieldIndex))
    Case Else
    strSQLFieldContent = " " & GetShortObjectName(dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex))
    Select Case dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex)
    Case dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex).ToLower.Contains("_mail")
    'strSQLFieldContent = "<a href=mailto:" & dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex) & "></a>"
    Case dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex).ToLower.Contains("_url")
    'strSQLFieldContent = "<a href=http://" & dbDataReaderDDL.GetString(intPrimaryRecordFieldIndex) & "></a>"
    End Select
    End Select
    lstFieldContentList_TrajectType.Add(strSQLFieldContent)
    lstKeepListNewContent_TrajectType.Add("<input type = 'Text' id='" & lstFieldList_TrajectType(intPrimaryRecordFieldIndex) & "' name='" & lstShortFieldList_TrajectType(intPrimaryRecordFieldIndex) & "'/>")
    lstKeepListInnerHTML_TrajectType.Add("input type = 'Text' id='" & lstFieldList_TrajectType(intPrimaryRecordFieldIndex) & "' name='" & lstShortFieldList_TrajectType(intPrimaryRecordFieldIndex) & "'")

    '================ Start TraceLog ================
    strItem = "Datareaders: PopUp_TrajectType"
    strDetail = "strSQLFieldName: " & lstFieldList_TrajectType(intPrimaryRecordFieldIndex)
    strResult = "strSQLFieldContent: " & strSQLFieldContent
    TraceLog(strModule, strItem, strDetail, strResult)
    '================= End TraceLog =================

    intPrimaryRecordFieldIndex = intPrimaryRecordFieldIndex + 1
    End While
    End While
    strInnerHTML_TrajectType = "<input type = 'Text' id='" & lstFieldList_TrajectType(intPrimaryRecordFieldIndex) & "' name='" & lstFieldList_TrajectType(intPrimaryRecordFieldIndex) & "'/>"
    strPopUp_TrajectType_FieldContent = String.Join("<br>", lstFieldContentList_TrajectType.ToArray())
    strPopUp_TrajectType_FieldNewContent = String.Join("<br>", lstKeepListNewContent_TrajectType.ToArray())

  2. #17
    Join Date
    Jan 2009
    Posts
    3,346
    The only needed parts are the generated html code (view source in a browser).

  3. #18
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    I did post the javascript function already
    We need to see the client side script and html (generated code). You have only given the server scripts.

  4. #19
    Join Date
    Dec 2010
    Posts
    13

    Clientside scripts in post # 8

    Hi Fang,
    I posted the clientside scripts in #8......
    Unless you need other code?
    Please explain.

    Cheers,
    Jops

  5. #20
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    What errors are you getting in the Error Console?

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