Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > HELP .... javascript and ASP

Reply
Thread Tools

HELP .... javascript and ASP

 
 
Luc Dal
Guest
Posts: n/a
 
      02-17-2004
Hello,

I need your help : is it possible to call asp with javascript .If so, can
you give me a sample ?
And by the way, is it possible to call asp with javascript ?
Thanks


 
Reply With Quote
 
 
 
 
Roland Hall
Guest
Posts: n/a
 
      02-17-2004
"Luc Dal" wrote:
: I need your help : is it possible to call asp with javascript .If so, can
: you give me a sample ?
: And by the way, is it possible to call asp with javascript ?

You can write your code in javascript on the server side:
<%@ LANGUAGE=Javascript %>

You can use:
<script language="javascript" runat="server">

However, if you're referring to client-side javascript:
<script type="text/javascript">

....then to call ASP, you will have to reload the current page or call
another. If you want to pass variables, then you'll need to pass them
through HTML forms with GET or POST or pass location.href with parameters on
the URL, similar to GET.

To call javascript from ASP, then embed the variables in the javascript code
when you're writing your ASP code.

Ex.

<%
dim a
a = "a variable"
%>
<script type="text/javascript">
alert('<%=a%>');
</script>

Or you can use Response.Write("<script type=""text/javascript"">" & vbCrLf)
to write all of your client-side code to the page.

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


 
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
Javascript and IE? Javascript and C#? porter Javascript 6 10-06-2007 10:03 AM
dynamic javascript and html using javascript parez Javascript 0 09-11-2007 04:08 PM
New this group. Need some help on asp.net and javascript avakharia_ibsdev@yahoo.com ASP .Net 0 08-04-2006 06:36 AM
Need your help, I am new with javascript, what do I wrong? javascript form validation suddenly doesn´t work francisco lopez Javascript 2 12-30-2004 12:18 PM
asp.net - javascript form values interaction can asp.net read and write to nonasp forms? David Virgil Hobbs ASP .Net 0 01-06-2004 07:09 AM



Advertisments