Search Results

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

Page 32/437 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • jQuery .load() call doesn't execute javascript in loaded html file

    - by Mike
    This seems to be a problem related to Safari only. I've tried 4 on mac and 3 on windows and am still having no luck. What I'm trying to do is load an external html file and have the Javascript that is embedded execute. The code I'm trying to use is this: $("#myBtn").click(function() { $("#myDiv").load("trackingCode.html"); }); trackingCode.html looks like this (simple now, but will expand once/if I get this working): <html> <head> <title>Tracking HTML File</title> <script language="javascript" type="text/javascript"> alert("outside the jQuery ready"); $(function() { alert("inside the jQuery ready"); }); </script> </head> <body> </body> </html> I'm seeing both alert messages in IE (6 & 7) and Firefox (2 & 3). However, I am not able to see the messages in Safari (the last browser that I need to be concerned with - project requirements - please no flame wars). Any thoughts on why Safari is ignoring the Javascript in the trackingCode.html file? Eventually I'd like to be able to pass Javascript objects to this trackingCode.html file to be used within the jQuery ready call, but I'd like to make sure this is possible in all browsers before I go down that road. Thanks for your help!

    Read the article

  • how to call a js function from loaded jquery

    - by Y.G.J
    the function is in the page loading the ajax but i'm trying to call the function codes: [ajax] $.ajax({ type: "POST", url: "loginpersonal.asp", data: "id=<%=request("id")%>", beforeSend: function() { $("#personaltab").hide(); }, success: function(msg){ $("#personaltab").empty().append(msg); }, complete: function() { $("#personaltab").slideDown(); }, error: function() { $("#personaltab").append("error").slideDown(); } }); [the js function] function GetCount(t){ if(t>0) { total = t } else { total -=1; } amount=total; if(amount < 0){ startpersonalbid(); } else{ days=0;hours=0;mins=0;secs=0;out=""; days=Math.floor(amount/86400);//days amount=amount%86400; hours=Math.floor(amount/3600);//hours amount=amount%3600; mins=Math.floor(amount/60);//minutes amount=amount%60; secs=Math.floor(amount);//seconds if(days != 0){out += days +":";} if(days != 0 || hours != 0){out += hours +":";} if(days != 0 || hours != 0 || mins != 0){out += ((mins>=10)?mins:"0"+mins) +":";} out += ((secs>=10)?secs:"0"+secs) ; document.getElementById('countbox').innerHTML=out; setTimeout("GetCount()", 1000); } } window.onload=function(){ GetCount(<%= DateDiff("s", Now,privatesellstartdate&" "&privatesellstarttime ) %>); so at the end of the loginpersonal.asp from the ajax... if it does what it suppose to do... i'm trying to call the function GetCount() again.

    Read the article

  • second external javscript file not loaded

    - by YsoL8
    Hi I have these lines in my html head section <script type="text/javascript" src="../behaviour/location.js"></script> <script type="text/javascript" src="../behaviour/ajax.js"></script> When I use either in isolation, the code in the external files executes as expected. However, when I use both, I find that neither works correctly. What do I need to do to fix this?

    Read the article

  • Change Dll loaded with MEF

    - by Tim
    Hi all, I'm using MEF and the System.ComponentModel.Composition.dll to load some dll. I'm doing something like : AggregateCatalog catalog = new AggregateCatalog(new AssemblyCatalog(Assembly.GetExecutingAssembly()), new DirectoryCatalog(directory)); _container = new CompositionContainer(catalog); _container.ComposeParts(this); to import my dll. After some times, I would like to update my dll but if I try to delete it, I have an access denied, because it's alrealdy used by the program. How can I release the dll, replace with a new dll and load the dll again ? (without closing the program) Thanks in advance for your help

    Read the article

  • [PHP] Variables loaded from a separate script are not defined within functions

    - by Goro
    Hello, I use settings.php to store general settings for my application. When I load this settings file, I can use the variables defined in settings.php in the script itself, but not within any functions I define in it. For example, in my class definition, myclass.php: <?php $preIP = dirname(__FILE__); require_once( "preIP/settings.php" ); class MyClass { ... public function foo() { echo $variable_from_settings; } } The code in the function foo() will not work (the variable will not be defined). The settings.php file looks like this: $variable_from_settings = "bar"; Thanks,

    Read the article

  • Magento get loaded collection

    - by Zertalx
    Hey guys I got an issue in magento when listing products. $_productCollection = array(); $key = 'product_collection_'.Mage::app()->getRequest()->getRequestUri(); $_productCollection = Mage::helper('cache')->getDataInCache($key); if (empty($_productCollection)) { $_productCollection=$this->getLoadedProductCollection(); Mage::helper('cache')->setDataInCache($key,$_productCollection,'front_end_collection'); } That's my code, i'm loading the collection and saved in cache, the problem is that I added new products from the admin panel but they are not showing up in the listing. I have refreshed cache, reindex all the data and checke that the products were in stock. Also check the visibility because i understand that the collection gets just the visible products, am i correct? I'm using magento enterprise 1.9 I'm new in magento and i'm having troubles understanding how the Collections works, i hope somebody can help me. Thanks

    Read the article

  • Modifying html of dom element that was created after page loaded

    - by Ben321
    I have two separate AJAX calls. One that gets a list of items from a txt file and creates an HTML table out of them and one that talks to a database to find how much each item costs and then lists this in the corresponding table cell for each item (I know this may sound like a strange approach, but it's a good option in our case...). The issue is that the price is not getting written to the table since the table is created (or to be precise, the rows of the table are created) after the page loads. I'm not sure how to fix this. $(document).ready(function() { makeItemTable(); listPrices(); ... }); function makeItemTable() { $.ajax({ url: 'products.php', type: 'GET' }) .done(function(response) { $('.price-table > tbody').html(response); }) } function listPrices() { .ajax({ url: 'prices.php', type: 'GET' }) .done(function(response) { priceData = $.parseJSON(response); $('.price-table tr').each(function() { var item = $(this).find('td:nth-child(1)').text(); if (priceData[item]) { var price = priceData[item]; $(this).find('td:nth-child(2)').text(price); } }) }

    Read the article

  • Unable to execute functions on elements loaded with AJAX (jQuery)

    - by Jason
    i am using .prepend() to load data after i POST a form with .ajax(). once the new elements are added, my functions won't work on them. if i link the js file directly in the prepended data, the functions work, but when i POST, i starts multiplying the events. i have a feeling it has something to do with binding, but i am not able to figure out exactly how to handle it. any ideas? thanks!

    Read the article

  • using grails and google app engine to store image as blob and the view dynamically

    - by mswallace
    I am trying to dynamically display an image that I am storing in the google datastore as a Blob. I am not getting any errors but I am getting a broken image on the page that I view. Any help would be awesome! I have the following code in my grails app domain class has the following @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Long id @Persistent String siteName @Persistent String url @Persistent Blob img @Persistent String yourName @Persistent String yourURL @Persistent Date date static constraints = { id( visible:false) } My save method in the controller has this def save = { params.img = new Blob(params.imgfile.getBytes()) def siteInfoInstance = new SiteInfo(params) if(!siteInfoInstance.hasErrors() ) { try{ persistenceManager.makePersistent(siteInfoInstance) } finally{ flash.message = "SiteInfo ${siteInfoInstance.id} created" redirect(action:show,id:siteInfoInstance.id) } } render(view:'create',model:[siteInfoInstance:siteInfoInstance]) } My view has the following <img src="${createLink(controller:'siteInfoController', action:'showImage', id:fieldValue(bean:siteInfoInstance, field:'id'))}"></img> and the method in my controller that it is calling to display a link to the image looks like this def showImage = { def site = SiteInfo.get(params.id)// get the record response.outputStream << site.img // write the image to the outputstream response.outputStream.flush() }

    Read the article

  • C# Dynamically created LinkButton Command Event Handler

    - by spdevsolutions
    So I have a weird situation here... I have an System.Web.UI.WebControls.WebParts.EditorPart class. It renders a "Search" button, when you click this button, it's clickHandler method does a DB search, and dynamically creates a LinkButton for each row it returns, sets the CommandName and CommandArgument properties and adds a CommandEventHandler method, then adds the LinkButton control to the page. The problem is, when you click a LinkButton, its CommandEventHandler method is never called, it looks like the page just posts back to where it was before the ORIGINAL "Search" button was pressed. I have seen postings saying that you need to add the event handlers in OnLoad() or some other early method, but my LinkButtons haven't even been created until the user tells us what to search for and hits the "Search" button... Any ideas on how to deal with this? Thanks!

    Read the article

  • Add controls dynamically on button click in asp.net mvc

    - by Ashwani K
    Hello All: I am creating an asp.net MVC application in which I want to provide a functionality to add a controls dynamically. I have a form in which there are 2 text boxes for First Name and Last name which serve as a single control. Now an user can add any number of this group of controls. I am able to add these controls on the page using java script. But I do not know how to access the values of these control when the user submits. Please help in this or suggest another approach Thanks

    Read the article

  • how to dynamically add observer methods to an Ember.js object

    - by Rick Moss
    So i am trying to dynamically add these observer methods to a Ember.js object holderStandoutCheckedChanged: (-> if @get("controller.parent.isLoaded") @get("controller").toggleParentStandout(@get("standoutHolderChecked")) ).observes("standoutHolderChecked") holderPaddingCheckedChanged: (-> if @get("controller.parent.isLoaded") @get("controller").toggleParentPadding(@get("holderPaddingChecked")) ).observes("holderPaddingChecked") holderMarginCheckedChanged: (-> if @get("controller.parent.isLoaded") @get("controller").toggleParentMargin(@get("holderMarginChecked")) ).observes("holderMarginChecked") I have this code so far but the item.methodToCall function is not getting called methodsToDefine = [ {checkerName: "standoutHolderChecked", methodToCall: "toggleParentStandout"}, {checkerName: "holderPaddingChecked", methodToCall: "toggleParentPadding"}, {checkerName: "holderMarginChecked", methodToCall: "toggleParentMargin"} ] add_this = { } for item in methodsToDefine add_this["#{item.checkerName}Changed"] = (-> if @get("controller.parent.isLoaded") @get("controller")[item.methodToCall](@get(item.checkerName)) ).observes(item.checkerName) App.ColumnSetupView.reopen add_this Can anyone tell me what i am doing wrong ? Is there a better way to do this ? Should i be doing this in a mixin ? If so please

    Read the article

  • Modify tab indicator dynamically in Android

    - by ZelluX
    My application needs to update tab indicator dynamically, I'm trying to do this by invoke TabSpec.setIndicator(), but it doesn't work. Here is my code: In onCreate method of TabActivity: tabHost = getTabHost(); TabSpec tabSpec = tabHost.newTabSpec("abc"); tabSpec.setIndicator("helloabc"); tabSpec.setContent(new MyViewFactory()); tabHost.addTab(tabSpec); Now I need to change tab indicator to another string, for example, "xyz" TabSpec tabSpec = MyTabActivity.getTabSpec(); tabSpec.setIndicator("xyz"); But it doesn't work. So I'd like to know how to change tab indicator after it is added to the tabhost? Many thanks.

    Read the article

  • Dynamically resizing CMFCPropertySheet with PropSheetLook_OneNoteTabs style

    - by Ryan
    Hi everybody, I'm trying to resize dynamically a CMFCPropertySheet to add a custom control at the bottom of each page. As all Property Pages are not of the same height, I have a mechanism to increase the size if necessary. For this, I have overridden the OnActivatePage method and by using SetWindowPos, I can resize the sheet, first, then the tab control, then the page and finally I can move the OK/Cancel/Help buttons. It works fine with PropSheetLook_OutlookBar and PropSheetLook_Tabs styles but not with PropSheetLook_OneNoteTabs style. The page (or the tab) is not correctly resized (the lighter grey color of the page does not fill the sheet. OneNote style Outlook style Any idea? A MFC Feature Pack bug?

    Read the article

  • how to access dynamically created list in jquery?

    - by Ohana
    hi, i have a unordered list of links, which are dynamically created by Ajax, and for each link i want to add click function to it, but it won't work, please help! here is my code: html: list //to create links var str = ''; $.each(json.opts, function(i, opt) { var id = opt + '-list'; str += '' + opt + ''; //link } $("#list").html(str); ... //to add click function to each links, this won't work $("#list li").each(function (i) { alert(i + " : " + $(this).text()); });

    Read the article

  • Best way to unit-test WCF REST/SOAP service while dynamically generating stubs

    - by James Black
    I have a webservice written with WCF 4.0 that exposes REST and SOAP functions, and I want to set up my unit tests so that as I work on my web services I can quickly test by having the test framework start up the service, outside of IIS, and then do the tests. I want it to be dynamically generated as I am not certain what the interface will look like, and it is easier to not worry about having to generate the stubs before I start the tests. But, I couldn't get Groovy to work with my web service, so I am curious if Iron Python or Iron Ruby would work well for this, or is there another .NET language that may work well for this.

    Read the article

  • Dynamically generate PDF and email it using django

    - by Shane
    I have a django app that dynamically generates a PDF (using reportlab + pypdf) from user input on an HTML form, and returns the HTTP response with an application/pdf MIMEType. I want to have the option between doing the above, or emailing the generated pdf, but I cannot figure out how to use the EmailMessage class's attach(filename=None, content=None, mimetype=None) method. The documentation doesn't give much of a description of what kind of object content is supposed to be. I've tried a file object and the above application/pdf HTTP response. I currently have a workaround where my view saves a pdf to disk, and then I attach the resulting file to an outgoing email using the attach_file() method. This seems wrong to me, and I'm pretty sure there is a better way.

    Read the article

  • Dynamically evaluating simple boolean logic in Python

    - by a paid nerd
    I've got some dynamically-generated boolean logic expressions, like: (A or B) and (C or D) A or (A and B) A empty - evaluates to True The placeholders get replaced with booleans. Should I, Convert this information to a Python expression like True or (True or False) and eval it? Create a binary tree where a node is either a bool or Conjunction/Disjunction object and recursively evaluate it? Convert it into nested S-expressions and use a Lisp parser? Something else? Suggestions welcome.

    Read the article

  • how to add and remove jquery tabs dynamically?

    - by kranthi
    hi, I have an aspx page on which I have 2 static jquery tabs.Upon clicking on a button avaiable on one of these tabs,I would like to add a new tab dynamically,which gets its content loaded from another aspx page.I've also tried with the following sample http://jquery-ui.googlecode.com/svn/trunk/demos/tabs/manipulation.html I've downloaded jquery-ui-1.8rc3.custom zip file and tried to add the above page with the relevant script,css files to my asp.net website and run,but it does not seem to work.Also I do not want to have a dialog opening and asking the user to enter the tab title as in the above sample. Please could someone help me with this? Thanks.

    Read the article

  • Google Closure: Setting Input for AutoComplete Dynamically

    - by amuzed
    The Google Closure (GC) Javascript Library makes it very easy to create an AutoComplete UI, as this demo shows - http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/autocomplete-basic.html . Basically, all we have to do is define an array and pass it on as one of the parameters. I'd like to be able to update the array dynamically and have AutoComplete show the changes immediately. Example, if there are two arrays list1 = ["One", "Two", "Three"] list2 = ["1", "2", "3"] and an AutoComplete has been initialized using list1, var suggest = new goog.ui.AutoComplete.Basic(list1, document.getElementById('input'), false); how can I update the existing AutoComplete (suggest) to use list2?

    Read the article

  • loading js files dynamically via another js file?

    - by mark smith
    Hi there, is there anyway to load other JS files from within a single JS file. I would like to point my individual pages "ITS" js file and that js file would load jquery, other js files. I know i can just pop all these into the html i.e. I was thinking of separations of concerns so i was wondering if anything exists already without me reinventing the wheel.... That i would just need to edit home.js to change what other js (jquery etc) are loaded for home.htm ... home.htm would just point to home.js Thanks

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >