Search Results

Search found 4421 results on 177 pages for 'dynamically'.

Page 11/177 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Playing dynamically embedded sound object via Javascript

    - by Vikram Goyal
    I need to background load some WAV files for an HTML page using AJAX. I use AJAX to get the details of the WAV files, then use the embed tag, and I can confirm that the files have loaded successfully because when I set autostart to true, the files play. However, I need the files to play only when the user clicks on a button (or an event is fired). The following is my code to preload these files: function preloadMedia() { for(var i = 0; i < testQuestions.length; i++) { var soundEmbed = document.createElement("embed"); soundEmbed.setAttribute("src", "/media/sounds/" + testQuestions[i].mediaFile); soundEmbed.setAttribute("hidden", true); soundEmbed.setAttribute("id", testQuestions[i].id); soundEmbed.setAttribute("autostart", false); soundEmbed.setAttribute("width", 0); soundEmbed.setAttribute("height", 0); soundEmbed.setAttribute("enablejavascript", true); document.body.appendChild((soundEmbed)); } } I use the following code to play the file (based on what sound file that user wants to play) function soundPlay(which) { var sounder = document.getElementById(which); sounder.Play(); } Something is wrong here, as none of the browsers I have tested on play the files using the code above. There are no errors, and the code just returns. I would have left it at that (that is - I would have convinced the client to convert all WAV's to MP3 and use MooTools). But I realized that I could play the sound files, which were not dynamically embeded. Thus, the same soundPlay function would work for a file embeded in the following manner: <embed src="/media/sounds/hug_sw1.wav" id="sound2" width="0" heigh="0" autostart="false" enablejavascript="true"/> anywhere within the HTML. And it plays well in all the browsers. Anyone have a clue on this? Is this some sort of undocumented security restriction in all the browsers? (Please remember that the files do get preloaded dynamically, as I can confirm by setting the autostart property to true - They all play). Any help appreciated.

    Read the article

  • height worked out dynamically at rendering time

    - by nourdine
    hello I have to make a simple layout in android but have problem with the heigh of the central element. basically I have a header, a body and a footer. header and footer have fixed height but I'd like the body to fill the remaining space. this should be screen size independent so I'd like the height of the body to be dynamically worked out when the layout is being rendered. do you guyz know how I can achieve the result? thanks

    Read the article

  • Using Prettify on dynamically-generated code

    - by Nimbuz
    I'm using Prettify for syntax highlighting, but it doesn't work on dynamically generated code. I have a form that when submitted generates code and displays it (without refreshing) in <div id="output></div>, but prettify doesn't work on this code, is there any workaround? Many thanks!

    Read the article

  • Apache2 - Dynamically map url on files ystem

    - by booze2go
    Hi Guys, I'm tying at the moment to dynamically map a url to the file system. e.g.: www.example.com/~svn/myrepo < to /var/svn-repos/myrepo My approach: <Location /~svn/([a-ZA-Z0-9-_]+)> DAV svn SVNPath /var/svn-repos/$1 AuthType Basic AuthName "Subversion Repository" AuthUserFile /etc/apache2/dav_svn_all.passwd Require valid-user </Location> Any idea how that works? Thanks in advance!

    Read the article

  • actionscript 3.0 load images dynamically

    - by johnny
    I am making a photo slideshow in flash and would like to be able to load images dynamically from a folder. So that whenever i have a new photo i can just stick it in a folder and have my swf file read from that folder and update the slideshow. Is this doable in actionscript 3.0? if so any pointers would be helpful. thanks!

    Read the article

  • Changing the application icon text dynamically in Android

    - by Achal
    Hi Friends, I am developing a calendar app, wherein i will using a service to display date in the application icon text itself. For Eg: If date is: 26 Apr 2010, then my application name in the phone menu will also show the same. So I am not understanding how to change the application's icon text dynamically through program.

    Read the article

  • Dynamically inserted input elements not showing up in ActionResult's FormCollection parameter

    - by roosteronacid
    I am adding input elements to a view, dynamically, using JavaScript. But I am unable to find those inputs in my ActionResult's FormCollection parameter...: public ActionResult Del(FormCollection fc) I am able to find static input elements in the View. And using FireBug in Mozilla FireFox, I can see that the inputs are inside of the form element, in the DOM, and are not floating around somewhere random. How can I access these inputs?

    Read the article

  • Jquery retrieve values of Dynamically created elements

    - by Amitd
    Hi, I have a html page with a form. The form has Div which gets populated dynamically with Input elements like text box,radio,checkbox etc. Now I want to retrieve the values of these dynamically created elements in the Html page,so that i can submit it to a page. //HTML PAGE <script type="text/javascript"> $(function() { populateQuestions(); }); $("#submit_btn").click(function() { // validate and process form here //HOW TO ??retrieve values??? var optionSelected = $("input#OptionSelected_1").val();// doesn't work? // alert(optionSelected); postAnswer(qid,values);//submit values showNextQuestion() ;// populate Div Questions again new values }); </script> <form action="" name="frmQuestion"> <div id="Questions" style="color: #FF0000"> </div> //Question DIV generation script example radio buttons //questionText text of question //option for question questionOptions // **sample call** var question = createQuestionElement("1","MCQ", "WHAT IS ABCD??", "Opt1$Opt2$Opt3"); question.appendTo($('#Questions')); function createQuestionElement(id, type, questionText, questionOptions) { var questionDiv = $('<div>').attr('id', 'Question'); var divTitle = $('<div>').attr('id', 'Question Title').html(questionText); divTitle.appendTo(questionDiv); var divOptions = $('<div>').attr('id', 'Question Options'); createOptions(id, "radio", questionOptions, divOptions); divOptions.appendTo(questionDiv); return questionDiv; } function createOptions(id, type, options, div) { var optionArray = options.split("$"); // Loop over each value in the array. $.each( optionArray, function(intIndex, objValue) { if (intIndex == 0) { div.append($("<input type='" + type + "' name='OptionSelected_" + id + "' checked='checked' value='" + objValue + "'>")); } else { div.append($("<input type='" + type + "' name='OptionSelected_" + id + "' value='" + objValue + "'>")); } div.append(objValue); div.append("<br/>"); }

    Read the article

  • is there any chance of sql injection through selectbox( dynamically created or static)

    - by I Like PHP
    Hello All, i want to know that is there any chance of SQL injection via selectbox options? if yes then will u please show some demonstration(or refer any link). and also tell me how do we prevent sql injection in selectbox.(using PHP MYSQL) one more: if i create a selectbox dynamically( based on options of another select box) then is there any chance of SQLinjection? Thanking you.

    Read the article

  • ASP.NET Dynamically filtering data

    - by Jasper
    For a project I'm working on, we're looking for a way to dynamically add filters to a page which then control the dataoutput in, for instance, a grid. We want to add the filters dynamically because we want the customer to be able to change which properties can be filtered and what filtertype (textbox, dropdown, colourpicker, etc.) should be used. The filter should work as follows: - The customer links a filter to a certain property and specifies the filtertype (for this example: dropdown). - A user control which contains all the filter loads all filters specified - The filters load all values of the specified property as options. The first time the page loads; this would be the values of all items. - Now the user selects a value from one of the filters; the page reloads - Only items which have the specified filter value are retrieved, the user may specify one or more filters at the same time. - Once a user drills down by filtering, only filtervalues of the retrieved items should be used in the other filters. I have the following problems: - When I create the filters runtime, events are lost because the controls get recreated each postback. - I could place the filters in PreInit which should solve this, but then determining which controls should be loaded becomes a problem since loading all environment vars isn't finished yet - I don't know a good way of returning all the filter values to a central point from which I can make a good query. - The query has to be dynamic. I'm using linq which I want to make dynamic so I don't have to select everything everytime. How to make a dynamic select query based on a string stored in the database? - I have to select items based on the filtervalues and then adjust the rest of the filters to the already made selection. That kind of messes up the whole regular databinding sequence. Any help in one of the above would be great! PS: One thing I thought about was passing along filter values in the postback which would have to be recognizable. That way the server could use them for selection and then create the filters and autoselect the previously selected filtervalues. I'm not quite sure how to acheive this though...

    Read the article

  • WebBrowser created dynamically doesn't work

    - by Maciej
    I'd like to create WebBrowser control programically in my code and then read page content. I think I'm doing the same thing as designer does but control dynamically created doesn't work (DocumentText return empty string) What I'm doing wrong ?? WebBrowser browser = new WebBrowser { Name = "myBrowser"}; browser.Navigate("www.google.com"); Console.WriteLine(browser.DocumentText);

    Read the article

  • Dynamically create categories for SQLite pivot/crosstab

    - by alj
    I realise it is possible to create a crosstab within sqlite, but is it possible to dynamically determine the relevant categories/columns at runtime rather than hardcoding them? Given the following example, it can get rather tedious ... SELECT shop_id, sum(CASE WHEN product = 'Fiesta' THEN units END) as Fiesta, sum(CASE WHEN product = 'Focus' THEN units END) as Focus, sum(CASE WHEN product = 'Puma' THEN units END) as Puma, sum(units) AS total FROM sales GROUP BY shop_id I managed to do this in SQLServer in a stored proceedure before and wondered if there was anything equivalent.

    Read the article

  • update list selector dynamically in webos

    - by Aswan
    Hi i want to update list selector items dynamically .i am set the list selector widget like following this.ConversionToNumaric= [ {label:$L('One'), value:"1", secondaryIcon:''}, {label:$L('two'), value:"2", secondaryIcon:''}, {label:$L('three'), value:"3" , secondaryIcon:''} ] this.controller.setupWidget('listSelectorConversionToNumaric', {labelPlacement:'left',label: $L('To'), choices: this.ConversionToNumaric, modelProperty:'currentConversionToNumaric'}, this.selectorsModel); the above code i am using for setup the widget this.ConversionToNumaric= [ {label:$L('four'), value:"4", secondaryIcon:''}, {label:$L('five'), value:"5", secondaryIcon:''} ] ] this.currentConversionToPower.choices=this.ConversionToNumaric; this.controller.modelChanged(this.currentConversionToNumaric); what mistake i made here i don't know but it is not updating please help me

    Read the article

  • How to call Json objects dynamically?

    - by Devyn
    Hi, I have like this var house = {'floor':{'one':'3 people','two':'1 people'}} var tmp = 'one'; and I want to call like this.. console.log(house.floor.tmp) // expecting '3 people' result tmp value will get from somewhere dynamically but it's not working. How can I solve this?

    Read the article

  • Dynamically loading css stylesheet doesn't work on IE

    - by pistacchio
    Hi, I dynamically load a css stylesheet (with a little help from jQuery) like this: var head = document.getElementsByTagName('head')[0]; $(document.createElement('link')) .attr({ type: 'text/css', href: '../../mz/mz.css', rel: 'stylesheet' }) .appendTo(head); This works fine in Firefox and Google Chrome, but not in IE. Any help? Thanks

    Read the article

  • Unable to edit .less file dynamically using dotless

    - by newbie_86
    I've installed dotless and i see the handler has been added to my web.config file. However, i am unable to make changes to the .less file dynamically and reload the page and see the effect of the changes...Is there some setting I need to turn on? This is the handler: <handlers> <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" /> </handlers>

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >