JQuery :: Why This Code Is Not Working As Expected
Dec 18, 2010[Code]....
[Code]....
//Ideally this should hide al the anchor tags with in tr tag. But this piece of code is not working as expected. nothing is fading out. [Code]....
[Code]....
[Code]....
//Ideally this should hide al the anchor tags with in tr tag. But this piece of code is not working as expected. nothing is fading out. [Code]....
This code is working in firefox but on IE 8 it returns nothing
<script type="text/javascript">
$(document).ready(function(){
var pageUrl = '<%=ResolveUrl("~/test/test.aspx")%>';
// Test
$('#<%=ddlTest.ClientID%>').change(function(){
var trgId = $(this+'input:checked').val();
$.ajax({
type: "POST",........
[code]....
this is my webform design code..
click function wat written in side script tag is not working... Anything wrong.?
I have the following Extension Method
Imports System.Runtime.CompilerServices
Namespace Extensions
Public Module IntegerExtensions
<Extension()>
Public Function ToCommaDeliminatedNumber(ByVal int As Integer) As String
Dim _input As String = int.ToString
Select Case int
Case Is > 99999 : Return _input.Remove(_input.Length - 3) & "k"
Case Is > 9999 : Return Math.Round(Double.Parse(int / 1000), 1).ToString & "k"
Case Is > 999 : Return String.Format("{0:N0}", int)
Case Else : Return _input
End Select
End Function
End Module
End Namespace
And in one of my classes I'm using user.Reputation.ToCommaDeliminatedNumber I am importing the Extensions Namespace into the Class, but the error I'm getting is...'ToCommaDeliminatedNumber' is not a member of 'Integer?'. I do have other Extension Methods for Strings and Dates that work exactly as expected... I'm just at a loss on this one.
I'm using some JS to show some divs.The divs' content is set up in a MultiView control in the server. Depending on certain parameters, I trigger some postbacks to make the server select the appropriate view. The problem is that everything works if I keep the alert(1); below, but stops working if I remove it.
Here is the code. I have a button which its OnClick() calls ShowEditor(), with an element and a type. ShowEditor() makes the editor's div visible after raising a postback to let the server select the correct view in the MultiView based on the type. This works fine. The editor loads and there is a div inside (vwText_Text1) which I'd like to assign an OnClick event to. This only works if the alert() is present.
[code].....
I am facing an interesting issue related to user control validation. I have a strongly typed user control with address entity. I have also created the address entity metadata class with validation definitions. This user control is basically to search and get the address based on the pincode user input. Pincode field is part of the user control and I have defined the required field and regexp validator for pincode field in the address metatdata class.
Now the user control is partially rendered in the customer page where I want to validate the pincode field in the customer page when the user clicks the search button in the user control.But the strange thing is the validation is not working as expected when I click the search button but when I bind the form collection to the entity using update module, I am getting an error. Can anyone help me what all I need to consider in the control ascx page and in the customer aspx page and in the controller?
On my underlying DB I have 3 tables. 1 of those tables comprises of just the primary keys of the other 2 tables. When I built the Model, it recognised this and so didn't actually generate an entity for this table, but instead made a many to many relationship between the other 2 tables.Now when I save changes against the context. (new records) under the hood the table with just primary keys are not populated. How do I get this table populated?
View 4 Replies am getting objected expected error in my jquery how to reselove it.........i am try to redirect to login page when the session gets time outs.........
<title>ManageEmployeeProfile</title>
<% if (this.Request.IsAuthenticated)
{
int sessionDialogWait = 2 * 60 * 1000 - 60 * 500; // ms = 1.5 minutes
int sessionTimeout = 1 * 60 * 1000; // ms = 28 minutes
getting error in this part as 'Object Expected' in this part " $(document).ready(function () {" either i should add any thing in my page....
I use ModalPopupExtender in my page
I have 2 imagebutton
1-Imgcab
2-imgenter
Below are my imagebuttons event code
protected void Imgcap_Click(object sender, ImageClickEventArgs e) {
string data = Server.UrlEncode(Txtbeh.Text);
SqlCommand _cmd = new SqlCommand("housepass", _cn);
_cmd.CommandType = CommandType.StoredProcedure;
_cn.Open();
[Code]....
when I click on ImgEnter it show popup menu ModalPopupExtender.Show();
It is correct problem is that when I click on imgcap if it run first ELSE condition it does Session["MessageError"] = true; and it show popupmenu (it show ModalPopupExtender)
I want it just show popup menu (ModalPopupExtender.) just when I click on imgEnter button ....
I have <asp: listbox control in the page and I have binded it with sql table below data
1 India
2 USA
3 China
4 Japan
5 Australia
Selected values 2 or 3, I am inserting in to the tblworld and after inserting when I come back for editing then showing as selected values, here user can changed the selected values. When user selected or deselect the list box checking with the below code as
[Code]....
I am not getting expected output from the above code, get the proper output?
I have a form that gets populated by LINQ and I want to be able to update the database using that same form. The form is populated by grabbing a querystring (for example, "edit=10") and searching the primary key for that record. So far so good. I have a button attached to the function below which is supposed to use LINQ to update the database with data from the form. I get no errors, but for some reason, it is only updating one field (Last_Updated) instead of all of them.
[Code]....
Trying to get jquery to work in VS 2010 Premium. I've got a simple asp.net webapp with a .aspx that doesn't use a master page with the code below. When I run it I get the error in the subject line. I've got the following in the scripts folder:
jquery-1.4.1-vsdoc.js
jquery-1.4.1.js
jquery-1.4.1.min.js
<body>
<script type="text/javascript">
$(document).ready(function () {[code]....
Image button not giving postback in Google Crome, The same code is working fine for IE8 and Firefox 3.6.6
<asp:ImageButton ID="btnlogin" runat="server" ImageUrl="~/images/log.jpg"
onclick="btnlogin_Click" OnClientClick="return confirmAction(this)" />
done some html code updates on my company's asp.net website and the above error appears.
i dont have a line 474 on the errored file.
this error only on IE, and not FF.
I wanted to create one js file which includes every js files to attach them to the head tag where it is.
But i am getting this error
Microsoft JScript runtime error: Object expected
this is my code:
[code]....
The error i get seems to be centered around jquery finding what it's in (window,document, etc.). Right now i'm just trying to implement the jQuery datepicker. the project has a master page, where i placed my script references.
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />[code]...
I have tried document and window for jquery context, but they both throw the same error.
I am attempting to implement the suckerfish menu found on this tutorial. I get "object expected" error from the sample javascript:
$(document).ready(function () {
$("#nav-one li").hover(
function () { $("ul", this).fadeIn("fast"); },
function () { }
);
if (document.all) {
$("#nav-one li").hoverClass("sfHover");
}
});
I have imported the JQuery using:
<script type="text/javascript" src="~/Scripts/jquery-1.4.1.js"></script>
The JQuery import is in the page header. The javascript is just inside the <body>.
It would be nice if I could tell which object is having the issue instead of being pointed at this block of code. I'm new to JQuery and beginner level javascript.
UPDATE
The start of the menu:
<ul id="nav-one" class="nav">
<li>
<a href="#item1">item 1</a>
<ul>
(I think the #nav-one points to the id of the menu "nav-one").
And I believe this css covers the "sfHover" part:
#nav-one li.sfHover a {
background: #ccc;
color: #000;
} [code]....
In my global.asax I have url routing setup like below:
routes.MapPageRoute("User Logon", "{Vendor}/Logon", "~/Logon.aspx");
In the logon.aspx page, I have a script that "stylizes" the logon button:
<link href="jquery/css/flick/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" />
<link href="images/style.css" rel="stylesheet" type="text/css" />
<script src="jquery/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery/js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%= ButtonLogon.ClientID %>').button();
});
</script>
When I access the page us a url (in debug mode) http://localhost/logon.aspx?v=1 the page loads correctly and the jquery button command loads correctly. But then I access the page using the new url route, I get this error.
Microsoft JScript runtime error: Object expected
This was working on Friday, and now isn't. I've got this at the beginning of a UserControl:
<link type="text/css" href="/App_Themes/css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
<script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
[code]...
i am getting this error when the below condition match, i am using the below code in Content page and in my master page i have this
<asp:ScriptManager EnablePartialRendering="true" EnablePageMethods="true" ID="smgr" runat="server" />
Error: Microsoft JScript runtime error: Object expected
if (lstRecipient.Items[i].Text == ddlRecipient.SelectedItem.Text)
{
lstRecipient.Items.RemoveAt(i);
isDuplicate = true;
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "AlertAdd", "jAlert('Recipient name is already in the list.', 'Duplicate Entry!');", true);
}
I have made EnableViewState="False" in @page directive. But still all all controls in page maintaing values even after submit.
View 2 RepliesI'm trying to test if ASP.NET is working on my customers IIS 7.5 server, the code below works fine on my server.
<html>
<body bgcolor="yellow">
<center> [code]....
Using the exact same text.aspx file containing the above code he gets the error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS1002: ; expected
Source Error: Line 3: <center>
Line 4: <h2>Hello</h2>
Line 5: <p><%Response.Write(now())%></p>
Line 6: </center>
Line 7: </body>
Source File: c:inetpubwwwrootmyapp est.aspx Line: 5
His server will be running a Swiss version of Windows (if that makes any difference).
My application is working fine in local environment but not working after push code in live. My locale environment and hosting environment both are having same configuration. Same app working fine 2 month before but in different domain but same hosting server.
how to check the both config / any possible to run debug mode in hosting server please let me know. below code used in all page for checking user session status but when I click on any link page redirect to login.aspx I think session got timeout. I don't know why session got time frequently, but this issue not happening in local environment (desktop).
[Code]....
[Code]....
In my Application i write one javascript function as
Page.ClientScript.RegisterStartupScript(typeof(Page), "myscript", "<script >document.execCommand('SaveAs');</script>");
to save that file.
its working fine in IE but in firefox mozila that save as window is not comming.
which function will work for both IE and FireFox mozila.
If Not IsDBNull(ext) Then
ext = LCase(ext)
End If
Select Case ext
'Case ".htm", ".html"
' type = "text/HTML"
'Case ".txt"
' type = "text/plain"
'Case ".doc", ".rtf"
' type = "Application/msword"
'Case ".csv", ".xls"
' type = "Application/x-msexcel"........................