Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open asp within div / IFrame

Status
Not open for further replies.

gojohnnygogogogo

Programmer
May 22, 2002
161
GB
Say I have a form in my first Div and want to pass field 'Name' from it to the second DIV (this second div is to be the IFRAME) on the same form.
how would I do that ?

so far I have,

<SCRIPT language=&quot;JAVASCRIPT&quot;>

function validate() {

var s = document.s1

s.submit();

}

</SCRIPT>

<DIV ID=search>
<form method=&quot;post&quot; name=&quot;s1&quot; action=&quot;don't know what goes here, as I don't want to post back to this form, but to the IFRAME form?&quot;>
<INPUT Name=&quot;Name&quot; Type=&quot;Text&quot;>
<input type=&quot;submit&quot; name=&quot;Searchbttn&quot; value=&quot;Search&quot; onclick=&quot;return validate(this)&quot; >
</Form>
</DIV>

<iframe name=ifWorkspace id=ifWorkspace width=400 height=500 scrollbars=auto frameborder=0 src=SearchResults.asp></iframe>



thank you for any more info.
 
<DIV ID=search>
<form method=&quot;post&quot; name=&quot;s1&quot; action=&quot;Page containing form.. ie form.asp&quot; target=&quot;IFRAME name&quot;>
<INPUT Name=&quot;Name&quot; Type=&quot;Text&quot;>
<input type=&quot;submit&quot; name=&quot;Searchbttn&quot; value=&quot;Search&quot; onclick=&quot;return validate(this)&quot; >
</Form>
</DIV>

example. if your iframe is called testerwindow and the form is called testerform.asp then you would use

<DIV ID=search>
<form method=&quot;post&quot; name=&quot;s1&quot; action=&quot;testerform.asp&quot; target=&quot;testerwindow&quot;>
<INPUT Name=&quot;Name&quot; Type=&quot;Text&quot;>
<input type=&quot;submit&quot; name=&quot;Searchbttn&quot; value=&quot;Search&quot; onclick=&quot;return validate(this)&quot; >
</Form>
</DIV>

hope that helps
 
what about runninng it in another DIV, I have tried just changing the target to the div name, but that doesn' work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top