Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 8th, 2004, 05:14 PM
Registered User
 
Join Date: Apr 2004
Location: Basking Ridge, NJ, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default MsgBox/InputBox in APS

I used the work around but I can't pass the value from
VbScript on the client to ASP on the server... Is there
a work around I missed???

Here's my program so far...

<%@ LANGUAGE = VBScript %>
<% Option Explicit %>

<HTML>
 <HEAD><TITLE>msgbox1.asp</TITLE></HEAD>
 <BODY>
 <B>PGM=msgbox1.asp </B><BR>
 <%
 'VBscript is here running along
  dim fname
 %>
  <SCRIPT LANGUAGE="VBSCRIPT">
   dim fname
   fname = InputBox("Enter your Name:")
   MsgBox("Your Name is:" & fname)
  </SCRIPT>

 <%response.write("Name>" & fname & "<BR>") %>

 <P><A HREF="msgbox1.asp">Refresh</A>
 </BODY>

</HTML>


  #2 (permalink)  
Old April 8th, 2004, 05:21 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi John,

What do you mean with "the work around"?

I think you're missing an important concept here. The VB script with the InputBox runs on the client, while ASP runs on the server.

To see the variables in your ASP scripts, you'll need to pass them to the user by using a <form> that sends the values using GET or POST.
You can add the Name the user enters to a (hidden) text box and then submit the form either through code or with an <input type="submit"> element.

If you need more help, please let me know.

Cheers,

Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: 11 - Lightning Song by Queens of the Stone Age (Track 11 from the album: Rated R)

  #3 (permalink)  
Old April 8th, 2004, 05:28 PM
Registered User
 
Join Date: Apr 2004
Location: Basking Ridge, NJ, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've been looking for an easy to follow example
of this technique if anyone has something to share...
tks -- jmh

JohnHoens
  #4 (permalink)  
Old April 9th, 2004, 01:45 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If you search Google (http://www.google.com/search?hl=en&i...able+send+form), you'll find lots of examples.

Is there anything in particular you need help with? In what areas do you have experience? This stuff is pretty much the basis of ASP programming, so it may be a bit too much to explain over a forum.

Imar



---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Don't Stop Me Now by Queen (Track 7 from the album: Greatest Hits 1 (The Platinum Collection))
  #5 (permalink)  
Old April 9th, 2004, 11:33 AM
Registered User
 
Join Date: Apr 2004
Location: Basking Ridge, NJ, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar, I'll check the link you suggest and work through the examples they provide. This should get me started and I appreciate your help.

I am working on a project to convert some applications/interfaces/databases from an IBM Mainframe to Oracle/PlSql/Cognos/Unix/NT/ASP... My next questions will be how to get my ASP program to Read/Update an Oracle DataBase on a Unix server. Wish me Luck!

JMH

JohnHoens
  #6 (permalink)  
Old April 9th, 2004, 04:09 PM
Registered User
 
Join Date: Apr 2004
Location: Basking Ridge, NJ, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar... I found what I was looking for on one of the websites you recommended.

<%@ LANGUAGE = VBScript %>
<% Option Explicit %>

<html>
<body>
<form action="msgbox2.asp" method="get">
Your name: <input type="text" name="fname" size="20">
<input type="submit" value="Submit">
</form>
<%
dim fname
fname=Request.QueryString("fname")
If fname<>"" Then
      Response.Write("Hello " & fname & "!<br />")
      Response.Write("How are you today?")
End If
%>
</body>
</html>

Many Thanks!

JohnHoens


Similar Threads
Thread Thread Starter Forum Replies Last Post
Oracle Aps Server Data Source Config for DB2 kasipandian Oracle 0 March 12th, 2008 12:13 PM
Active Directory and APS.net arnniema BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 February 20th, 2007 05:43 PM
Retreiving value from InputBox maniatis1 Classic ASP Professional 1 January 4th, 2007 03:36 PM
Error with the APS Crystal Reports 8.5 Tron45 Crystal Reports 0 March 16th, 2006 05:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.