I am developing a application in C#, ASP.NET and I have a lot os divs in my page, each div is a container for a chat message and each div have a unique id: like this
I have a CustomValidator client script method that checks the value of a <input type="date" id="start"/> control. I'm accessing the date value using jQuery $('#start').val(), which works fine in Firefox and Opera. When I test in Chrome/Safari, the js console says that $('#start') is null. There is no problem using $('#start') outside the CustomValidator client method in Chrome/Safari. There is also no problem accessing the #start date object via document.getElementById('start') inside the validation method.
why jQuery selectors are failing inside this validation method for Chrome/Safari?
I want to create a program that allows me to enter the name of a table, a field along with a value. The program should concatenate the values to form a valid SQL select statement. I can also modify the program to include multiple field names and values. Example: -Select “FieldName” from “TableName” where “FieldName”= “Value” I have created 3 textboxes called and 3 labels named Select, From and Where This is my code here, i would need an assistance on the right way to achieve this, maybe mine is wrong.
Partial Class _Default Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim SelectItem As String Dim From As String Dim Where As String SelectItem = txtSelectItem.Text From = txtFrom.Text Where = txtWhere.Text lblDisplay = "Select" & " " & SelectItem & " " & "From" & " " & From & " " & Where End Sub End Class
I want to create a program that allows me to enter the name of a table, a field along with a value. The program should concatenate the values to form a valid SQL select statement. I can also modify the program to include multiple field names and values. Example: -Select "FieldName" from "TableName" where "FieldName"= "Value" I have created 3 textboxes called and 3 labels named Select, From and Where This is my code here, i would need an assistance on the right way to achieve this, maybe mine is wrong.
Ok heres the scenario: I have a table with many rows in it. Each row has a checkbox in one cell, and a span in another cell. What I want to do in my jquery is to go through the table and find each row where the checkbox is checked, and then store the value of the span in an array. I thought you might be able to do it as a selector rather than using a loop. I tried this but it didn't work
I'm creating an inbox system for my website which allows basic communication between users. I'm fetching the results with jquery calling a webservice. Then I'm using a jquery template engine to render the results to the screen. So far this all works good. but now I want to add some click functions on certain parts of inbox messages. For example I want the title of the message to be clickable so it will expand/collapse the fulltext which is hidden in a div beneath it.
But I can't seem to use the jquery selectors on this dynamic json result. It works when I put the function in the href tag itself but I don't really want to. I also tried adding the function after the success function but no luck either. Is it possible at all to use selectors with a template engine? I hope I made myself clear otherwise feel free to ask more information.
Is there a way of filtering large CSS files for the only required selectors on a page, and creating css files that contain just these selectors?
Case: I have a very large CSS file that I want to filter on a per page basis, so that the file size is cut down and can be cached by mobile devices. I was thinking along the lines of something like a server side dust me selectors tool.The particular project I am working on is using ASP.NET MVC.
In my jquery functions, I have many references like this: $("[id$=DDL_DOB_Day]"). I use this format as it works with master pages. The question I have is can i create a sort of alias for this variable so my code is not full of longwinded names? For instance:
i am able to click on the ImageButton and apply the Jquery highlight effect to a different div
$("#btnFavorite").click(function() { // selector for element to highlight $("#theDiv").effect("highlight", {}, 3000); });
Now i would like to extend the question as follows. I add the ImageButtons to the webpage dynamically, and i would like to apply the effect on the div for every ImageButton click.
What should i do in that case? By using ItemDataBound of the listview and adding attributes like btnFavorite.Attributes.Add("onmouseclick", "doSomething") or what?
I'm using LinqToSql like this with a CheckBoxList in ASP.NET:
var teachers = from x in dc.teachers select x; cbl.DataSource = teachers; cbl.DataTextField = "name"; cbl.DataValueField = "teacherID"; cbl.DataBind();
I want to display both "firstname" and "name" in the DataTextField however. I found this solution but I'm using LINQ: [URL]
I have a web forms app with a CSS file for layout. One of my elements, which will be much more difficult to do in CSS without using IDs, also has to have runat="server" since I control visibility server side.
My problem is that in the CSS, I don't know how to ignore that whatever div with my selectors, and unless I inline the CSS and put in server to client control translation, I won't know the control names until runtime.
How should I work around this? Is there a server side container control that doesn't render output but could be used to contol the visibility/rendering of its contents, or is there a trick in CSS to ignore that intermediate div? This is additionally confused by the fact I have the x div in a master page and the whatever and y divs are both in the page itself. I know this wouldn't be an issue if I were using MVC, but at this point switching is not an option.
Hello all i have this little issue getting this to work, i have a dropdownlist in asp.net inside a formview and jquery cant find the control im guessing because its inside a form, this is what i got and it works on another page without a formviewi get this errorName 'Country' is not declared
string title = string.empty; My need is that whatever string is passed to it I have to display the content inside a div with in a doublequotes .So I have written something like:
<div>"+ title +@"</div>
But how to add the doublequotes here? So that it will display like :
im using asp.net and somehow my escape characters dont seem to work
string testing = "my name is "abc"";
this gives the output : my name is "abc"
ive read all the tutorials, everywhere it says that ive to put " to use double quotes inside a string but i have no idea why my system isnt accepting the escape character.
the alligator tags <% %> are Not being highlighted, and when I run I get the following error in the yellow screen:the controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I am developing a web application that will allow the customer to enter a personalized message, which will then be converted to HTML. Well, the problem is that I can not allow the insertion of Javascript code. So I need a method that filters the text, searching for and remove it. I think the regular expressions to solve my problem, but I'm having difficulty building.
Why is it that a simple string inside a webpart not showing when the application is run ? Actually my requirement is to use a fusion (usually called as a function) and Visifire chart (usually called as a function from javascript) in web part which i'm not able to consume at all.