If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Client-side vs. Server-side scripts

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-21-04, 20:12
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Client-side vs. Server-side scripts

Hi, All,

I need to make sure I understand this concept of server vs. client processing in ASP 3.0.

Can someone tell me the differences for the following codes?

1) <% Set abc = CreateObject("OWC10.Chart") %>
2) <% Set abc = Server.CreateObject("OWC10.CHART") %>
3) <Script Language=VBScript> Set abc = CreateObject("OWC10.CHART") </Script>
4) < <Script Language=VBScript> Set abc = Server.CreateObject("OWC10.CHART") </Script>

I guess I want to know where exactly this "OWC10.CHART" object (or component) the code is trying to use in each of these examples?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 08-22-04, 19:18
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
for 1 and 2 you can be pretty sure that the object will be on the server... primarily because IIS will recognise the <% as a tag for server side script...

with 3 and 4 it is a little more difficult... they will probably also be on the server but since you are using the <script> tag instead you should really explicitly force the execution at the server..

can you tell us what you are trying to achieve??
Reply With Quote
  #3 (permalink)  
Old 08-23-04, 09:07
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
I am trying to see if the OWC10 component is installed on the client machine or not. If I force it to CreateObject on the client machine and failed, then I know the component is not installed.
I think I understand where it is processed - 1 & 2 are on server and 3 & 4 are on client, but I am confused where and which component (client or server's) it is trying to use to create this object, since both the server and client may have this particular component installed, but may have different versions.
Reply With Quote
  #4 (permalink)  
Old 08-23-04, 19:27
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
okie then, what you really want to try is something like...
Code:
<Script Language="VBScript" runat="Client"> 
OnError Resume Next
Set abc = Server.CreateObject("OWC10.CHART") 
if Err.Number <> 0 then
  ' do whatever it is you want to do if the component is not installed
else
  ' do whatever it is you want to do if the component is installed
  set abc=nothing
end if
</Script>
that will force the execution of the script to the client (according the msdn)
Reply With Quote
  #5 (permalink)  
Old 08-24-04, 08:41
rweide rweide is offline
Registered User
 
Join Date: Aug 2004
Location: USA
Posts: 54
Very well, thank you very much.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On