I am fairly new to jQuery. All the examples that I find online and in the book that i bought refers to the functions that you declare in the web page <head></head>. Nowhere can I find a good example of how i can use an additional .js file to hold all my jQuery functions in. like normal javascript functions that you use, you reference the external .js file in the <head> and then you are sorted.I hope i am clear enough. Can someone please give me detailed steps on how to get this done? I am alwys on the lookout for best practices and know it is better to keep the code seperate from the web page.
I have a project at work where I need different versions of the same site.
I need to accomplish this by having different versions of the same resource files.
I would like to store the different versions of the same resource files in seperate projects in the same solution. Then choose which project of resource files to use when I publish or compile.
I've been searching the net everywhere and my deadline is coming up.
Here is what i would like to be able to do with the urls/routes:
1) www.domain.com/customer/home/index
2) www.domain.com/home/index
Where both the home controllers should be seperate controllers with seperate views and the company part should be an param for all the actions in the controllers.Now why i want to be able to do this is because of the following scenario: Each customer will have there own pages (which actually will all be the same for each customer but with different information per customer). The one without the customer is the general website where non customers can go to to become an customer or get information about the services we provide for them, they can sign up etc.
I have a problem I am using a date picker ... jdpicker and I also tried with UI DatePicker and I keep getting this error "..." is not a function even though intellisense detects the function.My code is as simple as using the default options such as
$('#txtDate').jdPicker() or $('#txtDate').datePicker()
I have aspx page and in that page i registerd ascx page. i want to access the aspx page <div id = "idofdiv"> from ascx page jquery function. i have jquery function in ascx page. i want to access idofdiv in that function.
But when I have a ListView or DataView, etc... with a pager, I get problems when I click on 'next page'.Then I get the error: Validation of viewstate MAC failed. When I don't use Jquery's load function, I don't get an error.
How can I trigger a jQuery function with the Gridview Select button?
I want that the select button trigger the jquery function that has the row details (it's already working with a asp:buttonfield ), and select the row so i can get the values and send it trough e-mail with another button. I don't know if this is possible.
Can I trigger the jQuery function from code behind with the select button Sub? How?
Is it possible to attach an function on a function?
I would like to have and on sart event and an on end, that I could attach to a function. So when a function starts the event is triggerd and when the function ends an event is triggers. Where the event could be an function.
the developer who wrote this code is no longer with us and there are absolutely no comments whatsoever for us to know whats happening. Me and my other co-worker are just learning .net and hence not that much experts. can some one please tell us what the code does in both the files below and how they are related to each other ( we are very +VE that they both are related) first file. its called products.aspx. the code is below
I created a file cleanup function by using health monitoring. It is deleting file that is no access from another process. So, I want to check this. Is it stay access. If not access, I delete this file. How can I do?
The split function as it is written above is splitting the third line into 6 columns because there is a comma in the data. Is there a way for me to tell the split function to ignore commas in strings?
i have doing a video stream project,so i am facing a probrem while i encode the video. after the user upload the video,i call a funtion continue after the video complately uplaod. the problem is while the server side encode the video,i make the use have to wait at that page until the video is complately encode. is that any posible to seperate the upload and encode running?is that using
i wish to do is after the user upload the video,it can free using the webpage again .and in the same time the video is undergoing encoding trigger by video competely upload at the server side.
I have 2 ActionResults both called Create which basically create different things on a model. Is there a way to have overridden action results? - I dont quite follow routing and not sure how to do what I'm trying to do.When creating A i call :-
AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(ProjectModel
This is my first foray into jquery. I wrote a function that will wrap four sides and four corners around a div, effectively placing a border around a box. I would like to pass in height, width, and a third parameter to indicate hoe much padding that particular box should get. How can I do this?
I have a asp.net 4 web application. I am doing some SEO and performace tunning. I noticed that ASP.Net generates a lot of scripts on the fly, eg for validation and AJAX
is there any way these scripts can be put into a seperate file so it makes more code more relevant to content and reduces page size?
I have a table that loads after the intial load of the document so I can't use$(document).ready function()I have been able to manipulate every thing else using the live function, besides applying the css. Can some one tell me how to use the live and addClass functions together without using the click event. Some of the other events I tried are mouseover, mouseout, mousemove, hide(); etc. Here is the code snippet:
$('.mycontent').live('someevent', function () { $this.addClass('mynewclass'); });
Basically I want to hide the .mycontent item but after the document has been loaded and certain postbacks have been made.
I am trying to add some jquery to span with a class added to it. I am using asp.net and trying to use RegisterClientScriptBlock to attach the below code to my element. "cphMain_ed1" is hardcoded in this example however I would normally been passing a parameter here just for the ease of this.
[code]....
What am I doing wrong as the function is not been attached to the span with the class "closeButton"
I wonder if I could call a Function in code behind from jquery(client side), not to trigger a jquery function from code behind? I can not use linkbutton and button it must be a A-tag otherwise it loose it's purpose
I have a page with some custom validation which displays a result in a validation summary. I would like to reposition this validation summary to the bottum of the page without causing the page to scroll with the length of the validation summary. I have a jQuery function which does this very nicely, however, I need to execute this jQuery after the validation summary is displayed and i'm not sure which event to trigger.
$(document).ready(function(){ $("#<%= vsmSummary.ClientID %>").change(function(){ var newTop = $(window).height() - $("#vsmSummary").height(); var newLeft = ($(window).width() - $("#vsmSummary").width()) / 2; $("#vsmSummary").css( { 'position': 'absolute', 'left': newLeft, 'top': newTop } ); }); }); In my custom validation method I build this string and register with the RadScriptManager... Dim scriptText As String = "$(document).ready(function(){ " + _ "$(""#<%= vsmSummary.ClientID %>"").ready(function(){" + _ "var newTop = $(window).height() - $(""#vsmSummary"").height();" + _ "var newLeft = ($(window).width() - $(""#vsmSummary"").width()) / 2;" + _ "$(""#vsmSummary"").css(" + _ "{" + _ "'position': 'absolute'," + _ "'left': newLeft," + _ "'top': newTop" + _ "}" + _ ");" + _ "});" + _ "});"
RadScriptManager.RegisterClientScriptBlock(Me.upSCPPage, Me.upSCPPage.GetType(), "DynamicVSM", scriptText, True) This works!! I had no clue that I could call this from my code behind!! I will be doing this much more in the future!
I want to call an action method when an textbox gets focus to get a description of the model object that field is associated with from a database.
I have this jQuery function:
[code]...
It works fine as far as getting the test text, but the problem is if I set a breakpoint in the action method, I see that it gets called over and over, not just when i change focus in the text boxes...
i am using a jquery progress bar, and i want to dynamically generate the max field with text from a text box control, is this possible and what would i use
I am having an aspx page in which I am calling a user control. The user control I am using a pop up to display it when a user clicks a asp:linkbutton. In that user control I am having a textbox and I am calling a Jquery Blur to do some validation. While doing so the function is calling [blur] is calling twice. I just called an alert() with the textbox value.So I can see the alert is coming twice .What I need to do to avoid the second time. I need to do it only whenever the user going out of the textbox and that also one time.