Javascript Question

Scott Elcomb Scott.Elcomb-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org
Wed Aug 18 06:07:26 UTC 2004


On Wed, 2004-08-18 at 00:14, StreetSmart wrote:
> Hey, I have two forms on my web site that change according to what page your
> on. The problem is, when i try and link
> 
> <a href="main.php" class="capt" target="main"> home </a>
> 
> I can only change one form. My question is, are there any way to make one
> link change two forms? Thanks allot.

I'm no jscript expert by any stretch, but if you're referring to frames,
you could use something like below in an onload or onclick handler:


(assumes your frameset has 2 frames; the first called 'control' and the
second 'main')

  self.parent.frames[0].location.href="http://abc.com/some/file.php";

This would change the page displayed in the 'control' frame.  Replace the
[0] with [1] to change the page in the 'main' frame.


Not sure if that makes much sense, but I know very little jscript, and
even less about sleep.  ;)

Anyway, I have an onload version of the above at
http://psema4.gotdns.com/docbrowser/

Selecting anything from the drop-down box (top frame) sets off a 2-step
series of these.  The method should be visible by viewing the source of
the top and/or left frames.

I imagine there's a better way to do it, but this seems to work well
enough.

Hope it helps.

- Scott.

-- 
https://sourceforge.net/projects/avalonweb/

PGP Public Key:
1024D/98125E76 2004-03-21 Scott Elcomb (dL33T) <Scott.Elcomb-iRg7kjdsKiH3fQ9qLvQP4Q at public.gmane.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gtalug.org/pipermail/legacy/attachments/20040818/4c64b9eb/attachment.sig>


More information about the Legacy mailing list