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

Web Development

 
GeneralRe: Javascript if/else and image display? Pin
djhankypark25-Apr-09 0:26
djhankypark25-Apr-09 0:26 
GeneralRe: Javascript if/else and image display? Pin
djhankypark22-Apr-09 10:38
djhankypark22-Apr-09 10:38 
QuestionUse Javscript to check user online Pin
Member 323010721-Apr-09 0:01
Member 323010721-Apr-09 0:01 
AnswerRe: Use Javscript to check user online Pin
Marc Firth21-Apr-09 0:35
Marc Firth21-Apr-09 0:35 
GeneralRe: Use Javscript to check user online Pin
Yusuf21-Apr-09 7:57
Yusuf21-Apr-09 7:57 
GeneralRe: Use Javscript to check user online Pin
Marc Firth21-Apr-09 22:27
Marc Firth21-Apr-09 22:27 
QuestionNeed to get "Direction Map Codes" Like ... Pin
qayyom20-Apr-09 23:54
qayyom20-Apr-09 23:54 
AnswerRe: Need to get "Direction Map Codes" Like ... Pin
Marc Firth21-Apr-09 0:37
Marc Firth21-Apr-09 0:37 
QuestionRe: Need to get "Direction Map Codes" Like ... Pin
qayyom21-Apr-09 0:51
qayyom21-Apr-09 0:51 
AnswerRe: Need to get "Direction Map Codes" Like ... Pin
Marc Firth21-Apr-09 0:59
Marc Firth21-Apr-09 0:59 
GeneralRe: Need to get "Direction Map Codes" Like ... Pin
qayyom21-Apr-09 1:07
qayyom21-Apr-09 1:07 
QuestionPDF mailto link not working Pin
Jay HoffmanTE20-Apr-09 7:41
Jay HoffmanTE20-Apr-09 7:41 
AnswerRe: PDF mailto link not working Pin
Marc Firth21-Apr-09 1:05
Marc Firth21-Apr-09 1:05 
GeneralRe: PDF mailto link not working Pin
Jay HoffmanTE21-Apr-09 2:09
Jay HoffmanTE21-Apr-09 2:09 
GeneralRe: PDF mailto link not working Pin
Marc Firth21-Apr-09 2:12
Marc Firth21-Apr-09 2:12 
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 

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.