View Full Version : sever side javascript
scriptkeeper
05-27-2003, 01:04 AM
Hi everybody, I have been attempting to learn ASP and I read somewhere that you can use either vbscript or javascript in ASP. I was wondering if it is posible to do the same thing with either language? If so I am already experienced with javascript and have none with vbscript!
Also is it possible to read an access database with javascript?
jeena
05-27-2003, 07:30 AM
"I was wondering if it is posible to do the same thing with either language?"
hmmm....what do u mean by the above statement????
U can use vbscript and javascript in one ASP document.....just that vbscript is wrapped with this <%......%>
I read somewhere that you can use either vbscript or javascript in ASP
Within the ASP framework, you can use multiple scriptinglanguages but IIS must have a scriptingengine for the language. IIS (Microsoft webserserver comes standard with a scriptingengine for VBscript and Jscript. Jscript is thought of as Micro$ofts version of javascript. Never used it, but i think there are some (minor) diferences between javascript and Jscript.
I think that the vast majority of ASP coders (90%? more?) uses VBscript as scriptinglanguage. Allmost all code you see in this forum is VBscript. Why? Cause a lot of older Visual Basic coders made the switch to ASP (using VBscript) when officeapplications where replaced by webapplications. And it came more a less a standard scriptinglanguage for ASP (most tutorials, books, courses, ... use VBscript)
if it is posible to do the same thing with either languageMore a less. I sometimes come across Jscript-functions that doen't have a VBscript equivalent. Jscript also looks more complete to me + has more of a real programming language and is object based.
Also is it possible to read an access database with javascript?Yes. When using ASP, you use "embedded sql" to manipulate or define your database.This (embedded) sql is exactly the same in any programming language. Making the connection, recordsethandling etc will be different.
(Note : the virtual world is bigger then ASP so you might wanna learn ASP.NET, PHP, JSP ... instead)
So take your pick and make the leap !
Eskimo
05-27-2003, 10:54 PM
All of my ASP sites are written in javaScript.
I like having the same lanugage for both client and server side. I don't have make my mind change gears as often.
scriptkeeper
05-28-2003, 05:31 AM
Yes but Eskimo is it the same when you use Jscript with ASP, than with client side javascript. Im sure that it is quite different in some ways. Such as Response.Write() instead of document.write(). And I would think that the DOM would have nothing to do with scripting ASP. So how can i make such a transition?
Eskimo
05-28-2003, 10:53 PM
In some ways it is different, but you have to realize that you are not scripting client side. The ASP Built-In Objects Reference (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iisref/htm/ref_vbom_.asp) should help you understand what is different.
If you ever have any questions, I check this >=1 a week, and would be more than happy to help in any way I can.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.