473,486 Members | 2,296 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

passing variables between javascript and asp script in .asp page

1 New Member
Hi,
I just started programming in javascript, and I'm having a problem passing variables between javascript and asp code in .asp page. Can you please help?
I've given the sample code below.

----------------------------------------------------------------------------------
<script src="http://www.aurumtech.com/domain_str.js"
type="text/javascript"></script> <script type="text/javascript">
var email_str = "joe@example.com"
var domain_str;
domain_str = stripEmail(email_str);
</script>
<script type="text/javascript">
var curdate = new Date()
var time_stmp = curdate.getTime()
</script>

<p>The domain is {display domain_str here}</p>
<p>The time stamp is {display time_stmp here}</p>
---- display above in html, not using javascript document.write, is that possible? ----
<%
DIM email_domain_str, time_stmp_str
email_domain_str = {domain_str value from the above javacsript}
time_stmp_str = {time_stmp value from the above javacsript}
%>
-------------------------------------------------------------------------

Thanks very much.
Apr 3 '07 #1
3 2098
JosAH
11,448 Recognized Expert MVP
I moved this post to a more appropriate forum.

kind regards,

Jos
Apr 3 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
You can't pass javascript values like that to ASP. To do that, you will need to either change the page or use AJAX.
May 3 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
I moved this post to a more appropriate forum.

kind regards,

Jos
And I've just noticed that this is in the wrong forum - moving to the Javascript forum.
May 3 '07 #4

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

Similar topics

4
8513
by: Jason Us | last post by:
Does anyone have experience with passing variables from an ASP page to a JSP page. The way it currently works in passing the SSN in the URL. This cannot be good. I thought that storing a...
1
3594
by: Consuelo Guenther | last post by:
Hello, I am having problems with passing variables between pages. I have the following: First asp page has the function: -----------------------------------------------------------------------...
2
1997
by: Judy M | last post by:
I am a Javascript Newbie, but have read two of the brick-sized books and read the deja section and FAQ's and didn't find my answer. I'm sure it is simple and apologize in advance, but here goes......
12
6505
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
2
2505
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text,...
7
8977
by: Scott | last post by:
I need help to modify the code below to pass url variables from a framset. The click to run this will be in the mainFrame. This script works well in a non-frame page. Grabs the current url...
8
1793
by: CHouck | last post by:
I have what seems to be a simple problem but I can't figure it out. I have a page where I have a link with variables built in which I want to pass through the URL so another page can pick the...
9
2141
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script...
1
2195
satterfieldben
by: satterfieldben | last post by:
I have a newbie question about passing variables between functions. I am wanting to use a drop down box to select a value. Then base on which was selected, it would create a variable and I would call...
0
7105
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7180
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...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7341
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...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.