Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Reload Page with New Select Data


Message #1 by "G.Taylor" <gtaylor@O...> on Thu, 14 Jun 2001 16:55:35 +0200
Refresh the page on the click of a button - is that all you want to do?

<INPUT TYPE="button" VALUE="Refresh"
ONCLICK="window.navigate(document.location.href);">

(alternatively you can hard-code the page location)

-----Original Message-----
From: G.Taylor [mailto:gtaylor@O...]
Sent: 14 June 2001 15:56
To: javascript
Subject: [javascript] Reload Page with New Select Data


Hi,

I'm trying to reload a page so that it brings back the Data from my select
statement. This ordinarily wouldnt be too difficult, except for the fact
that I am dynamically building the select table. I want to do this with an
OnClick or OnChange.

Any help would be most appreciated

This is the source:

Dim rstType, bItemFound
bItemFound = False
Set rstType = Server.CreateObject("ADODB.Recordset")
On Error Resume Next
rstType.Open "Guy.Type_SEL ", con
If Err.number <> 0 Then
   err.description = "Error trying to get campaign details:" &
err.description
   err.source = strErrorPageName & "/Getting Type"
   Call LogError(logfile)
End If
If rst.EOF and rst.BOF Then
  err.description = "Error trying to get campaign details on id:" &
err.description
  err.source = strErrorPageName & "/Getting Type because of type"
  Call LogError(logfile)
End IF
%>
   <TD HEIGHT="30" COLSPAN="2" width="60" nowrap BGCOLOR="#FFFFFF">
   <SELECT Name="strType" DATAFLD="Type" >
  <%
  rstType.MoveFirst
  Do Until rstType.EOF

If rstType("Type_Type") = strType Then
  bItemFound = True
  %>
 <Option Value="<%=rstType("Type_Type")%>"
Selected><%=rstType("Type_Type")%></Option>
  <%
Else
  %>
 <Option
Value="<%=rstType("Type_Type")%>"><%=rstType("Type_Type")%></Option>
  <%
End If
rstType.MoveNext
Loop
rstType.Close
Set rstType = Nothing
 %>
</Select>

TIA

--
Guy Taylor
Software Engineer
OrbitalM
http://www.orbitalm.com


  Return to Index