473,809 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft JScript runtime error: Object expected

24 New Member
function Showdiv()
{
var SelectStates = document.getEle mentById('Selec t1').value;
if(SelectStates ="3")
{
document.getEle mentById("div2" ).style.display = "block";
}
else

document.getEle mentById("div2" ).style.display = "none";
}
function GoToPage()
{
var SelectStates = document.getEle mentbyId('Selec t1').Value;
window.open('Lo tteryResultPage .aspx?country=' +SelectStates+) ;
}
I have above js function and i am calling those function like below in the ascx control.

<select id="Select1" onchange="Showd iv()">

<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 3073
Plater
7,872 Recognized Expert Expert
if that code is cut and paste then the problem is this:

window.open('Lo tteryResultPage .aspx?country=' +SelectStates+) ;


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
7475
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 Settings\ZoneMap The below code runs on a timer running several times per second and after about 15-30 minutes or so, it runs out of handles and crashes IE. I found an article on msdn discussing how setting properties in this
1
1013
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. Got this error when I tried to run a very basic page... code: <%@ LANGUAGE=vbscript %> <%
1
4229
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"%> <!--#include virtual="/Connections/EmployeeStatusChange.asp" --> <%
2
5059
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 MSxml3.0 SP7 and re-registered my msxml.dll's. I find a lot of reference to this error, but nothing that seems to address my problem. I do not get any entries in Event Viewer. Can anyone help? Error Type: Microsoft JScript runtime (0x800A01AD)...
1
3057
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, the calendar should return to the main webpage, but it cannot find the home window again. I'm getting this error: Microsoft JScript runtime error: 'self.opener.document.idFormMain.txtPeriodOfOperationEff' is null or not an object I've...
7
24233
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", "<script language=javascript>\r\n" + "<!-- \r\n" + "function DoPreview()\r\n" +
3
8653
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 inside the folder "menu_script". The following is the code in this file. var menuOffsetTop=menuOffsetLeft=submenuOffsetTop=submenuOffsetLeft=submenuOffsetRight=0; var Doc=this.document;var standards=Doc.createElement&&Doc.createTextNode?1:0;...
2
1848
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 create button after entering a new Workplan name, I get the jScript error: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html...
26
3752
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 only the name of the document and txtbox is diferent on the other pages Pleas help me this is the compleet error Runtime-fout Microsoft JScript: 'document.OverurenDecl.txtMedewerker' is empty or not an object
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10376
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 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...
1
10387
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
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 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...
1
7662
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 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...
0
6881
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();...
1
4332
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
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
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...

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.