Wrox Programmer Forums
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2004, 06:56 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refresh only one frame

hi ppl

Iam having a html page with 2 frames. On the top frame i fill in parameters in a text box and click on submit. The data based on these parameters is fetched from the database and displayed in the second frame.

The problem is i dont want the top frame to get refreshed. I want the entered parameters to be present in the top frame.

ne suggestions frnds??

tnx
CHE

 
Old October 26th, 2004, 06:58 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

In your form tag have:
Code:
 target="<name of frame to show results in>"


--

Joe (Co-author Beginning XML, 3rd edition)
 
Old October 26th, 2004, 07:16 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i did not understand....i will give u the code so that u can tell me exactly what to do.

Main Frame page A.htm
<frameset rows="50%,8">
    <frame src="B.jsp" name="F1">
    <frame src="C.jsp" name="F2">
</frameset>

B.jsp

<form name="frmInput action="GetData.java">
<input type="text" name="txtInput" size="15">
<input type="submit" value="Submit">
</form>

C.jsp

"Data from database will be displayed here"



 
Old October 26th, 2004, 07:28 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Code:
B.jsp

<form name="frmInput action="GetData.java" target="F2">
<input type="text" name="txtInput" size="15">
<input type="submit" value="Submit">
</form>
--

Joe (Co-author Beginning XML, 3rd edition)
 
Old October 26th, 2004, 09:54 AM
Registered User
 
Join Date: Oct 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Joe

But i think that there is another issue also here. The data will be retrieved from the database by the GetData.java file. After that GetData.java file will redirect to the Main Frame page A.htm. This means essentially that both B.jsp and C.jsp will be refreshed?? Am i correct?? If so is there a way around this issue..some better flow design perhaps??

Thanks
-S-

 
Old October 26th, 2004, 10:08 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

No, when the form is submitted the values are sent to GetData.java and the results are shown in frame F" replacing the current content (c.jsp). B will remain as is.

Remember me when the revolution comes :)

Joe





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set one frame src from other frame akumarp2p ASP.NET 1.x and 2.0 Application Design 2 March 13th, 2007 04:13 AM
parsing form data from frame to other frame audio-catalyst Classic ASP Basics 5 January 3rd, 2006 02:57 PM
refresh other form inside frame. (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 1 December 1st, 2005 02:18 PM
Call right frame Page_Load event from left frame. ochanarachel Classic ASP Basics 0 January 28th, 2005 05:13 AM
Refresh a frame from another frame czambran Javascript 3 October 21st, 2004 11:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.