Click to See Complete Forum and Search --> : updating a frame


okham
11-10-2003, 04:16 PM
...hey guys and gals, I'm trying to use an onclick event handler to change the src in a frame, but can't find the right code to pin it up.. I've tried:

parent.frame_.document.src="file_.htm;"

window.document.frame_.src="file_.htm;"

Maybe a couple others, but can't find what works. Any suggestions from the gallery?

Shampie
11-10-2003, 06:59 PM
parent.framename.window.location ?
or parent.framename.location.replace?

okham
11-11-2003, 06:52 AM
...thanx for the suggestions, shampie. No dice. Feel free to suggest anything else. I'm trying to avoid having to refresh the whole page...

agminer
11-11-2003, 09:35 PM
onclick="doc.htm; target=framename" ? or some variation of that

okham
11-11-2003, 11:37 PM
...nice try man, but that didn't work either, I'm afraid. I've been able to swap images, and such, but haven't found a way to do this without refreshing the whole screen. Kind o' naggin' me now.... :)

Steev
11-12-2003, 05:22 AM
Hi,

You want to change frame src?

Like this:-

http://www.lauraashley.com

View source and check status bar on button rollover.

Hope this helps.

Steev.

okham
11-12-2003, 07:01 AM
...thanks for your reply. I went and looked at the link, but didn't find what I'm looking for. I'd like to be able to change a frame src in an onclick event handler. If I can find the right reference for that, it would allow me to update two frames. Swapping an image or form element is one thing, but changing the src of a frame is another, I'm afraid. Feel free to make any other suggestions...

Scriptage
11-12-2003, 08:11 AM
parent.framename.location.href = "page";

okham
11-12-2003, 10:44 AM
...I do believe that's got it, scriptage! I figured there was probably a reference for doing that, and it's funny how finding the right one does the trick. That'll come in real handy on many occasions, I'm sure :) Thanx

Scriptage
11-12-2003, 12:05 PM
no problem mate