473,398 Members | 2,380 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,398 software developers and data experts.

vs2k5 equiv.

hey all,
in vs2k3 i could loop thru all the elements in the document like the
following:
function getscrollvalue(){
elm=document.Form1.elements;
for(i=0;i<elm.length;i++)
if(elm[i].type=="text" && elm[i].name.match("scrollvalue")!=null){
a=elm[i];
a.value=(a.value=="")?0:a.value
}
}

is it different in vs2k5? because i'm getting "form1 is null or not an object"
thanks,
rodchar
Sep 13 '06 #1
3 1360
form1 is referring the id of the from on the actual aspx page (HTML)

Look on the page and see what the id is for the default form and adjust your
code accordingly
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:8C**********************************@microsof t.com...
hey all,
in vs2k3 i could loop thru all the elements in the document like the
following:
function getscrollvalue(){
elm=document.Form1.elements;
for(i=0;i<elm.length;i++)
if(elm[i].type=="text" && elm[i].name.match("scrollvalue")!=null){
a=elm[i];
a.value=(a.value=="")?0:a.value
}
}

is it different in vs2k5? because i'm getting "form1 is null or not an
object"
thanks,
rodchar

Sep 13 '06 #2
This has nothing to do with Visual Studio. This looks like client side
javascript? In which case, you don't have a form called Form1 on your page.

"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:8C**********************************@microsof t.com...
hey all,
in vs2k3 i could loop thru all the elements in the document like the
following:
function getscrollvalue(){
elm=document.Form1.elements;
for(i=0;i<elm.length;i++)
if(elm[i].type=="text" && elm[i].name.match("scrollvalue")!=null){
a=elm[i];
a.value=(a.value=="")?0:a.value
}
}

is it different in vs2k5? because i'm getting "form1 is null or not an
object"
thanks,
rodchar

Sep 13 '06 #3
doh! thanks for the help.

"rodchar" wrote:
hey all,
in vs2k3 i could loop thru all the elements in the document like the
following:
function getscrollvalue(){
elm=document.Form1.elements;
for(i=0;i<elm.length;i++)
if(elm[i].type=="text" && elm[i].name.match("scrollvalue")!=null){
a=elm[i];
a.value=(a.value=="")?0:a.value
}
}

is it different in vs2k5? because i'm getting "form1 is null or not an object"
thanks,
rodchar
Sep 13 '06 #4

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

Similar topics

8
by: Nige | last post by:
I've got an old web site that comes up before its replacement in Google listings. I've read the document on Google about sending a "301" code from the server:...
10
by: Newry | last post by:
Hi, If you have both this HTTP header: Content-Type: text/html; charset=ISO-8859-1 and this HTML element in the <head>: <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
1
by: Bob | last post by:
When debugging .Net in disassembly view with vs2k5 is there any way to view memory values using segments? I tried using quickwatch and also dropping the segment/pointer in to the memory window...
2
by: rodchar | last post by:
hey all, i'm installing iis on my dev machine which has vs2k5 on it. will this be a problem? thanks, rodchar
0
by: Quantum | last post by:
Hi there, I've got a VS2K5 project in the folder: c:\BigProject\Windows\ However, I've got all the source in this folder: c:\BigProject\Independent\
4
by: SteveW | last post by:
Now that vista and the 3.0 framework are gold, I'm a bit confused, so any clarification would be very helpful. The 3.0 framework is gold and is downloadable etc. What is not 'gold' and...
3
by: =?Utf-8?B?QWRpbCBBa3JhbQ==?= | last post by:
I posted this question in vsnet.ide newsgroup about more than a week back but didn't get any single response yet therefore, reposting again same to several newsgroups. When I run my C#...
8
by: Ross Culver | last post by:
I'm about to get a new computer for VS2K5 development. Is it ok to get Vista yet or should I stick with XP? Thanks, Ross
1
by: perhapscwk | last post by:
Hi, I use below in IE, it works but it not work in firefox, please help. <meta http-equiv="Site-Enter" content="revealTrans(Duration=2,Transition=23)"/> <meta http-equiv="Page-Enter"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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
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
isladogs
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...

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.