megabyte214
Programmer
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
call to javascript function
pl/sql procedure called from javascript function
Here is the code, I am using PL/SQL:
javascript function
Code:
function newWindow(title)
{
parent.location.href="students.display_description?s_title="+title;
}
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>');
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;