replace text in IFRAME using innerHTML.replace(...) possible?

Discussion in 'Javascript' started by mscir, Oct 12, 2005.

  1. mscir

    mscir Guest

    I'd like to load a document into an iframe, and allow the user to
    replace fields like %Author%, %Title% etc. with text they enter into
    text boxes. I can do it if I use spans with unique ID's for each text
    entry I'd like to change, but I'd like to avoid that if there's a
    simpler approach.

    So far I can't get a straight replace to work on the iframe innerHTML:

    document.frames['iframe1'].document.body.innerHTML.replace(oldtext,newtext);

    Any suggestions?

    TIA,
    Mike
     
    mscir, Oct 12, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. L Anthony Johnson
    Replies:
    4
    Views:
    7,987
    Michael van den Berg
    Jun 16, 2005
  2. elca
    Replies:
    0
    Views:
    594
  3. Daedalous
    Replies:
    3
    Views:
    788
    Daedalous
    Jan 16, 2004
  4. sonic
    Replies:
    5
    Views:
    301
    Randy Webb
    Jul 11, 2006
  5. Replies:
    7
    Views:
    208
    Yanick
    Aug 4, 2006
Loading...

Share This Page