Click to See Complete Forum and Search --> : forms and iframes


bloke
05-01-2003, 05:28 AM
Hi, quick question (hopefully)

Can I put form fields into an iframe source file when the form tags are in the parent file?

ie:

<form name="sectionupdate" method="post" action="sectionupdate.asp" onSubmit="return validate()">
<tr>
<td class="newheader">Project Link<br>
<textarea cols="78" rows="4" name="project" class="newbody"><%If request("addupdate") <> "add" and blnreload = 1 Then%><%=replace(rscontent("projectdetails"), "^", "'")%><%End If%></textarea>
</td>
</tr>
<tr>
<td class="newheader">Project<br>
<IFRAME SRC="adminprojectdetails.asp?id=<%=bitcontid%>" TITLE="project" width="98%" frameborder=0 align=top background="images/mainbg.gif" height=300 scrolling=yes marginwidth=0 marginheight=0 class="newbody">
</IFRAME>
</td>
</tr>

<tr>
<td class="newheader">Add/Update?<br>
Add&nbsp;<input type="radio" name="addupdate" value="add" class="newbody"<%If request("addupdate") = "add" Then%> checked<%End If%>>&nbsp;
Update&nbsp;<input type="radio" name="addupdate" value="update" class="newbody"<%if blnreload = 1 Then%>checked<%End If%>>
</td>
</tr>
<tr>
<td>
<%If bitcontid <> 0 Then%>
<input type="hidden" name="contid" value="<%=bitcontid%>">
<%End If%>
<input type="submit" name="go" value="Enter">
</td>
</tr>
</form>

.....the iframe file, adminprojectdetails.asp, contains additional <textarea> fields which I want to be submitted with form 'sectionupdate'.


Hope this makes sense!

Cheers


bloke
blokeinthekitchen.com

khaki
05-01-2003, 07:44 AM
hi bloke...

i'm just curious as to why you didn't just test it for yourself :confused:

but anyway...
why not just use an Include instead?
(that would seem to be a much more logical solution than the use of <iframe>)

does that help you at all?...
;) k

bloke
05-01-2003, 07:51 AM
I kinda need a form inside a form, if you get me? I'm obtaining a recordset, which I'm writing out in textareas but that recordset has sub categories which require a second sp to be run. So I populate the first set of text areas, then the iframe contains a select box which onChange submits itself, obtains the second record set and populates a second set of textareas. Both sets of textareas appear on the same page, so that the user can modify the contents then they need to be submitted as one form - which is where I run into problems.

An include file won't cut it and I didn't want to go down the javascript layers route - but it looks like I'll have to. Unless you have any better ideas!?

Cheers


bloke
blokeinthekitchen.com