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

Microsoft JScript runtime error: Object expected

function Showdiv()
{
var SelectStates = document.getElementById('Select1').value;
if(SelectStates ="3")
{
document.getElementById("div2").style.display = "block";
}
else

document.getElementById("div2").style.display = "none";
}
function GoToPage()
{
var SelectStates = document.getElementbyId('Select1').Value;
window.open('LotteryResultPage.aspx?country='+Sele ctStates+);
}
I have above js function and i am calling those function like below in the ascx control.

<select id="Select1" onchange="Showdiv()">

<asp:Button runat="server" ID="Button1" Text="Go" OnClientClick="GoToPage()" />

but when i run this it gives error 'Microsoft JScript runtime error: Object expected' , can anybone tell me why?
thanks
pratima
Jan 21 '08 #1
1 3059
Plater
7,872 Expert 4TB
if that code is cut and paste then the problem is this:

window.open('LotteryResultPage.aspx?country='+Sele ctStates+);


You have an extra + at the end of your string
Jan 21 '08 #2

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

Similar topics

39
by: tydbowl | last post by:
I have a problem where the below code chunk causes handle leaks on some machines. The leak APPEARS to be handles to the registry key: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet...
1
by: PaulieS | last post by:
Hi all. Am migrating a customer from IIS5 on W2K server to IIS6 on W2K3. Zipped all the websites and unzipped them to the identical locations on new server. Used IISMT to migrate metabase. ...
1
by: JNariss | last post by:
Hello, I have created a connection to my Access database with Dreamweaver and made a simple form with 4 fields. The code behind this form was/is: <%@LANGUAGE="VBCRIPT" CODEPAGE="1252"%>...
2
by: emfinkk | last post by:
Everything was working fine. I installed a bunch of Windows Updates and now I can no longer create ActiveX objects on 2 different Web Servers (1 Server2000, 1 Server2003). I have reinstalled...
1
by: finditajr | last post by:
Hello I'm having the following problem: My main webpage calls a function stored in a .js file that creates an HTML window to display a calendar. Whenever I click on a date in that calendar,...
7
by: EdEvans | last post by:
have the following code on a page: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Page.ClientScript.RegisterStartupScript(this.GetType(), "DoPreview",...
3
by: suganya | last post by:
Hi Some professionals already has developed the project using menu. In my company, they have given me task to clear the error in that. It is a script file named as "menubarAPI4.js" which is kept...
2
by: Francine | last post by:
Below is the code - I did not write this. This is a legacy program written in Perl, Html and java. I'm supposed to convert to dot net. This is the original code I was given. When I click on the...
26
by: asmx126453 | last post by:
Hey Guys, i have a question about that error is there a specfick thing were the error on focus becase i have a DOTNET project and it shows on almost evry page that error if i whanne add something...
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...
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...
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
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...
0
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
agi2029
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,...

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.