Search Results

Search found 10911 results on 437 pages for 'dynamically loaded xap'.

Page 19/437 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Event handling for a dynamically added user control

    - by francisf
    Hi, I have a user control say SearchVendor.ascx which contains 4 buttons a gridview and another user control. I need to load the control dynamically actually as a modal pop up I get this code VendorProductSearch uc = Page.LoadControl("~/Controls/Proposal/VendorProductSearch.ascx") as VendorProductSearch; uc.ShowVendorProductSearch(true); _tempPlaceHolder.Controls.Add(uc); it works fine the control gets loaded properly but onclick of any button the second time the control disappears ??? I want the dynamically added control to remain until the user clicks on the cancel button Any idea as to how to achive this ? Thanks & Regards, Francis P.

    Read the article

  • Dynamically create and cast objects at runtime

    - by vaibhav bindroo
    Let's say we have 2 classes A and B public class A{ private int member1; A() { member1 = 10; } public getMember(){ return member1; } } Class B is also on the same lines except that its member variable is named member2 and gets intitialized to say 20 inside the constructor. My Requirement : At runtime , I get a string which contains a className ( could be A or B). I want to dynamically create an object of this class along with invoking the constructor. How can I achieve this . I don't want to use interfaces for common functionality of above classes Morever, later on I set the properties of this raw object using Propery Builder Bean Util class based on a list of columns . Class clazz = Class.forName("className"); Obj obj = clazz.newInstance(); How I can dynamically convert that obj to className object.

    Read the article

  • Insert dependencies dynamically in View (Javascript and CSS Files)

    - by Ph.E
    Friends, I am willing to follow the rules of the W3C where it is recommended that javascript and CSS files should be in individual files and not within the page. Good, following this rule, and not wanting to overload the master page, I would like to embed the dependencies dynamically. So how could I insert the libraries dynamically? I think the bigger problem is the Ajax requests. Example: <script type="text/javascript" src="http://sstatic.net/so/js/master.js?v=6523"></script> I tried using the JavascriptResult, but he writes the content on the page, and do not run as "Stream." Any help is welcome. Thanks

    Read the article

  • Problems after adding Control dynamically on Panel

    - by Thomas
    Hello, I have added an View List onto a Panel like that: panelComponent.Controls.Add(viewListComponent); Everthing works just fine. Mouse Events are handled, Repaint works. But one: I cant dynamically move it around. If i change the control.Top Variablen it just sit there and nothing. Its clued to the top left corner. Resizing the right and bottom line works just fine! I did it without dynamically adding and than no Problem. Hope you can help. Thomas

    Read the article

  • Dynamically load _gallery_ (not album) in SlideShowPro using SWFObject

    - by bccarlso
    Hi all. I have been successful in dynamically loading an album in SSP before, but using SSP Standalone. I did it like this: var flashvars = { xmlFilePath: "http://site.com/ssp_director/images.php?album=5" } What I'm looking to do now, though, is dynamically load a gallery when the page loads, using text entered in the javascript, or flashvars I'd assume. I'm using ActionScript 3 with this, so I'm not sure if I have to do something to the SSP instance in Flash. I'm not very good with AS3, so following advice or tutorials is about all I can muster. I'm also using SSP Director, so my gallery XML URLs would be similar to above in the example code. I'd be elated if this is possible, otherwise I will have to find an alternative solution. Thanks so much for help!

    Read the article

  • How do I create an image for a UITableViewCell dynamically

    - by Xetius
    I want to dynamically create an image for a UITableViewCell which is basically a square with a number in it. The square has to be a colour (specified dynamically) and contains a number as text inside it. I have looked at the CGContextRef documentation, but can't seem to work out how to get the image to fill with a specified certain colour. This is what I have been trying so far. -(UIImage*)createCellImageWithCount:(NSInteger)cellCount AndColour:(UIColor*)cellColour { CGFloat height = IMAGE_HEIGHT; CGFloat width = IMAGE_WIDTH; UIImage* inputImage; UIGraphicsBeginImageContext(CGSizeMake(width, height)); CGContextRef context = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(context); // drawing code goes here // But I have no idea what. UIGraphicsPopContext(); UIImage* outputImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return outImage; }

    Read the article

  • Rails - Create form fields dynamically and save them

    - by Frexuz
    Im building an ad-system where users can dynamically create 'fields' for each ad type. My models and example values: AdType: | id | name |----|----- | 1 | Hotel | 2 | Apartment AdOption: | id | ad_type_id | name |----|------------|----- | 1 | 1 | Star rating | 2 | 1 | Breakfast included? | 3 | 2 | Number of rooms AdValue: (Example after saving) | id | ad_id | ad_option_id | value |----|-------|---------------|------ | 1 | 1 | 1 (stars) | 5 | 2 | 1 | 2 (breakfast) | true Ad: (Example after saving) | id | description | etc.... |----|-----------------|-------- | 1 | very nice hotel | ....... So lets say I want to create a new ad, and I choose Hotel as the ad type. Then I need my view to dynamically create fields like this: (I'm guessing?) [Label] Star rating: [hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value] [Label] Breakfast included? [hidden_field :ad_id] [hidden_field :ad_option_id] [text_field :value] And also, how to save the values when the ad record is saved I hope this is understandable. If not just ask and I'll try to clarify.

    Read the article

  • Gridview adding row dynamically on RowDataBound with the same RowState (Alternate or Normal)

    - by rob waminal
    I am adding rows dynamically on code behind depending on the Row currently bounded on RowDataBound event. I want that added row to be the same state (Alternate or Normal) of the currently bounded row is this possible? I'm doing something like this but it doesn't follow what I want. I'm expecting the added row dynamically would be the same as the current row. But it is not. protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { GVData data = e.Row.DataItem as GVData; // not original object just for brevity if(data.AddHiddenRow) { // the row state here should be the same as the current GridViewRow tr = new GridViewRow(e.Row.RowIndex +1, e.Row.RowIndex + 1, DataControlRowType.DataRow, e.Row.RowState); TableCell newTableCell = new TableCell(); newTableCell.Style.Add("display", "none"); tr.Cells.Add(newTableCell); ((Table)e.Row.Parent).Rows.Add(tr); } } }

    Read the article

  • jQuery selector after dynamically created element

    - by Bryan Williams
    I am trying to get an dynamically created element using a jQuery selector but it is returning an empty array. The first thing I am doing is grabbing an empty div: var packDiv = document.getElementById('templates'); packDiv.innerHTML = ""; then adding items to it in a loop: packDiv.innerHTML = packDiv.innerHTML + "<img id='" + thumbName + "' src='thumbs/" + thumbName + "'/>"; after the loop finishes I try to select an item using: console.log($("#"+thumbName)); and it returns the empty array. All the things I search on show to use .on but all the examples show that is to set event handlers. My question is how do I format a selector for dynamically created elements?

    Read the article

  • Dynamically create class attributes

    - by ahojnnes
    Hi, I need to dynamically create class attributes from a DEFAULTS dictionary. defaults = { 'default_value1':True, 'default_value2':True, 'default_value3':True, } class Settings(object): default_value1 = some_complex_init_function(defaults[default_value1], ...) default_value2 = some_complex_init_function(defaults[default_value2], ...) default_value3 = some_complex_init_function(defaults[default_value3], ...) I could also achive this by having sth. like __init__ for class creation, in order to dynamically create these attributes from dictionary and save a lot of code and stupid work. How would you do this? Thank you very much in advance!

    Read the article

  • Select a Column Dynamically using LINQ?

    - by vsj
    Hi all I am trying to do a very simple dynamic query which will select a column dynamically I mean the selection of column would depend upon another query so I would select x col if cond1 and y if cond2 so I tried using query.Select(colname) using the extension method also tried using Func< but I am not sure how to go about this I have read about dynamic extension for linq and also reflection but woth reflection to the GetValue function does not return value for my column in database. please help me out I am jus trying to select a column dynamically at runtime and no condtions really on it.

    Read the article

  • span tag inside a dynamically generated td - jquery

    - by user1017268
    I have a dynamically generated page of an enterprise application. The data is inside table structure. I need to access a value of span tag inside this table. The page code looks like <td class="dCCItemValue" valign="bottom> <span id="S_0_1_5">Problem type</span> The id of the span tag is also generated dynamically and I have no control over it. So the problem statement becomes: How to get value span inside a td with class "dCCItemValue" I hope I have explained the problem correctly. Please Help

    Read the article

  • XUL: create menu items dynamically and set "selected" attr

    - by Michael
    I have a firefox extension Options pref panel, where I should dynamically create menu items and select particular item to be current. here is the XUL file part <menulist id="rss_service_combo"> <menupopup id="rss_service_menu"/> </menulist> Then in load event of the pref panel, using js I append menuitem elements into menupop. This is working fine. The only problem is that even if I set the selected element the item is not selected and combo box is initially empty. The only way is working at the moment is if I manually add those menuitems into XUL file and set selected attribute, but I need to do it dynamically.

    Read the article

  • IE 7 can't bind event (using .live()) to dynamically created element using .load()

    - by petron
    Hi All - I'm having trouble getting IE7 to keep a click event bound to an element that is added to the DOM using .load(). Here's some code: $('.mybtn').live('click', function(e){ e.preventDefault(); $('#mypage').load('load-this-page.htm'); }); And here's the html <div id="mypage"> <a href="#" class="mybtn">clickme</a> // stuff goes here </div> On page load the click works but once the div is loaded via the clickme link the click stops working in IE7. The clickme link is within the div on load and also within the load() loaded html file that's why I'm using live(). This code works in FF 3.6, fyi. Anyone have any idea what's up (besides the fact the IE sucks balls)? Thanks!

    Read the article

  • Changing overflow from div dynamically [closed]

    - by user552669
    Hello comunnity! I am filling a div using JQuery. This div has the CSS property 'overflow' set to 'auto' (to display scrollbars because the div has a lot of HTML inside). But the DIV doesn't display the scrollbars. I think that the problem is that I'm setting the CSS property using CSS and the DIV is filling dynamically. How can I do to display scrollbars if the HTML inside the DIV doesn't fit, but dynamically? I'm trying to set the property manually after fill the div, but didn't work: function createWB(tag){ // Fill the div // ... // Set the scrollbars $('.tab_content').css('overflow','auto'); } If a set the property to 'scroll', the scrollbars appear, but disabled. Thanks in advance! :)

    Read the article

  • draw graph in android with dynamically data

    - by Tikam
    In my project i want to draw a graph with dynamically updated data, and data is came from remote device and i update it from my locally sqlite data base. I have to draw a graph dynamically with having two paremeter as horizontally hours of day from {Mid night, 1, 2, ...., 11, Noon, 1 , 11, Mid Night} and vertically parameter as {One , two, Three, Four}. At particular hour i get data value from my sqlite and want to draw it on graph, and any particular hour have different value like "One", "two" etc. and i want to draw graph with hour help. Thanks in advance

    Read the article

  • CSS window height problem with dynamic loaded css

    - by Michael Mao
    Hi all: Please go here and use username "admin" and password "endlesscomic" (without wrapper quotes) to see the web app demo. Basically what I am trying to do is to incrementally integrate my work to this web app, say, every nightly, for the client to check the progress. Also, he would like to see, at the very beginning, a mockup about the page layout. I am trying to use the 960 grid system to achieve this. So far, so good. Except one issue that when the "mockup.css" is loaded dynamically by jQuery, it "extends" the window to the bottom, something I do not wanna have... As an inexperienced web developer, I don't know which part is wrong. Below is my js: /* master.js */ $(document).ready(function() { $('#addDebugCss').click(function() { alertMessage('adding debug css...'); addCssToHead('./css/debug.css'); $('.grid-insider').css('opacity','0.5');//reset mockup background transparcy }); $('#addMockupCss').click(function() { alertMessage('adding mockup css...'); addCssToHead('./css/mockup.css'); $('.grid-insider').css('opacity','1');//set semi-background transparcy for mockup }); $('#resetCss').click(function() { alertMessage('rolling back to normal'); rollbackCss(new Array("./css/mockup.css", "./css/debug.css")); }); }); function alertMessage(msg) //TODO find a better modal prompt { alert(msg); } function addCssToHead(path_to_css) { $('<link rel="stylesheet" type="text/css" href="' + path_to_css + '" />').appendTo("head"); } function rollbackCss(set) { for(var i in set) { $('link[href="'+ set[i]+ '"]').remove(); } } Something should be added to the exteral mockup.css? Or something to change in my master.js? Thanks for any hints/suggestions in advance.

    Read the article

  • Serializing java objects with respect to xml schema loaded at runtime

    - by kohomologie
    I call an XML document three-layered if its structure is laid out as following: the root element contains some container elements (I'll call them entities), each of them has some simpleType elements inside (I'll call them properties). Something like that: <data> <spaceship> <number>1024</number> <name>KTHX</name> </spaceship> <spaceship> <number>1624</number> <name>LEXX</name> </spaceship> <knife> <length>10</length> </knife> </data> where spaceship is an entity, and number is a property. My problem is stated below: Given schema: an arbitrary xsd file describing a three-layered document, loaded at runtime. xmlDocument: an xml document conforming to the schema. Create A Map<String, Map <String, Object>> containing data from the xmlDocument, where first key corresponds to entity, second key correponds to this entity's property, and the value corresponds to this property's value, after casting it to a proper java type (for example, if the schema sets the property value to be xs:int, then it should be cast to Integer). What is the easiest way to achieve this result with existing libraries? P. S. JAXB is not really an option here. The schema might be arbitrary and unknown at compile-time. Also I wish to avoid an excessive use of reflection (associated with converting the beans to maps). I'm looking for something that would allow me to make the typecasts while xml is being parsed.

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >