Javascript runat = server question

Results 1 to 2 of 2

Thread: Javascript runat = server question

  1. #1
    Join Date
    Dec 1969

    Default Javascript runat = server question

    If I use javascript or vbscript with the runat = server as parameters how does this differ from client-side scripting?<BR>If the client browser has scripting disabled or turned off will running the script at the server still work? Will it work for events that are fired when on a client browser action?

  2. #2
    57Chevy Guest

    Default RE: Javascript runat = server question

    While there are many implications I&#039m sure I&#039m missing, briefly it&#039s like this: <BR>A script tag that has the runat attribute set to server is run "where the web site is," so to speak. This means database and file access on the web server is possible, which is obviously not a capability of client-side scripting. That may be a reason you&#039d want to run script on the server. <BR><BR>Another implication is that you are given a different Object Model. Just as an example:<BR> <BR>&nbsp;&nbsp; Response.Write ("message for you run server side");<BR><BR>is used in the ASP Object Model; with client-side JavaScript, <BR>you&#039d say <BR><BR>&nbsp;&nbsp; document.write ("message run client-side");<BR><BR>Since an ASP page is "pre-processed," processing and eliminating the server script, all your client browser receives is HTML, to which it has no objection.<BR><BR>Hope this helps, but in any case, you should check out this article:<BR><BR>G:):)D Luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts