473,394 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

passing values from visual basic to vb script or javascript

Hi,

Anyone know how to pass a value textbox value from a VB6 activex control to vbscript.



thanks in advance,
karthik
Jul 14 '06 #1
1 3795
HI karthik_c,

The only way i know of would be via cookies.

Heres some code below i found on the web a while back about setting cookies in vb6.


Start with a new project and a single form. Add two Command buttons to the form: cmdMakeCookie and cmdGetCookie. Drop in this code and then try it out.


Private Declare Function InternetSetCookie Lib "wininet.dll" _
Alias "InternetSetCookieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String) As Boolean

Private Declare Function InternetGetCookie Lib "wininet.dll" _
Alias "InternetGetCookieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String, _
lpdwSize As Long) As Boolean

Private Sub cmdMakeCookie_Click()
Dim blnReturn As Boolean

blnReturn = InternetSetCookie("http://abstractvb.com/MyCookie.htm", _
"MyCookiesName", "Put Cookie Information Here")

If Not blnReturn Then MsgBox "Make Cookie Operation Failed!", vbCritical
End Sub

Private Sub cmdGetCookie_Click()
Dim strCookieText As String * 256
Dim blnReturn As Boolean

blnReturn = InternetGetCookie("http://abstractvb.com/MyCookie.htm", _
"MyCookiesName", strCookieText, 255)
If Not blnReturn Then
MsgBox "Get Cookie Operation Failed", vbCritical
Else
MsgBox strCookieText, vbInformation
End If
End Sub

Hope this helps
Jul 14 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Raju V.K | last post by:
can I use javascript and PHP in the following manner to create a pop-up window: <--- in <head> </head> <script language=javascript> function popup(folder1, file1) {...
1
by: Randell D. | last post by:
HELP! I am determined to stick with this... I'm getting there... for those who haven't read my earlier posts, I'm createing what should be a simple function that I can call to check that...
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
2
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks ...
5
by: Damien Kay | last post by:
Hi, I am relatively new to ASP.NET programming and have a problem with a web form that I have developed: I have a boolean variable which should be false when the application first starts but...
8
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this...
1
by: Paul D. Fox | last post by:
I'm trying to launch a Child Window from a hyperlink on a Datagrid and have it recieve multiple values from the Parent Window. Upon recieving the values in the Child Window, I need to access them...
6
by: Jerry Camel | last post by:
Basic Web Form... A few text boxes and a checkbox - and a card reader... The effect I want to accomplish is this: The basic credit card fields are there and can be filled out. But if the user...
4
by: meenu_susi | last post by:
i have different colors for shirt... When I click the blue color the shirt color will change to blue color and Near to that shirt I will have a button as design now when I click that button it...
7
by: rmurgia | last post by:
When a variable is created using Javascript, should it then be able to be read immediately using embedded VB code or does the submit command have to be entered or are the variables between...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.