Click here to Skip to main content
15,889,096 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionfirefox addon. required(sdk/tabs).attach() not working Pin
alborozd17-Nov-14 4:45
alborozd17-Nov-14 4:45 
AnswerRe: firefox addon. required(sdk/tabs).attach() not working Pin
ZurdoDev17-Nov-14 5:23
professionalZurdoDev17-Nov-14 5:23 
QuestionCode Modify for JS Pin
Member 1123853816-Nov-14 13:05
Member 1123853816-Nov-14 13:05 
AnswerRe: Code Modify for JS Pin
Richard MacCutchan16-Nov-14 21:39
mveRichard MacCutchan16-Nov-14 21:39 
QuestionRe: Code Modify for JS Pin
ZurdoDev17-Nov-14 5:24
professionalZurdoDev17-Nov-14 5:24 
QuestionHow to Create HTML Code in PDF Article? Pin
hub sarasota11-Nov-14 19:12
hub sarasota11-Nov-14 19:12 
QuestionSetting the content of an HTML span text to the text of an asp textbox text properity Pin
Stephen Holdorf9-Nov-14 10:04
Stephen Holdorf9-Nov-14 10:04 
AnswerRe: Setting the content of an HTML span text to the text of an asp textbox text properity Pin
Richard Deeming10-Nov-14 4:36
mveRichard Deeming10-Nov-14 4:36 
To set the value of a text box, you need to use the .val(...) method[^], not the .text(...) method.

Your first call to .text(...) is replacing the text of all <span> elements within your widgetField element. Since you've wrapped the text box in a <span> tag, it will be destroyed by that call. You'll either need to be more specific with your #widgetField span selector, or remove the <span> which surrounds the text box.

Also, if you're using a master page, the name of your text box won't match the ID attribute set on the server.
ASP.NET
<asp:TextBox id="MyHiddenTextBox" runat="server" style="display:none;" />

JavaScript
onChange: function(formatted) {
    $('#widgetField span').text(formatted);
    $('#widgetField input[name$=MyHiddenTextBox]').val(formatted);
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


Questionissue with IE11 via Jquery/Ajax Pin
Rajendra Kumar Katabathuni6-Nov-14 21:14
Rajendra Kumar Katabathuni6-Nov-14 21:14 
AnswerRe: issue with IE11 via Jquery/Ajax Pin
Nathan Minier14-Nov-14 2:09
professionalNathan Minier14-Nov-14 2:09 
Questioncompare two array object and remove duplicate using underscore.js Pin
sagivasan6-Nov-14 2:09
sagivasan6-Nov-14 2:09 
SuggestionRe: compare two array object and remove duplicate using underscore.js Pin
ZurdoDev13-Nov-14 10:26
professionalZurdoDev13-Nov-14 10:26 
Questionjava Pin
Member 112115035-Nov-14 23:44
Member 112115035-Nov-14 23:44 
QuestionRe: java Pin
Richard MacCutchan6-Nov-14 0:02
mveRichard MacCutchan6-Nov-14 0:02 
QuestionOpening VLC player from browser Pin
Danpeking5-Nov-14 22:30
Danpeking5-Nov-14 22:30 
QuestionWhat's the best programming language to build this? Pin
beMember5-Nov-14 9:26
beMember5-Nov-14 9:26 
GeneralRe: What's the best programming language to build this? Pin
PIEBALDconsult5-Nov-14 9:32
mvePIEBALDconsult5-Nov-14 9:32 
AnswerRe: What's the best programming language to build this? Pin
Garth J Lancaster5-Nov-14 9:33
professionalGarth J Lancaster5-Nov-14 9:33 
AnswerRe: What's the best programming language to build this? Pin
Albert Holguin5-Nov-14 10:49
professionalAlbert Holguin5-Nov-14 10:49 
QuestionAngularJS Unit Test Pin
upkaar4-Nov-14 2:12
upkaar4-Nov-14 2:12 
AnswerRe: AngularJS Unit Test Pin
Richard MacCutchan4-Nov-14 2:19
mveRichard MacCutchan4-Nov-14 2:19 
GeneralRe: AngularJS Unit Test Pin
upkaar30-Jan-15 20:11
upkaar30-Jan-15 20:11 
GeneralRe: AngularJS Unit Test Pin
Richard MacCutchan30-Jan-15 21:46
mveRichard MacCutchan30-Jan-15 21:46 
AnswerRe: AngularJS Unit Test Pin
Simon_Whale4-Nov-14 3:06
Simon_Whale4-Nov-14 3:06 
Question2nd Javascript Assignment Pin
Member 1119456830-Oct-14 18:02
Member 1119456830-Oct-14 18:02 

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.