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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refresh 2 frames from submit 1

Status
Not open for further replies.

optjco

IS-IT--Management
Apr 13, 2004
185
GB
I have frameset with 3 frames

topFrame
leftFrame
mainFrame

in my left frame i have links to several topic pages this also shows the count of topics, the topic pages shows in the mainFrame and the user can enter new topics, when the user submits a new topic he is then redirected to an empty page and from there he is directed back to the topic page in the mainFrame via this code

Code:
<body onLoad="window.opener.location.reload(); window.close();">

However the count in the left frame is not updated and I have placed the following code in the topic page to do this

Code:
onLoad="parent.leftFrame.location.reload(true)"

My question is can i refresh both the mainFrame and the leftFrame from the empty page

I have tried this without success
Code:
<body onLoad="window.opener.location.reload(); parent.leftFrame.location.reload(true);window.close();">


Regards

Olly
 
OK,
I still have a frameset with 3 frames

topFrame
leftFrame
mainFrame

but I have changed the procedure to try and get the results i am after.

in my left frame i have links to several topic pages this also shows the count of topics, the topic pages shows in the mainFrame, when the user selects the link for a new topic a new page called PostTopic is displayed in the mainFrame.

The user enters their info and then submits to the DB I have added a javascript function on this page so hopefully when the user clicks the submit button then both the leftFrame and mainFrame are refreshed to show the relevant details.

However this is not working, although it seems that the leftFrame is being refreshed the count does not change until i manually refresh the page. below is the HTML for the PostTopics.asp page

Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript" type="text/JavaScript">
<!--
function frameupdate(){
parent.mainFrame.location.reload.href="Topics.asp"
parent.leftFrame.location.reload.href="Welcome.asp"
}
//-->
</script>
</head>

<body>
<p align="center"><font size="3" face="Verdana, Arial, Helvetica, sans-serif">Post 
  New Topic</font></p>
<p align="center"><font color="#0000FF" size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Note 
  : Please no HTML tags. Thank You</strong></font></p>
<form action="/Forums/PostTopic.asp?ForumID=1&TopicID=3&TopicID=3" method="POST" name="frmPost" id="frmPost">
  <table width="75%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="15%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Title</font></td>
      <td width="85%"> <input name="txtTopic Title" type="text" id="txtTopic Title"></td>
    </tr>
    <tr> 
      <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Body</font></td>
      <td> <textarea name="txtTopicBody" id="txtTopicBody"></textarea></td>
    </tr>
    <tr> 
      <td>&nbsp;</td>
      <td> <input type="submit" name="Submit" value="Post New Topic" onClick="javascript:frameupdate()"> 
        <input name="Submit2" type="submit"  value="Cancel"></td>
    </tr>
  </table>
  <p> 
    <input name="username" type="hidden" id="username" value="poliver">
    <input name="ForumID" type="hidden" id="ForumID" value="1">
  </p>
  <input type="hidden" name="MM_insert" value="frmPost">
</form>
<p>&nbsp;</p>
</body>
</html>

I have also tried the function like this

Code:
<script language="JavaScript" type="text/JavaScript">
<!--
function frameupdate(){
parent.mainFrame.location.reload ="Topics.asp"
parent.leftFrame.location.reload ="Welcome.asp"
}
//-->
</script>


is it possible someone could point me in the right direction please


Regards

Olly
 
location.href = href
or location.replace(href).
not location.reload.href = href

--Chessbot

"In that blessed region of Four Dimensions, shall we linger on the threshold of the Fifth, and not enter therein? Ah, no! [...] Then, yielding to our intellectual onset, the gates of the Sixth Dimension shall fly open; after that a Seventh, and then an Eighth -- --" Flatland, A. Square (E. A. Abbott)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top