Visual Basic and JavaScript
From: Balex (Balex_at_discussions.microsoft.com)
Date: 09/17/04
- Next message: Randy: "VS.Net web deployment issue on staging server"
- Previous message: Randy: "RE: web project deployment error"
- Next in thread: Mikhail Arkhipov (Microsoft): "Re: Visual Basic and JavaScript"
- Reply: Mikhail Arkhipov (Microsoft): "Re: Visual Basic and JavaScript"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 17 Sep 2004 08:17:01 -0700
Hi wise guys,
I have taken up VB again after years of interruption, where I developed with
other tools, including recently Dreamweaver (DW). With DW, I did a prototype
of an app, using ASP, Javascript and Access, that had quite a bit of
Javascript code.
After having received, installed and tried out VSnet with a walkthrough, I
decided to do a small portion of my DW app in VB, as a web form. The part of
accessing the DB (SQLServer) went well, so I decided to take it a step
further and to add a small script which I had in the DW app to a cell of a
table in VB. That did NOT work, regardless of how I tried. Here is the
current code snippet (part of the HTML code of the Web form), which at least
doesn't produce any compile error, but just an exec error on which I can
continue:
<TR>
<TD style="WIDTH: 45px; HEIGHT: 23px"><FONT size="2">Datum/Zeit:</FONT></TD>
<TD style="HEIGHT: 23px">
<script language="javascript">
var jetzt = new Date(); Response.
Response.Write(jetzt.getDate() + "." + (jetzt.getMonth() + 1) + "." +
jetzt.getYear() + " " + jetzt.getHours() + ":" + jetzt.getMinutes());
</script>
</TD>
</TR>
The error I get is that 'Response' is not defined...
Pretty simple actually, I just want to print the current date and time in
that cell. In DW, this is a server-side script. I guess it's of course
possible with VB to achieve the same (current date/time in a table cell) in a
different way, but it is NOT what I want to achieve: I have LOADS of scripts
in my DW app, and I would like to know how much of these I ca "import" in the
VB app, and how much I have to modify them.
So I'd like to know:
- why is the Javascript not working
- what do I have to do to make it work
- how much of my DW scripts can I re-use.
Thanks a lot for your help to a VSnet/VB newbie.
Balex
- Next message: Randy: "VS.Net web deployment issue on staging server"
- Previous message: Randy: "RE: web project deployment error"
- Next in thread: Mikhail Arkhipov (Microsoft): "Re: Visual Basic and JavaScript"
- Reply: Mikhail Arkhipov (Microsoft): "Re: Visual Basic and JavaScript"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|