View Single Post
  #3 (permalink)  
Old December 8th, 2005, 04:24 PM
audio-catalyst audio-catalyst is offline
Registered User
 
Join Date: Dec 2005
Location: waalwijk, nb, Netherlands.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

dear brian ,

thank you very much for your response.
i though the same thing to, the problem is;

i can't reload result.asp , ( javascript top.opener! ), so i realy need my results server-side.
I will post the complete code, altough it's pretty much!

[code formfillerframe.asp]

<%
fieldname = Request.QueryString("fieldname")
dummyname = Request.QueryString("dummy")
tabelnaam = Request.QueryString("tbl_name")
loopcount = 1


%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function updateParent(id,naam) {

  opener.document.editform.<%=fieldname%>.value = id;
  opener.document.editform.<%=dummyname%>.value = naam;
  self.close();
  return false;
}
-->
</SCRIPT>
<link rel="stylesheet" href="/css/stylesheet.css" type="text/css">
</HEAD>
<title>Boot Translations CRM -> Selecteer Pagina</title>

</head>
<frameset cols="*" rows="72,*" border="0" framespacing="0" frameborder="NO">
  <frame src=formquery.asp?fieldname=<%=fieldname%>&dummy=< %=dummyname%>&tbl_name=<%=tabelnaam%>" name="zoek" scrolling="NO" marginwidth="0" marginheight="0" frameborder="NO" name="query">
  <frame src="formfillerresult.asp?fieldname=<%=fieldname%> &dummy=<%=dummyname%>&tbl_name=<%=tabelnaam%>" name="result" scrolling="yes" marginwidth="0" marginheight="0" frameborder="NO">
</frameset>


</noframes>
</html>

[/code]

[code formquery.asp]


<%
fieldname = Request.QueryString("fieldname")
dummyname = Request.QueryString("dummy")
tabelnaam = Request.QueryString("tbl_name")
loopcount = 1


%>
<HTML>
<HEAD>




<link rel="stylesheet" href="/css/stylesheet.css" type="text/css">
</HEAD>
<title>Boot Translations CRM -> Selecteer Pagina</title>
<BODY>
<table width="799" border="0" bgcolor="white" cellpadding="0" cellspacing="2">
 <form name="query" action="formfillerresult.asp?fieldname=<%=fieldnam e%>&dummy=<%=dummy%>&tbl_name=<%=tabelnaam%>&searc h=yes" method="post" enctype="multipart/form-data" target="result" >
 <tr>
  <td colspan="4" class="header2">Zoek</td>
  </tr>
 <tr>
   <td width="160" class="content">naam</td>
   <td width="153" ><input type="text" name="naam" ></td>
   <td width="164" class="content">crediteur/debiteur nummer</td>
   <td width="312" ><input type="text" name="nummer"></td>
 </tr>
 <%
 if tabelnaam = "Tbl_vertaler" then
 %>
 <tr>
   <td class="content">taal</td>
   <td><%
   valuebox = VbCrLf & " <select size=""1"" name=""taal"">" & vbCrLf
    Set RS3 = Con.Execute("SELECT * FROM Tbl_taal ORDER by id ASC")
    do while not RS3.eof
     valuebox = valuebox & " <option value=""" & RS3("id") & """"
      if Request.form("taal") = Cint(RS3("id")) then
       valuebox = valuebox & "selected > " & RS3("taal_naam") & ", " & RS3("taal_afkorting") & "</option>"
      end if
      valuebox = valuebox & "> " & RS3("taal_naam") & ", " & RS3("taal_afkorting") & "</option>" & vbCrLf
      RS3.MoveNext
     loop
     valuebox = valuebox & vbCrLf
     valuebox = valuebox &"</select>"
     set RS3 = nothing
     Response.Write(valuebox)
     %></td>
   <td class="content">specialisatie</td>
   <td>
   <%
      valuebox = VbCrLf & " <select size=""1"" name=""spec"">" & vbCrLf
      Set RS2 = Con.Execute("SELECT id,Specialisaties FROM Tbl_Specialisaties ORDER by id ASC")
      do while not RS2.eof
        valuebox = valuebox & " <option value=""" & RS2("id") & """"
        if Request.Form("spec") = RS2("id") then
          valuebox = valuebox & " selected "
        end if
        valuebox = valuebox & "> "& RS2("Specialisaties") & "</option>" & vbCrLf
        RS2.MoveNext
        loop
        valuebox = valuebox & vbCrLf
        valuebox = valuebox &"</select>"
        set RS2 = nothing
        Response.Write(valuebox)
     %>
  </td>
 </tr>
 <%
 end if
 %>
 <tr>
   <td colspan="4"><INPUT TYPE="submit" VALUE="submit" action="submit"><img src="gfx/loepje.jpg" alt="Klik om te zoeken" width="20" height="19" onClick="'form.submit();'"></td>
 </tr>
  <tr>
   <td colspan="4"></td>
 </tr>
 <%
  for each item in Request.QueryString
   %>
   <tr>
    <td>
    <input type="text" value="Tbl_vertaler" name="Tbl_name">
    </td>
   </tr>
   <%
  next
 %>
</form>
</table>
</BODY>
</HTML>

[/code]

[code formfillerresult.asp]


<%
fieldname = Request.QueryString("fieldname")
dummyname = Request.QueryString("dummy")
tabelnaam = Request.QueryString("tbl_name")


loopcount = 1


Set RSselect = Con.execute("SELECT * FROM " & Tabelnaam)


SQL = "SELECT * FROM " & Tabelnaam

Set RSzoekarray = Server.CreateObject("ADODB.Recordset")
RSzoekarray.ActiveConnection = Con
RSzoekarray.Source = SQL
RSzoekarray.Open

%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function updateParent(id,naam) {
    top.opener.document.editform.<%=fieldname%>.value = id;
    top.opener.document.editform.<%=dummyname%>.value = naam;
    top.close();
    return false;
}

function color(id,color){
 var tabel = document.getElementById(id).style;
 var rows = document.getElementsByTagName('tr');
  tabel.background = color;
  tabel.cursor = 'hand';
}
-->
</SCRIPT>

<link rel="stylesheet" href="/css/stylesheet.css" type="text/css">
</HEAD>
<title>Boot Translations CRM -> Selecteer Pagina</title>
<BODY>

<table width="799" border="0" bgcolor="gray" cellpadding="0" cellspacing="0">
  <%
  do while not RSzoekarray.EOF
  %>
   <tr class="content" onclick="updateParent('<%=RSzoekarray("id")%>','<% =RSzoekarray("naam")%>');" onMouseOver="this.className='hover'" onMouseOut="this.className='content'">
   <%
    for each veld in Rszoekarray.Fields
   %>
     <TD ID="<%=loopcount%>"><%=veld.value%></TD>
   <%
    next
   %>
  </tr>
  <%
  RSzoekarray.MoveNext
  loopcount = loopcount + 1
  loop
  %>

</table>
</BODY>
</HTML>
<%
set RSzoekarray = nothing
set RSselect = nothing

%>

[/code ]

thanks very much !

Reply With Quote