Click to See Complete Forum and Search --> : Form submit to another frame


Motabobo
08-11-2003, 03:24 PM
Hi !

How do i submit a form to another frame ???
I tried using the target attribute but it doesn't work using the request.form("cell")...

Any idea ???

Here is the code of my frame set:

code:--------------------------------------------------------------------------------
<FRAMESET frameid="fset" border="0" cols="239,*">
<FRAME src="leftproto.asp" name="left" id="left" scrolling="no" noresize>
<FRAMESET rows="58,*,29">
<FRAME name="haut_droite" target="bas_droite" scrolling="no" noresize src="navigation.asp">
<FRAME name="content" src="photos.asp" scrolling="auto" noresize>
<FRAME name="footer" scrolling="no" noresize src="footer.asp" target="_self">
</FRAMESET>
</FRAMESET>
--------------------------------------------------------------------------------

The form is in the left frame and i'm trying to response.write the data in the content frame...

Thanks !!

rdoekes
08-11-2003, 03:28 PM
that is very strange, since the target should be the designated form parameter for that.

is "cell" a form element in your form?

Motabobo
08-11-2003, 03:42 PM
yes it would be the name of the text edit.
Here is the complete code :

<form method="post" target="content" action="test.asp" name="thumbnail">
<TABLE border="0" cellpadding="0" cellspacing="0" width="204" align="center">
<TR>
<TD>
<TABLE class="ListNuggetHeader" id="GeneralInfoHeader" cellSpacing="0" cellPadding="0" width="100%" name="GeneralInfoHeader">
<TR>
<TD onselectstart="window.event.cancelBubble=true; return false;" onclick="PartWrapperToggle('GeneralInfo');">
<A class="fb4" onclick="return PartWrapperToggle('GeneralInfo');" href="javascript:PartWrapperToggle('GeneralInfo');" style="text-decoration: none;">&nbsp; Album Settings ::</A> </TD>
<TD onclick="PartWrapperToggle('GeneralInfo');">
<DIV class="ListNuggetButton">
<IMG id="GeneralInfoUp" title="Hide options" alt="Hide options" src="_system/images/up.gif" align="right" border="0" name="GeneralInfoUp" width="17" height="17">
<IMG class="ListNuggetDownButton" id="GeneralInfoDown" title="Options" alt="Options" src="_system/images/down.gif" align="right" border="0" name="GeneralInfoDown" width="17" height="17"> </DIV>
</TD>
</TR>
<TR>
<TD width="100%" colSpan="2">
<DIV class="ListNuggetBody" id="GeneralInfoBody" name="GeneralInfoBody">
<TABLE cellspacing="0" cellpadding="0" border="0">
<TR>
<TD style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top-style: none; border-top-width: medium">
&nbsp;&nbsp;<IMG border="0" src="_system/images/normal.gif">
<INPUT type="radio" onClick="document.thumbnail.rand.checked=false;" checked="checked" name="prv" value />Normal
<BR>
</TD>
</TR>
<TR>
<TD style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium">
&nbsp;&nbsp;<IMG border="0" src="_system/images/thumbnail.gif">
<INPUT type="radio" onClick="document.thumbnail.rand.checked=false;" name="prv" value="y" />Thumbnail<BR>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
</TABLE>

I am calling the sbumit form with this :

Response.Write "<a class=""cspbItm"" onMouseOver=""change_status('Go to this album: " & FolderID & "'); return true;"" onclick=""document.thumbnail.submit();"" target=""content""onMouseOut=""window.status=''; return true;"" href=""test.asp?dir=" & FolderID & """>" & FolderNameShown & "</a></TD>" & vbnewline

Any idea ? (PS the other code works so i don't think it's interfering. You can also see that while submitting the form i'm also usign the querystring to send data.)

rdoekes
08-11-2003, 03:50 PM
I think the anchor you use for submit is the problem. You do a form submit with that and you a redirect (via href), both to the same page in the same frame. That is running interference.

If you would like to submit the form, do the form submit as you have it, and make the href="javascript:void(0);", in essence do nothing...

Motabobo
08-11-2003, 03:58 PM
THX :D

I feel very stupid now....On the other hand, how would i pass data using the querystring ?

The reason i have to do this is that i have an outlook bar dynamically generated with my website folders....Once i click on any of those hyperlinks, i need to know which page to load (form submit thing) and also in which folder i will have to be on the other frame (querystring of the asp generated hyperlinks).

rdoekes
08-11-2003, 04:06 PM
Do you create the outlook bar in the same "test.asp" page?

If so, I would do this with another script in another frame. To the best of my knowledge you could do a form submit to frame content with the OnClick of your anchor, and the update of the outlook bar to another frame
your anchor will be then Response.write "<a href=""OutLookBar.asp?param=" & iParam & """ target=""someFrame"" onClick=""javascript:document.forms['thumbnail'].submit();"">"
I did not test this, but to the best of my knowledge, this should work. If it doesn't, me bad..;)

-Rogier Doekes

Motabobo
08-11-2003, 04:18 PM
I'm not sure i follow you there...

The outlook bar is generated with a loop and i'm submitting the form from the outlook bar page with each link that has been generated. Each of those links should also send data to the other frame (at the same time that the form is submitted) so i know which page to load and which content to load too !(based on the folder id of the hyperlinks loop).