Click here to Skip to main content
15,888,579 members
Home / Discussions / Web Development
   

Web Development

 
QuestionHelp about asp & activex Pin
maxMESA20-Apr-09 4:32
maxMESA20-Apr-09 4:32 
AnswerRe: Help about asp & activex Pin
Marc Firth22-Apr-09 1:51
Marc Firth22-Apr-09 1:51 
AnswerRe: Help about asp & activex [solved] Pin
maxMESA22-Apr-09 3:30
maxMESA22-Apr-09 3:30 
GeneralI need help to creating a folder in drop down list box in ASP Pin
masif0518-Apr-09 5:36
masif0518-Apr-09 5:36 
GeneralRe: I need help to creating a folder in drop down list box in ASP Pin
Ashfield20-Apr-09 1:22
Ashfield20-Apr-09 1:22 
QuestionWhat technologies do I need to develop a video chat similar to dotv.com? Pin
Hiigara17-Apr-09 10:04
Hiigara17-Apr-09 10:04 
AnswerRe: What technologies do I need to develop a video chat similar to dotv.com? Pin
Marc Firth21-Apr-09 1:07
Marc Firth21-Apr-09 1:07 
QuestionJavaScript-set input values empty in code-behind. Pin
WebMaster17-Apr-09 3:16
WebMaster17-Apr-09 3:16 
I wasn't sure if this should go in Web Dev or ASP.

I'm using a DataList that contains JavaScript in order to fill some textboxes. The DataList pops up in a modal div dialog, and the user clicks an item, filling in two fields on the page. This works fine. The problem occurs when I try to get the values in the code-behind. The values are empty, even though they do in fact contain text on the page. If the user types in their own values, it works like it should. Here's the code.

JavaScript:
function fillLookupField(control, value) {
        document.getElementById(getClientId(control)).value = value;
    }


getClientId() just returns the ClientId so that the control can be accessed from the JavaScript. Here is part of it:
function getClientId(control) {
    switch (control) {
        case 'BonusCost':
            return '<%= txtBonusCost.ClientId %>';
        case 'BonusDesc':
            return '<%= txtBonusDesc.ClientId %>';


This is the code-behind for the submit button click:
Dim amount As Integer = Val(txtBonusCost.Text)
Dim desc As String = txtBonusDesc.Text
MsgBox(amount & vbTab & desc)


The message box just displays a zero, so the value of an empty String concatenated with another empty String. I've tried making a hidden field and setting its input the same way, and I have the same issue. Any ideas?

Evan Stoner

AnswerRe: JavaScript-set input values empty in code-behind. Pin
led mike17-Apr-09 6:33
led mike17-Apr-09 6:33 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
WebMaster17-Apr-09 7:58
WebMaster17-Apr-09 7:58 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
led mike17-Apr-09 8:15
led mike17-Apr-09 8:15 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
WebMaster17-Apr-09 8:33
WebMaster17-Apr-09 8:33 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
led mike17-Apr-09 9:12
led mike17-Apr-09 9:12 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
Yusuf17-Apr-09 9:22
Yusuf17-Apr-09 9:22 
GeneralRe: JavaScript-set input values empty in code-behind. Pin
WebMaster17-Apr-09 10:57
WebMaster17-Apr-09 10:57 
Questionimplementation of Spring modules in J Developer Pin
Pradeep kumar.V17-Apr-09 1:27
Pradeep kumar.V17-Apr-09 1:27 
AnswerRe: implementation of Spring modules in J Developer Pin
Yusuf17-Apr-09 9:24
Yusuf17-Apr-09 9:24 
QuestionHelp: Setting up API Mailbox Alias Creator for Membership Site Pin
Senuzum16-Apr-09 23:42
Senuzum16-Apr-09 23:42 
QuestionIframe Height Pin
icanmakeiteasy16-Apr-09 21:08
icanmakeiteasy16-Apr-09 21:08 
Questiondrop down problems Pin
lithcause16-Apr-09 5:03
lithcause16-Apr-09 5:03 
QuestionVideo Conference or netmeeting Pin
Member 274526315-Apr-09 10:32
Member 274526315-Apr-09 10:32 
QuestionActive X Pin
siva45515-Apr-09 8:35
siva45515-Apr-09 8:35 
AnswerRe: Active X Pin
Yusuf21-Apr-09 5:24
Yusuf21-Apr-09 5:24 
Questionip address.. Pin
pradeep8515-Apr-09 7:22
pradeep8515-Apr-09 7:22 
AnswerRe: ip address.. Pin
David Mujica15-Apr-09 7:47
David Mujica15-Apr-09 7:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.