Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: javascript updating object propertie

$
0
0
Re: javascript updating object propertie
FoxInCloud
Re: javascript updating object propertie
01/17/2012
01:51:31 AM
3ET03W0NK Show this entire thread in new window
From:
To:
Attachments:
None
It looks more like Firebug not updating the 'HTML' tab data

You'll find the correct .value in the 'DOM' tab, as shown on this screenshot


HTH,
ThN


Here is a screenshot showing the discrepancy, one value displayed and another in the .value.

http://tinyurl.com/7r4r34s


On my form I am using the calendarview.js popup calendar designed to work with proototype. It seems to work fine except for one sticking point.

On the form I have an image, say form1_scx-image1. I have a text field with a date, say form1_scx-text1.

In the form's wcHTMLgen method I added

WITH toHTML AS awHTMLGen OF awHTML.prg .cScriptJSadd("Calendar.setup( {dateField: 'form1_scx-text1', triggerElement: 'form1_scx-image1' });") ENDWITH

Works great. When I click the image, the calendar comes up, I pick a date, and that data gets filled into the .value property of text1. The JS code does something like:

. . . . figure the date and format it . . . . datefield.value = newDate

The form appears correct and the text field appears to have the new date in it. But appearances are deceiving. Somehow FiC does not recognize that the value of text1 has changed, and returns whatever the original value was. Or if I type in a value. But even though the HTML text field is displaying the new value correctly, and vaue is in wcpropSave, you get the new value if you check the HTML text1.value and you get the old value if you check in VFP the text1.value.

IOW despite changing the attribute in the HTML.JS, how do I get VFP/FiC cloud to recognize that change?

p.s. (Thierry: you can see this on the search in iptest)




Viewing all articles
Browse latest Browse all 10393

Trending Articles