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

maintaining data on form

Status
Not open for further replies.

megabyte214

Programmer
Nov 7, 2001
40
US
I have a form and within the form there are links that pop-up another window to display information. When the pop-up is closed, all the previous information in the form is erased because the page reloads. I am wondering how to do this so that the page does not refresh when the pop-up is clicked and the information is not lost.
Here is the code, I am using PL/SQL:
javascript function
Code:
function newWindow(title)
  {
    
    parent.location.href="students.display_description?s_title="+title;
  }
call to javascript function
Code:
htp.p('<a href="#courses"  onClick="newWindow('''||CourseSelectionInfoTable(v_Counter).v_course_title||''');">');
htp.p(CourseSelectionInfoTable(v_Counter).v_course_title || '</U></B></FONT><BR>');
htp.p('</a>');
pl/sql procedure called from javascript function

Code:
PROCEDURE display_description(s_title in varchar2 default null)
is
  
  v_description                         course.description%TYPE;
 
BEGIN

  select course.description into v_description 
  from course 
  where course.title = s_title;

  htp.p('<script language = "javascript">
  newWindow = window.open("", "NewWindow","width=800,height=500,scrollbars=yes,location=no") ;
  newWindow.document.write("<h2>'||s_title||'</h2>");
  newWindow.document.write('''||v_description||''');</script>');

  htp.p('<script language = "javascript">parent.location.href="students.form_new?year=2005#courses";</script>');


end display_description;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top