Hi,
Can I:
<script language="javas cript">
var TimeSec = new String (Request.form(" TimeInSec"));
or
<script language="javas cript">
var TimeSec = new int(Request.for m("TimeInSec")) ;
or
<script language="javas cript">
var TimeSec = Request.form("T imeInSec");
All three seems not working. Any workaround ? Thanks.
Regards,
Magix 6 14095
magix wrote:
All three seems not working. Any workaround ? Thanks.
What exactly are you trying to achieve? Do you want to use JScript on
the server in classic ASP? Or JScript.NET with ASP.NET? Or something else?
--
Martin Honnen http://JavaScript.FAQTs.com/
For example, there are 2 files, file1.asp and file2.asp
in File1.asp, i have
<form name="abc" method="post" action="file2.a sp">
loop through some Db table record, and assign the value, like
<input type="hidden" name="QTimeInSe c" value="<%=QTime InSec%>">
</form>
after SUBMIT the form,
in File2.asp, i need to assign the value of request.form("T imeInSec") to
javascript variables for some further actions.
So, just wonder on how to apply the usage of Request.Form in javascript.
<script language="javas cript">
var TimeSec = new string (request.form(" TimeInSec"));
...
...
</script>
"Martin Honnen" <ma*******@yaho o.dewrote in message
news:47******** *************** @newsspool3.arc or-online.net...
magix wrote:
>All three seems not working. Any workaround ? Thanks.
What exactly are you trying to achieve? Do you want to use JScript on the
server in classic ASP? Or JScript.NET with ASP.NET? Or something else?
--
Martin Honnen http://JavaScript.FAQTs.com/
magix wrote:
For example, there are 2 files, file1.asp and file2.asp
in File1.asp, i have
<form name="abc" method="post" action="file2.a sp">
loop through some Db table record, and assign the value, like
<input type="hidden" name="QTimeInSe c" value="<%=QTime InSec%>">
</form>
after SUBMIT the form,
in File2.asp, i need to assign the value of request.form("T imeInSec") to
javascript variables for some further actions.
So, just wonder on how to apply the usage of Request.Form in javascript.
<script language="javas cript">
var TimeSec = new string (request.form(" TimeInSec"));
...
...
</script>
Do you want to use JScript on the server instead of VBScript? Or do you
use VBScript in your ASP pages and want to pass values to client-side
JavaScript?
--
Martin Honnen http://JavaScript.FAQTs.com/
I just want to pass the parameter value to javascript in another asp file.
Question is how's the usage of Request.Form in javascript ? Or is it
possible to use Request.Form in javascript
Regards.
"Martin Honnen" <ma*******@yaho o.dewrote in message
news:47******** *************** @newsspool2.arc or-online.net...
magix wrote:
>For example, there are 2 files, file1.asp and file2.asp in File1.asp, i have <form name="abc" method="post" action="file2.a sp">
loop through some Db table record, and assign the value, like <input type="hidden" name="QTimeInSe c" value="<%=QTime InSec%>"> </form> after SUBMIT the form, in File2.asp, i need to assign the value of request.form("T imeInSec") to javascript variables for some further actions. So, just wonder on how to apply the usage of Request.Form in javascript.
<script language="javas cript"> var TimeSec = new string (request.form(" TimeInSec")); ... ... </script>
Do you want to use JScript on the server instead of VBScript? Or do you
use VBScript in your ASP pages and want to pass values to client-side
JavaScript?
--
Martin Honnen http://JavaScript.FAQTs.com/
magix wrote on 22 dec 2007 in comp.lang.javas cript:
<script language="javas cript">
var TimeSec = new string (request.form(" TimeInSec"));
...
...
</script>
You are mixing serverside code,
ASP-vbscript or ASP-j[ava]script,
with clientside Javascript.
That is imposible as the two interpreters run on seperate machines
and not even at the same time.
Serverside coding renders a stream of HTML [+ clientside scripts]
that are sent to the client, read browser.
ASP Request.form() returns a string if it exists.
So try this:
<script language="javas cript">
var s = '<% = request.form("v 1") %>'; // posting a string
var n = <% = request.form("v 2") %>; // posting a number
</script>
The string should not contain '-s
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Thanks Evertjan. This works well.
"Evertjan." <ex************ **@interxnl.net wrote in message
news:Xn******** ************@19 4.109.133.242.. .
magix wrote on 22 dec 2007 in comp.lang.javas cript:
><script language="javas cript"> var TimeSec = new string (request.form(" TimeInSec")); ... ... </script>
You are mixing serverside code,
ASP-vbscript or ASP-j[ava]script,
with clientside Javascript.
That is imposible as the two interpreters run on seperate machines
and not even at the same time.
Serverside coding renders a stream of HTML [+ clientside scripts]
that are sent to the client, read browser.
ASP Request.form() returns a string if it exists.
So try this:
<script language="javas cript">
var s = '<% = request.form("v 1") %>'; // posting a string
var n = <% = request.form("v 2") %>; // posting a number
</script>
The string should not contain '-s
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robert Mark Bram |
last post by:
Hi All!
I have the following code in an asp page whose language tag is:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
// Find request variables.
var edition = Request.Form ("edition");
var language = Request.Form ("language");
Response.Write("Edition is type "" + (typeof edition) + "" and
value "" + edition + ""<br>");
|
by: Matt |
last post by:
My problem is when the user click the submit button, it will launch another
new window for the request page. I want to confirm we cannot use JavaScript
open window functions to open a request page? The following page2.asp won't
output the value entered in page1.asp. However, if we do <form
action="page2.asp" method="get" target="_blank">, then it will open a new
window for the request page, instead of using the same window as page1.asp....
|
by: Agoston Bejo |
last post by:
Hi.
x1.asp:
<form method="post" action="x2.asp"> .... </form>
x2.asp:
DoSomeAdministration()
Response.Redirect "x3.asp?" & Request.Form
x3.asp: further processsing of data
|
by: Laurent Bertin |
last post by:
Hi i got a strange problem but it's true i don't make thing like anyone...
First Config:
+ IIS5.0 SP2 (yes i know...)
WebSite Security
Root : Digest Authentication, NT Authenticated
SubFolders : Anonymous Login
Anonymous login is set to use a domain user to enable a sql server
authenticated connection. Permissions are based on Page/action/user Membership
|
by: news.rcn.com |
last post by:
How can I access the request and response object for a page using
javascript. I want to stick some data on with something like
request.setAttribute( "User's choice for later use" ).
I can't seem to find a reference to request or response objects in
JavaScript either in Google Groups or O'Reilly's "JavaScript the Definitive
Guide" (surely it should be in the latter, huh?)
I know I could use a hidden form element but the data would be a...
| |
by: George |
last post by:
VS.NET 2002/VB
Is it possible to retrieve HTML form variables that are hidden input types using
Request.QueryString() and/or Request.Form()?
I have tried various ways of using those, but to no avail. My HTML form method is set to POST, and I
thought I had read somewhere that this could be done.
If it is not possible, is there any way to retrieve HTML form variables into my .aspx page?
|
by: Mr Newbie |
last post by:
DropDown lists and Listboxes do not appear in the list of controls and
values passed back to the server on PostBack in Request.Form object. Can
someone confirm this to be correct and possibly answer why ?
The impact of this is that values added via javascript will never make it
back to the server side code unless one does some jiggery pokery with hidden
fields etc. If this is true, then I would like to understand the reason
behind the...
|
by: =?Utf-8?B?QVRT?= |
last post by:
PRB JavaScript in ASP with Request.Form
Please help,
I'm having a problem with JavaScript in ASP, where the ASP page crashes when
I try to determine if data was posted from a FORM or through a QueryString.
Where, if the data came through via a FORM, I want to use it 1st, but if not,
to then try using it from the QueryString. Basically, the problem boils down
to using "toString()" on Request.Form("NAME") and Request.QueryString("NAME")...
|
by: =?Utf-8?B?QVRT?= |
last post by:
HOWTO Make CStr for JavaScript on ASP w/ Request.Form and QueryString
In ASP, Request.Form and Request.QueryString return objects that do not
support "toString", or any JavaScript string operation on parameters not
passed.
Example: Make a TST.asp and post to it as TST.asp?STATE=TEST
<%@ Language=JavaScript %>
<%
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |