Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Variables in VbScript without asp

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,112
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Variables in VbScript without asp
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Variables in VbScript without asp - 6/5/2001 9:31:09 PM   
  canalla

 

Posts: 2
Score: 0
Joined: 6/5/2001
From:
Status: offline
I want to do a program based in VbScript that uses a database.
But I want to do this only for the client side, without asp.
What I want to know is how can I pass a variable from one htm page to another. I mean, with asp you use for example page.asp?var=value , but i need to do this without asp (very important that you understand this)
Thank you
 
 
Post #: 1
 
 Re: Variables in VbScript without asp - 6/6/2001 2:09:56 AM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
Hi Canalla,

Yes it is possible without ASP, we can connect to the database using IDC (Internet data connector) & DHTML databinding ....but it is limited somehow.

What are your project's requirements?.

Regards,
Andi Zain

(in reply to canalla)
 
 
Post #: 2
 
 Re: Variables in VbScript without asp - 6/6/2001 2:15:53 PM   
  canalla

 

Posts: 2
Score: 0
Joined: 6/5/2001
From:
Status: offline
Thank you for your answer
My project doesn?t not require so much. I have only to insert data into a database and then make some queries, but it isn?t complicated. The program is to store the pacients info, for a doctor.
What I need to know is how can I pass a variable from a htm document to another. I mean, for example if I click in page1.htm on the link of the pacient named "Johnson", I need to use the variable "Johnson" on page2.html to make the querie. I know with asp this can be done for example like page.asp?var=value, but my project is for the client side.
I hope you could please answer as soon as posible, it?s really important for me.
Thank you for your attention.

(in reply to canalla)
 
 
Post #: 3
 
 Re: Variables in VbScript without asp - 6/6/2001 10:50:23 PM   
  adminkoe

 

Posts: 117
Score: 0
Joined: 12/23/2000
From:
Status: offline
Hi Javier,

You are welcome. Since the program is done at client side, you can use all features of ADO, yes you can write a stand alone application using VBScript furthermore it can be designed like window application using HTA, if you are not sure what HTA is, go to MSDN.

Here is a sample code to accomplish your goal:

page1.htm
=============

<HTML>
<HEAD>
</HEAD>
<script language="vbs">


sub redirect(patientName)

url="page2.htm?id=" & patientName

window.location=url

end sub

</script>
<BODY>


<a name="patient1" value="Johnson" onClick="vbscript:redirect(patient1.value)" style="text-decoration:underline;">Patient</a>


</BODY>
</HTML>

Please Note:link name should be different for each link e.g patient 2,3 and so on, you can do this dynamically using document.write

page 2.htm
==========
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK REV="made" HREF="mailto:">
<META NAME="generator" CONTENT="NoteTab Light 4.82">
<META NAME="author" CONTENT="">
<META NAME="description" CONTENT="">
<META NAME="keywords" CONTENT="">
</HEAD>

<BODY>

<script language=vbs>

msgbox window.location.search

</script>

</BODY>
</HTML>



Regards,
Andi Zain

(in reply to canalla)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Variables in VbScript without asp Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts