Multiple Instances Of Same JQuery Plugin?

Oct 15, 2010

In an aspx page I am calling a jquery plugin for two listboxes as below.

$(document).ready(function() {
$("select.select_AdditionalLanguages").custSelectBox();
$("select.select_Organisations").custSelectBox();
});

[code]...

Managed to solved this issue by having same class name for both the listboxes and then passing both the list box objects to the plugin

$('select.select_field').custSelectBox(null, $('#EditUsers_Organisations'), $('#EditUsers_AdditionalLanguages'));

This might not be the best solution but nothing else worked for me.

View 2 Replies


Similar Messages:

C# - How To Use Multiple Instances Of A Usercontrol With Jquery On The Same Page

May 19, 2010

I've been working on an usercontrol with a jquery timer in it. At first I had the jquery within the usercontrol. But when I add 2 of those controls to my page the second usercontrol isn't showing it's data very well.Now I've put the jquery into the mainpage and the usercontrol only uses the id's of the jquery.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs"
Inherits="WebUserControl" %>
<style type="text/css">
[code]...

View 2 Replies

Multiple File Upload With MVC & JQuery Plugin

Jan 2, 2010

I'm using jQuery Multiple File Upload Plugin to upload several pictures. But form posts only 1, top, item. Fiddler (POST): POST /Images/UploadImages HTTP/1.1

Host: localhost:4793
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive...

View 7 Replies

C# - Multiple Image Upload With Jquery Plugin?

Feb 28, 2011

I got this simple jquery plugin to upload files.

i can add multiple files, but i cant seem to write a code that saves all the files, only one..

var _thumb = string.Empty;
if (!string.IsNullOrEmpty(fuUploadThumps.FileName))
{
_thumb = fuUploadThumps.FileName;
fuUploadThumps.SaveAs(Request.PhysicalApplicationPath + @"img/produkter" + _imagePath["categoryImagePath"] + "resized/thumbs/" + StripInput(_thumb));
}

More code

_objAdmin.Name = StripInput(_thumb);
_objAdmin.Connection = Session["imageConnection"].ToString();
_objAdmin.AddThumbs(_objAdmin);

View 2 Replies

Multiple Controls On A Page With Multiple Instances Of Javascript?

May 10, 2010

I have created a Web Control in ASP for use in integrating with Telligent CommunityServer. The control is written in ASP with some 10 lines of C# backend for controlling visibility of the UI elements based on permissions, but I'd say 90% of the functionality is straight-up Javascript. The control works beautifully, until you drop two instances of the Control on the same page--since they reference the exact same Javascript functions, only one control works. How can I take this functionality that I have, this 1200 lines of Javascript, and make it so that each instance of the control can reference its each unique instance of Javascript?

View 2 Replies

VS 02/03 - Prevent Multiple Instances Of Web App

Apr 1, 2010

Is there an easy way to prevent users from opening multiple instances of the same web application? Can I add something to the application start section of the global page which would prevent this?

View 4 Replies

Regex Pattern / How To Use Multiple Instances

Mar 7, 2011

YARPQ - Yet Another Regex Pattern Question:

What I am trying to figure out is how to use a custom delimiter, single character or set of characters, to wrap a block of text inside a larger body of text and then pull that text out via regex. I have successfully done this with a single instance of wrapped text. If I have multiple instances, it blows up. Here is an example.

This would be my text block with the internally wrapped text:

[Code]....

When my current regex runs on this block, the greedy nature gives me a match starting with my first wrapped block delimeter and ending with my second wrapped block end delimeter. So my regex of @"#Delim(.*)#EndDelim" doesn't work in this instance. I am trying to figure out how to exclude the #EndDelim from my grouping. Simply using ([^#EndDelim]*) doesn't work as it tells regex to ignore the individual characters inside the brackets and not the actual word so this breaks if I have any of those characters inside my wrapped block of text.

I am probably making this harder than it needs to be. Does anyone know of a good solution or how to ignore entire words in regex?

View 3 Replies

C# - Using JQuery Plugin Called JQuery File Tree?

Mar 21, 2011

Do not know if you know this plugin but basically it displays a tree.I'm having trouble using it, and would like your help to use this plugin.This link has a presentation of the plugin.Basically I have the project groups and projects where I display the tree, each project within their respective group. And once the user clicks on the group, the group is expanded showing all projects that group.Here is an example of use.

My environment is asp.net (C #)I would like to use this plugin to display the group's projects and projects under the tree:Follow the link for a code, as far as I could do.I would like to view the ul and li tags in the tree.

View 1 Replies

JQuery :: Splitter Jquery Plugin Dynamically With 2 Panes?

Dec 19, 2010

I want a sample that uses splitter jquery plugin dynamically with 2 panes.

View 1 Replies

Retrieving Multiple Instances Of The Same Session Variable

Mar 16, 2010

I'm having problems with retrieving multiple instances of a session variable from an InProc session state. In the following code I persist a simple BusinessObject into a session variable on the Page_Load event. On the click of a button I try to retrieve the object back into 2 new declared instances of the same BusinessObject. All works great until I change one of the properties in the first instance, it changes the second instance as well. Is this normal behaviour? I would have thought as these were new instances they wouldn't demonstrate static behaviour?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
' create a new instance of a business object and set a containg variable
Dim BO As New BusinessObject
BO.SomeVariable = "test"
' persist to inproc session
Session("BO") = BO
End If
End Sub

Protected Sub btnRetrieveSessionVariable_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnRetrieveSessionVariable.Click
' retrieve the session variable to a new instance of BusinessObject
Dim BO1 As New BusinessObject
If Not Session("BO") Is Nothing Then BO1 = Session("BO")
' retrieve the session variable to a new instance of BusinessObject...............................

View 2 Replies

Web Forms :: Multiple Instances Of User Control

Aug 20, 2010

I have a user control that I place on a page severl times. When I make a selection on a ddl in one one control the SelectedIndexChanged event fires for all the control on the page for that ddl. So I get duplication of an insert that I do. Is there a ay to make sure these events are isolated so this doesn't happen.

View 8 Replies

Web Forms :: Can Use Multiple Instances By Same User Control

Sep 10, 2010

I have an ASP.NET page inside of an ASP.NET Master page, and inside the page I have two instances of the same web user control. I have given them different IDs, but when I click a button on the first user control it causes the second user control to do the expected activity and the first one does nothing. Is there something I need to do to make sure that the controls don't get confused?

View 2 Replies

Static Variables To Be Accessed Across Multiple Instances

Feb 17, 2010

is there any way to stop share the static variable at multiple users....I need to create a new insatnce of static variables or not accessing the same static variables across multiple who are using the same site.....while googling i found like hisSystem.Threading.Interlocked.Increment(ref MyClass.InstanceCounter); by using can I do....or is there any other way to stop accessing the static variables accross multiple instances of my site......and in my scenario i cannot use rely on session variable also

View 2 Replies

Multiple ScriptControl Instances Sharing Variable?

Oct 20, 2010

I have a ScriptControl that uses an image as an embedded resource and GetWebResourceUrl to generate the WebResource.axd URL. I am currently using GetScriptDescriptors() to send the URL to the JavaScript object.The ScriptControl can be in a Repeater, so you may have 20+ instances. They all use the same images (not customizable through property), so I would like to set the URL once in a variable and share it. I know I could register a script block with a global variable, but would like to avoid that if possible. Is there a way to set a variable within the scope of the control type (global -> control type -> control instance)?

View 1 Replies

Web Forms :: Can't Have Multiple Instances Of A Custom Validator

Feb 8, 2011

I have the current block of code inside an OnPreRender method of a validator that is inheriting from BaseValidator. If I have one instance of the validator this works fine, but if there are multiple instances the javascript flakes out. As it stands the acutal evaluation function has to be rendered on a per instance basis. I know it's kind of a drop in the bucket, but I'd like to register the block below just once instead of giving each instance a unique key to register with.

[Code]....

View 3 Replies

How To Make Multiple Web App Instances Read Same File

Jun 22, 2011

If more than one person is using the web application, and the web application requires to read a specific file (and in my case, I use StreamReader), I've noticed that the any other instance of the web application would have an exception error when trying to read a file. How do you handle this? And how about when it comes to writing to the same file (if possible)?

View 5 Replies

Web Forms :: Multiple Instances Of Same User Control On Same Page?

Aug 22, 2010

I have built a User Control in VB which displays two gridviews and allows a user to select an item in the first gridview and display multiple rows in the second grid with the key of the selected item from the first. The data to be displayed is passed to the User Control as a datatable object via a public property of the User Control.

The user control works perfectly, but to allow the the subs in the codebehind of the User Control to access the data set when the user control is initialised, I have declared them as "Private Shared".

Having got everything to work, I now want to display multiple instances of the same User Control with different datasets.

However, because my data objects are defined as "Private Shared" each instance of the user control is overwriting the data of the others.

I can fix this problem by removing the "Shared" keyword, and have also tried setting them to "Protected" instead but then my variables expire after being set and contain "Nothing" when I get to the "RowCommand" event in the Code Behind.

I'm sure I must be doing something stupid, because surely the whole idea of User Controls is to make reusable code drven by parameters.

Here is my code:

Main Program .aspx

[Code]....

Main Program Code Behind

[Code]....

User Control .ascx

[Code]....

User Control Code Behind

[Code]....

View 1 Replies

Loading (several) Multiple Instances Of Crystal's ReportDocuments In Memory

Aug 25, 2010

I'm having trouble loading (several) multiple instances of crystal's ReportDocuments in memory. Using the following code:

Dim sRPT As New ReportDocument
sRPT.Load("PATHTOMY.RPT")
Dim sRPTs As New List(Of ReportDocument)
For i = 0 To 100
Dim sClone As ReportDocument = sRPT.Clone
sClone.Refresh()
sRPTs.Add(sClone)
Console.WriteLine("RPT Clonado " & i.ToString())
Next

when I reach the 74th instance, the Refresh() call throws a "Report Load failed" exception. Furthermore, the same exception happens even directly calling the .Load(path) method, and affects all ReportDocumetns within the application, regardless the RPT file I'm loading/refreshing.

I'm currently using Crystal XI R2, but testing this code with the v12 assemblies (CR 2008) ended with the same problem. Has anyone ever stumbled with something like this? The reason for all this instances is a report caching for multiple rpt files, per user, and will most likely stay as it is if there is a not-so-nasty workaround for this problema.

View 1 Replies

AJAX :: Multiple Instances Of A Same Usercontrol With Javascript Pageload Method

Nov 15, 2010

I have a usercontrol that wprks fine as along as one instance is on a pageut as soon as i have two instances of it nothing works. I figured out that it could be the pageload function that adds handler for keydown and other that is the cause.As each instance is reproducing the same javascript in the viewsource.So can you tell me how can i make the usercontrol that it can have multiple nstances that have their own javascript pageload

View 4 Replies

Turning A Single Instance Web Application Into Multiple Instances - Concept?

Feb 11, 2010

Here is a conceptual questions that I was going over the last few days. I have a simple application that I want to turn into a hosted solution.

My take on it is that in a sense each record in the database would have its own ID representing the hosted instance of the application, rather

than installing the application each time a new one is needed. Then I can easily differentiate between the instances, however I don't want to

store the instance ID in a session (bad for URL back links etc.) and don't really want to add it as part of the URL.

What would you suggest ?

Another part of the question would be how to pragmatically create a sub-domain representing the application instance, however that's a

Whole different question J

View 2 Replies

Security :: Single Sign On Among Multiple Instances Of Classified Starter Kit?

Mar 30, 2011

I am using classified starter kit for various purposes like for business listing,classified listing and event listing.These are 3 independent application with their membership information stored in their independent database.I have used this 3 listings in a portal .I need a single sign on now.

I tried to do with machinekey & cookie .This way user able to login but as there is no record in that database for that user.So even if he post anything in that application it stores memberid field as zero. So in this case what should be done. i am stuck here since few weeks.

View 4 Replies

MVC :: Multiple Instances Of Same Partial (with Same View Model) Messes Up Validation?

Jan 27, 2011

This project I'm working on have this custom clientside JavaScript validation framework created for (which I cannot change) that show error messages/summary based on your data annotations and a "Validate" method in your ViewModel.

Like I said I'm not allowed to change this, so wont be able to go with suggestions doing that.

What the person that created this did not foresee, is that one might need put several partials of the same type and having the same view model (each in a form) on a view.

So I went ahead and did things the normal way (using Html.whateverFor<model => model.whatever) and wala!....the custom validation thing throws error messages for the specific form fields, next to each form in the view. I was suggested to create a "prefix" for each instance of the view model, and do something like this:

Change: <%: Html.HiddenFor(model => model.AccountNumber)%>

To: <%: Html.Hidden(Model.ElementPrefix + "AccountNumber", Model.AccountNumber)%>

Not to mention the tons of jquery selectors and all that I have to go change (and all my view inputs)

(I just hate having to find workarounds for this "custom" everything they created for this project)

View 9 Replies

Web Forms :: Use Multiple TinyMCE Editor Instances On A Single Webpage

Oct 12, 2013

How we can use multiple tiny mce on a single webpage i.e..aspx page?

View 1 Replies

Web Forms :: Adding Multiple Instances Of Usercontrol On Button Click Event

Aug 13, 2010

As you said that for storing use data table and make property in the .ascx.cs file but I have problem that I m not able to get that property in the .aspx page. How to add multiple instances of web usercontrol on page on button click event?

View 1 Replies

#SEQ Keyword - Charting Control With Multiple Azure Cloud Application Instances

Feb 27, 2010

I am having a simple Azure cloud app(WebRole=ASP.Net MVC) which draws charts using ASP.Net Charting control. Chart RenderType = ImageMap Chart ImageLocation = "/Images/Chart_#SEQ(1000,1)" Number of app instances deployed on Windows Azure = 5 App contains a button which draws charts as per users parameters. When user clicks on this button, MVC action is called which provides necessary ViewData for drawing chart and returns a partial view which after getting rendered sends ImageMap and Image location to client.

When I try to draw charts from IE8 I always get the charts as per my parameters but when I simulataneously try to draw charts on FireFox sometimes I get wrong charts(wrong images). Is is due to roundrobin used - #SEQ(1000,1) or due to mutiple instances of my cloud app?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved