473,385 Members | 1,553 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.

JScript pass value

IS
Hi folks,

Any ideas why this doesn't work?

<SCRIPT LANGUAGE="JavaScript">
<!--
f = document.forms[1];
e = f.elements;
str = new String(e[0].value);
len = document.forms['testform'].d.options.length;
document.forms['testform'].d.options[len] = new Option(str, '1');
</script>

Basicaly, I am trying to fill my combo box on a HTML page (SELECT OPTION field) manually, but the vallue I get every time is 'null', i.e. empty string.
*Suspected error in the red line, since if I put in the last line "....new Option('some','1');" it works.

I must have made some ridiculous error I can't see, so plz be free to make fun of me :))

Thanks in advance.
IS
Jul 17 '05 #1
0 1339

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

Similar topics

4
by: Mark D. Anderson | last post by:
About a month ago Richard Cornford did an interesting analysis of a memory leak in jscript (internet explorer) when there are "circular" references between DOM objects and (real) jscript objects:...
6
by: Dan Roberts | last post by:
I am running some off-the-shelf software that is written in ASP, which uses JScript to generate dynamic content within HTML forms. There are several ASP pages which are partially rendering to IE,...
2
by: moondaddy | last post by:
I'm using vb.net and have an aspx page where I want to call a function in the code behind to do something on the backend and I want to call this function from a jscript function in the aspx page. ...
1
by: moondaddy | last post by:
This is a basic question but I cant seem to find the answer anywhere and have never tried it before. Here's one of many syntax I'm trying, but should at least show you what I'm trying to do: ...
10
by: SergioT | last post by:
Hi I wanna to create a jscript function that sets the value of a textbox into a datagrid, But the problem is How can I obtain the name of the textbox and send it to my jscript function???? The...
6
by: RFS666 | last post by:
Hello, After I posted yesterday "using C# class in jscript", I have a new problem: I have a C# class - DBResult - that contains (and other variables) a string array (and other variables), that...
5
by: GRB | last post by:
I'm using VB.Net 2003 to build a web page. I need to prompt the client for a name in order to save a list. I used the following code to btnSaveList.Attributes.Add("onclick", "var listname =...
2
by: Jer425 | last post by:
Hello, I'm coding in VB and trying to include a jscript file. This will not work because you can only use one language in asp.net. Is there a way that I can use the jscript without having to...
8
by: luke | last post by:
Hi there, Can anyone tell me a way to pass parameters from java script to ASP.net (VB.net)? Thanks
5
by: Jake G | last post by:
I have a flash word verification doohickey running on a page that submits an email (problem with a spammer). The code for the flash is...... <td width="109"<div id="flashcontent"> <object...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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.