Gossamer Forum
Home : General : Internet Technologies :

Javascript... passing values between frames...

Quote Reply
Javascript... passing values between frames...
Hi,

I'm trying to pass a value between 2 different frames. side_frame and main_frame. Now, I have an input field, which I'm trying to populate. The code I'm using is;

<a href="javascript:frames['main_frame'].form['edit_link'].catid.value=1234">

...but that gives me a syntax error. I'm pretty new to this JS stuff ... but I'm slowly getting there. Obviously not quite there yet =)

Would anyone mind sharing how to do this? I've tried other options, i.e;

javascript:document.catid.value=1234

... but that will only work with the local option, and not the one in the main_frame.

Any ideas are much appreciated :)

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Javascript... passing values between frames... In reply to
Also tried;

javascript:window.parent.frames['main'].frames['main_frame'].catid.value=$id

.. which still doesn't work :/

(just remembered that I have 2 levels deep of frames), "main", and then "main_frame" and "bottom_frame" inside that frame.

Any ideas? :/

TIA

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Quote Reply
Re: [Andy] Javascript... passing values between frames... In reply to
I think this is will help somewhat... perhaps you can hack it to fit your needs:

http://javascript.internet.com/forms/pass-menu-frames-demo.html
Quote Reply
Re: [Watts] Javascript... passing values between frames... In reply to
You little beaty... thats exactly what I was looking for. ...and there was me thinking I'd mastered finding things on Google :D

Thanks again.

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates