Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#17734 closed defect (invalid)

updating the dojo validation text box value using javascript

Reported by: mayatuli Owned by: mayatuli
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


I have a dojo text box <td width="196"><input type="text" name="campOwnerName" value="" id="campOwnerName" dojotype="dijit.form.ValidationTextBox?" trim="true" size="32" required="true" promptMessage="Enter Campaign Owner" regExp="[A-Za-z0-9\ ]{1,50}" invalidMessage="Please enter A-Z or a-z or 0-9 upto 50 characters" maxlength="50"></td>

I try to update this with javscript values var text1=dojo.byId("campOwnerName"); text1.value=map.value(); text1._IsDirty = true; alert(text1.value);works fine dijit.byId(text1.getAttribute('runtimeId')).setDirty( true );

it says dijit.ById?--undefined and does not update vale in the text box to be seen in UI

Attachments (1)

Dojo.html (1.2 KB) - added by mayatuli 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by mayatuli

I try to update with var text1=dojo.byId("campOwnerName"); text1.value=map.value(); alert(dijit.byId("campOwnerName").value); text1._IsDirty = true; dijit.byId(text1.getAttribute('runtimeId')).setDirty( true ); alert(dijit.byId("campOwnerName").value);

There are no errors now but the value does not showup

it is a 4 tab page with this code being run in the 1st tab

comment:2 Changed 8 years ago by bill

Component: GeneralDijit
Owner: set to mayatuli
Status: newpending

I can't tell what you are doing. For example, you are calling text1.getAttribute('runtimeId') yet never defining that attribute, at least not according to what you wrote in this ticket.

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser (i.e. not PHP, JSP, etc.).

Then, give exact instructions on how to reproduce the problem using your attached test file, including the browser and version to use.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.

Alternately, you can give instructions on how to reproduce the problem with an existing test case (in the tests/ directory).


comment:3 Changed 8 years ago by mayatuli

Status: pendingnew

dojo.byId("themeSk").getAttribute('runtimeId') is coming null I checked using alert

var text1=dojo.byId("campOwnerName"); text1.value=map.value(); text1.IsDirty? = true; alert(text1.value);works fine dijit.byId(text1.getAttribute('runtimeId')).setDirty(true);

comment:4 Changed 8 years ago by mayatuli

I have sent dojo.html. this is what I am trying to do. the dojo direcotry the CDN might not load

comment:5 Changed 8 years ago by mayatuli

basically I want to modify the value of text box using a javascript directly the value is not changing when I set the dirty flag to true

Changed 8 years ago by mayatuli

Attachment: Dojo.html added

comment:6 Changed 8 years ago by bill

Status: newpending

OK, thanks for the test case. It's natural that getAttribute('runtimeId') is returning null, since there is no such attribute, because you never set such an attribute. I don't see any bug here.

Last edited 8 years ago by bill (previous) (diff)

comment:7 Changed 8 years ago by mayatuli

Status: pendingnew

is it possible to update dojo text box using javascript?

comment:8 Changed 8 years ago by bill

Resolution: invalid
Status: newclosed

comment:9 Changed 8 years ago by mayatuli

thanks resolved the issue

Note: See TracTickets for help on using tickets.