Replace FRAME

View: New views
4 Messages — Rating Filter:   Alert me  

Replace FRAME

by jhayes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, I am trying to replace a frame on a website I frequent often. I want to insert a custom frame there, with a new src.

Re: Replace FRAME

by jhayes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I figured it out.
Created a script for it.
Thanks

Re: Replace FRAME

by namit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How did you do that, can i have code?

Thanks

Re: Replace FRAME

by jhayes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

(function() {
  frameset = document.getElementsByTagName('frameset')[0];
  if (frameset) {
    frame = document.getElementsByTagName('frame')[1];
    if (frame && frame.name == '---FRAME-NAME----') {
      frame.src = '--NEWFRAMEURL--'
          frameset.rows = '120,*'
        }
  }
})();

see above (also resizes the frames)