FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

get and update value

 
Post new topic   Reply to topic     Forum Index -> flowerd
View previous topic :: View next topic  
Author Message
yidabu



Joined: 21 Apr 2007
Posts: 87

PostPosted: Sun Mar 30, 2008 6:56 pm    Post subject: get and update value Reply with quote

I tested today, the result is (not finished):

Code:
   get recently value:
        input
            value = elementText
            value = innerText
       
        plaintext
            value = ele.value.toString
            value = ele["value"]        //nothing
            value = ele.elementText     //nothing
           
        textarea   
            value = ele.value.toString
            value = ele.elementText     //nothing
            value = ele.innerText       //nothing
            value = ele["value"]        //nothing

    set and update value to Window
        input
            ele.innerText = newvalue
            ele.value = HJson(newvalue)         //some times unknow behavior
            ele.attribute("value", newvalue)    //failed

        plaintext
            ele.value = HJson(newvalue)
            ele.innerText = newvalue        //failed
            ele.attribute("value", newvalue)    //failed
           
        textarea
            ele.value= HJson(newvalue)
            ele.innerText = newvalue        //failed
            ele.attribute("value", newvalue)    //failed



for input, get and update value by innerText
for plaintext and textarea, get value by ele.value.toString, update value by HJson(newvalue)
_________________
D yuyan
Back to top
View user's profile Send private message
bobef



Joined: 05 Jun 2005
Posts: 269

PostPosted: Mon Mar 31, 2008 12:57 am    Post subject: Reply with quote

I have found some inconsistent behavior in HTMLayout but I haven't figured out exactly how it works. For example you can use .innerHTML on text fields, but if they are not attached to the DOM you can't. Then you need to set the value attribute. Or some case like that.
Back to top
View user's profile Send private message
yidabu



Joined: 21 Apr 2007
Posts: 87

PostPosted: Mon Mar 31, 2008 5:01 am    Post subject: Reply with quote

It's HTMLayout thing, not the D wrapper, I know Smile
_________________
D yuyan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> flowerd All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group