473,385 Members | 1,492 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,385 software developers and data experts.

How to pass the server side value to JavaScript object??

Joe

The following code won't work. Please advise. Thanks!

<script type="text/javascript"
function window_onload(
{ var params = new Array()
params["streetNumberPrefix"] = <% Request.Form("streetNumberPrefix") %>

</script></HEAD><BODY onload="window_onload()">
Jul 19 '05 #1
2 1573
"wont work" Is there an error?
is the Request.Form populating?
does the javascript function actually render even?

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Joe" <an*******@discussions.microsoft.com> wrote in message
news:32**********************************@microsof t.com...

The following code won't work. Please advise. Thanks!!

<script type="text/javascript">
function window_onload()
{ var params = new Array();
params["streetNumberPrefix"] = <% Request.Form("streetNumberPrefix") %>; }
</script></HEAD><BODY onload="window_onload()">

Jul 19 '05 #2
Joe wrote:
The following code won't work. Please advise. Thanks!!

<script type="text/javascript">
function window_onload()
{ var params = new Array();

var str= "<%= Request.Form("streetNumberPrefix") %>";
params["streetNumberPrefix"] = str

<%= is shorthand for <%Response.Write
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: richmond | last post by:
Please forgive me if this question is not readable for you. I definitely want to get in-depth on this. I am in front of a web application. On the server side, it has the main exe under...
1
by: jaya | last post by:
Hi, I am using asp.net to pass parameters from .aspx page to my Microsoft reporting service. My .aspx page has checkbox. If it is checked it the chekbox should pass value =0 to my report <INPUT...
8
by: Murali Inguva | last post by:
Hi Guys, Couple Questions 1. Is there any way that i can pass client Side Objects to Server Side. 2. Can i validate the data of serverside text boxes / combo box in client side? If you know...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
2
by: Augusto Cesar | last post by:
Hello people. How can I Pass ASP Array variable to Javascript; I´m to trying this: <script language="JavaScript"> var x = new Array(10);
3
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
5
by: Ben Dewey | last post by:
This is a repost, But I have some new information. I have a server that is configured for .NET 1.1 and 2.0. For some reason all my postback events for aren't firing when using .NET 1.1. Under...
4
by: Erland | last post by:
Hello everyone, I am have couple of bad concepts and would like to clear things up. As I understand ASP.NET server controls contain runat=server tag and they only run on the server. But I've...
3
Frinavale
by: Frinavale | last post by:
I've created a few ASP.NET Ajax Enable Server controls. There are 2 components to these controls: a server side Object that deals with the server side stuffs, and a client side Object that deals...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.