Get HTML inside div?

Discussion in 'HTML & Website Design' started by Triexa, Nov 11, 2006.

  1. #1
    I know I can use the .innerHTML to get the value of a div.

    However, say this has a <input> on it, with entered data. The value="" doesn't get updated (not that it really would, or should)...

    But is there anyway I can get the innerHTML including the updating input values rather than the default?
     
    Triexa, Nov 11, 2006 IP
  2. Munkyonline

    Munkyonline Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your going to have to give a bit more info than that. Not really sure what you want to do. Try and give us some code to look at too!
     
    Munkyonline, Nov 12, 2006 IP
  3. dp-user-1

    dp-user-1 Well-Known Member

    Messages:
    794
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Agreed . . .
     
    dp-user-1, Nov 13, 2006 IP
  4. SoKickIt

    SoKickIt Active Member

    Messages:
    305
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    70
    #4
    Go trough ".innerHTML" and find all "input" tags (with some regular expression), find their values (it's easy once you get their names) and replace value="" with value="new_value" (or add the same thing in case the value attribute is missing).
     
    SoKickIt, Nov 13, 2006 IP