Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Problem with <script> tag using runat=server and src attributes

Reply
Thread Tools

Problem with <script> tag using runat=server and src attributes

 
 
John MacIntyre
Guest
Posts: n/a
 
      09-29-2003
Hi,

I am having a problem executing server side javascript.

For some reason the script tag is ignored when the runat=server is combined
with the src attribute. The code is being used client side also, so
embedding it right into the page is not an option.

I have also tried the following code without success.
<script language=javascript runat=server>
<!-- #include file="T.js" -->
</script>

The problem is issolated in the following example.

Thanks in advance.,
John MacIntyre
VC++ / VB / ASP / Database Developer
http://www.johnmacintyre.ca


---------------------------
T.asp
---------------------------
<%@ Language=VBScript %>
<html>
<script language=javascript runat=server src="T.js"></script>
<script language=javascript runat=server>
function local_calcTotal( nA, nB)
{
return (nA + nB);
}
</script>
<body>
<%=now()%></P>
local calc : <%=local_calcTotal( 2, 2)%></P>
remote calc : <%=remote_calcTotal( 2, 2)%></P>
</body>
</html>

-----------------------
T.js
-----------------------
function remote_calcTotal( nA, nB)
{
return (nA + nB);
}


 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-29-2003
"John MacIntyre" <(E-Mail Removed)> writes:

> I am having a problem executing server side javascript.
>
> For some reason the script tag is ignored when the runat=server is combined
> with the src attribute. The code is being used client side also, so
> embedding it right into the page is not an option.


I don't believe earlier ASP versions works with src attributes on its
script tags, but IIS 5.0 should accept it.

<URL:http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q224/9/63.ASP&NoWebContent=1>

/L 'No, I didn't know that, but Google did.'
--
Lasse Reichstein Nielsen - http://www.velocityreviews.com/forums/(E-Mail Removed)
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Java Src to J2ME Src? macbrando@gmail.com Java 1 03-23-2007 01:29 PM
<txt src= ...> equivalent of <img src= ...> Steve Richter ASP .Net 3 02-09-2006 08:44 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
src.jar (src.zip) missing on Mac OSX Java 1.4.1 installation? Greg Johnson Java 4 09-18-2003 07:21 AM
Problem: Setting MSIE iframe innerHTML change relative href/src to absolute href/src Soren Vejrum Javascript 4 07-05-2003 01:47 PM



Advertisments