[TYPO3] frames and forms

PEF xx at xx.xx
Mon Jun 30 10:58:05 CEST 2008


The answer is to include the type param as a part of the additional link 
params.

fm.action = "index.php?id=" + id + "&ctry=" + ctry + "&L=" + lang + 
"type=1";

The type is a reference to the typenum for the frame/page You want to 
write to:
content = page
content.typeNum = 1
...

In my case the type must be set to 1 to write to the content frame.

/Peter


PEF skrev:
> Hi,
> 
> I'm having some problems when submitting a form from a site using 
> frames. The whole frameset is re-loaded instead of just the content of 
> single frame.
> 
> In short my code look like this:
> 
> <script type="text/javascript">
>    function storesCountry(id, obj, lang) {
>       if(obj.selectedIndex > 0) {
>     var fm;
>     fm = obj.form;
>     ctry = obj.value;
>     fm.action = "index.php?id=" + id + "&ctry=" + ctry + "&L=" + lang;
>     fm.submit();
>       }
>    }
> 
> alternativt:
> 
>    function storesCountry(id, obj, lang) {
>       if(obj.selectedIndex > 0) {
>     top.frames[1].location = "index.php?id=" + id + "&ctry=" + ctry + 
> "&L=" + lang;
>       }
>    }
> 
> </script>
> 
> <form target="content" action="" method="POST">
>     <select onchange="storesCountry(25, this, '0');">
>         <options value="dk">..</options>
>         ...
>         ...
>     </select>
> </form>
> 
> ------------
> 
> typoscript:
> 
> #just to make sure that the target is the frame named "content"
> styles.content.links.target = content
> content.pageFrameObj = content
> config.intTarget = content
> 
> content = PAGE
> content.typeNum = 1
> content.10 = USER
> content.10.userFunc = tx_templavoila_pi1->main_page
> 
> music = PAGE
> music.typeNum = 2
> music.10 = FILE
> music.10.file = fileadmin/templates/hs-music.html
> 
> nxs_frameset = PAGE
> nxs_frameset.typeNum = 0
> nxs_frameset.frameSet {
>    rows = 1,*
>    params = border="0" framespacing="0" frameborder="NO"
>    1 = FRAME
>    1.obj = music
>    1.params = border="0" noresize scrolling="NO" marginheight="0" 
> marginwidth="0" frameborder="0"
> 
>    2 = FRAME
>    2.obj = content
>    2.params = border="0" noresize scrolling="NO" marginheight="0" 
> marginwidth="0" frameborder="0"
> }
> 
> I hope that someone can tell me what to do, to load only the content 
> frame and not the whole frameset.
> 
> Regards
> Peter Falk


More information about the TYPO3-english mailing list