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

Database Results

Status
Not open for further replies.

jennuhw

MIS
Apr 18, 2001
426
US
I have a webpage that is created in FP2002. I have a database results region. I want to compare the value of the results to see if they are logged in properly. I am doing this by vb. How do I reference the returned db results? Here is what I have:

<script language=&quot;vbscript&quot;>
' Check to see whether you have a current user name.
If Len(FName) = 0 Then
' Are you currently on the logon page?
' ...and redirect to the logon page.
Window.Navigate (&quot; End If
</script>
 
Try the ASP Forum.

It looks like your VBSCript is client-side, but the data access is going on over on the server. This won't work.
 
So, even if the results are dumped to the page, it won't work? Any ideas on how to make it work? Thanks.
 
Yes, if you get the data out to the browser you have some additional options.

How much data are we talking about? If you don't know if the user is logged on (nothing in the Session object or other session-state management server-side) how would you know what to send to the browser, and how is the browser going to figure out what the logon state of the user is?

If your goal is to keep a user from visiting pages beyond a greeting and logon page w/o logging on, I think most people check this server-side.

Maybe I'm just lost though. You are already returning some database stuff to the browser? How?

Small amounts of data can be returned as type=hidden <input> elements. A bit more as server-emitted Const statements in VBScript. These aren't secure, anybody can &quot;view source&quot; one way or another and spoof you. If you don't care what they see you could dump the data into an HTML table.

Or is your question &quot;what are some ways to get database query results back out to the browser for processing via script on the client side?&quot;

Not trying to be stubborn or dense here, I just need more clarification. Anybody else get what's being asked here, maybe I'm just slow today. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top