Search Results

Search found 7724 results on 309 pages for 'backbone js'.

Page 40/309 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Anyone familiar with CurvyCorners JS?

    - by Kyle Sevenoaks
    I am trying to implement the CurvyCorners script onto the site: euroworker.no. It reports back that certain CSS values don't exist on the page, how I can I turn off this alert? Found the alert code: if (j === null) curvyCorners.alert("No object with ID " + arg + " exists yet.\nCall curvyCorners(settings, obj) when it is created.");

    Read the article

  • Seeking through a streamed MP3 file with HTML5 <audio> tag

    - by Kyle Slattery
    Hopefully someone can help me out with this. I'm playing around with a node.js server that streams audio to a client, and I want to create an HTML5 player. Right now, I'm streaming the code from node using chunked encoding, and if you go directly to the URL, it works great. What I'd like to do is embed this using the HTML5 <audio> tag, like so: <audio src="http://server/stream?file=123"> where /stream is the endpoint for the node server to stream the MP3. The HTML5 player loads fine in Safari and Chrome, but it doesn't allow me to seek, and Safari even says it's a "Live Broadcast". In the headers of /stream, I include the file size and file type, and the response gets ended properly. Any thoughts on how I could get around this? I certainly could just send the whole file at once, but then the player would wait until the whole thing is downloaded--I'd rather stream it.

    Read the article

  • keep HTMLformat after replace some text (using PHP and JS)

    - by Sadi
    I would like modify HTML like I am <b>Sadi, novice</b> programmer. to I am <b>Sadi, learner</b> programmer. To do it I will search using a string "novice programmer". How can I do it please? Any idea? Thank you Sadi More clarification: I get some nice reply with possible solution. But please keep posting if you have any idea in mind. I would like to more clarify the problem just in case anyone missed it. Main post shows the problem as an example scenario. 1) Now the problem is find and replace some string without considering the tags. The tags may shows up within a single word. String may contain multiple word. Tag only appear in the content string or the document. The search phrase never contain any tags. We can easily remove all tags and do some text operation. But here the another problem shows up. 2) The tags must be preserve, even after replacing the text. That is what the example shows. Thank you Again for helping

    Read the article

  • jquery js how to avoid massive onmouseover onmouseout firing

    - by stephan
    i have a table with some columns. in each of them is a picture where i have a onmouseover onmouseout event on it, which show a message in a div and hide the msg. my problem is - after a user goes quick from left to right (and moving) over a lot o images. all mouseover/out events of the images where executed, which looks stupid... is it possible to rearrange the internal event stack to avoid this? so that he executes only the current (mostly the first event) - and than the last one, if it is not same type eg. if mouseover over first image is executed and mouse moving position stops over an image 3times next the first one. i can avoid all other events firing, because the mouse stopped over an image and the mouseover is like the one where i stopped with the mouse. how can i avoid this multiple event firing?!

    Read the article

  • Django, CSRF protection and js generated form

    - by Neewok
    I have to create a form dynamically via javascript (yeah, that sounds ugly, but read this for the reason) and wants to make its submission CSRF proof. Usually, I use the @csrf_protect decorator in my views, and the {% csrf_token %} tag in my templates, as recommanded in the doc. But what should I do with a client-side generated form ? If I add a '/get_token/' view to generate a token on the server and obtain its value (say, via JSONP), then that means that I'm creating a backdoor an attacker could use to bypass the protection. Kinda head-scratching. What would you recommand ?

    Read the article

  • Ember multiple property changes but want to trigger single event

    - by Ankur Agarwal
    I have a ArrayController for date picker with properties to and from. Now when user selects a new date range from the UI both to and from value changes. So a function which observers on to and from is trigger twice for a single change in date range. I want to trigger the function only one every date range change. Any suggestions how to do that with ember app = Ember.Application.create(); app.Time = Ember.ArrayController.create({ to: null, from: null, rootElement: "#time", debug1: function() { this.set('to', 1); this.set('from', 2); }, debug2: function() { this.setProperties( { 'to': 3, 'from': 4 }); }, debug3: function() { this.beginPropertyChanges(); this.set('to', 5); this.set('from', 6); this.endPropertyChanges(); }, search: function() { alert('called'); }.observes('to', 'from') }); View in JS Fiddle

    Read the article

  • explanation about prototype.js function binding code

    - by resopollution
    From: http://ejohn.org/apps/learn/#2 Function.prototype.bind = function(){ var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift(); return function(){ return fn.apply(object, args.concat(Array.prototype.slice.call(arguments))); }; }; Can anyone tell me why the second return is necessary (before fn.apply)? Also, can anyone explain why args.concat is necessary? Why wouldn't it be re-written as: fn.apply(object, args) instead of return fn.apply(object, args.concat(Array.prototype.slice.call(arguments)));

    Read the article

  • Grails Illegel Exception

    - by Srinath
    Hi, Can any one tell me when this error occurs . I suspect this is coming when added any new js in Grails . I'm unable to dig this : 16 Apr, 2010 4:58:25 PM org.apache.catalina.loader.WebappClassLoader loadClass INFO: Illegal access: this web application instance has been stopped already. Could not load org.codehaus.groovy.grails.plugins.codecs.HTMLCodecBeanInfo. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException thanks in advance, srinath

    Read the article

  • button in XSL for AJAX usage

    - by phingko
    Hi guys, I wonder if its is possible to do AJAX when I put a button inside the xsl file; <input type = "button" id="laptop" value = "Add to Cart" onclick="sendCartRequest('Add');" /> That's what I do in my xsl file then in my js file I pass the id to the DOM and try to alert it make sure it is passed. And the alert appear to be empty. Is it a mistake to put the button in the xsl? or that's something else that cause it's empty? May be my DOMpath? Please point me a right direction. Thanks in advanced.

    Read the article

  • CSS/JS Problems IE7 Suggestions

    - by wuntee
    I have been having some serious issues trying to get this web page I have been working on working correctly with IE7 (ff/chrome/safari/ie8 all work fine). I have corrected all HTML and CSS issues, but it still does not render the same in IE7. I have been working on this for months, and was wondering if the community could give me some help: http://victoriakwasinski.com/ Thanks.

    Read the article

  • how to run javascript from c# code ?

    - by dotnetcoder
    I have a webrequest that returns a html response which has form inside with hidden fields with some javascript that submits the form automatically on pageload ( if this was run in a browser). If I save this file as *.html and run this file in browser , the java script code automatically posts the form and the output is excel file. I want to be able to generate this file from a c# code which is not running in broswer. I tried mocking thr form post but its complicated and has various scenarios based on the original webrequest querystring. any pointers.... i know its not possible to probably run JS code that posts the form - from within c# code but still thought of chekcing if someone has done that.

    Read the article

  • ajax/JS timed countdown?

    - by kieran
    Let me explain what I'm trying to do. I want to make a simple box which counts down numbers at intervals I specify. For example, I'd like to set it to start at 150, and then I want to set it to drop by 15 every 30 seconds. Is this possible with AJAX/Javascript? If so, could someone point me in the right direction? Would really appreciate any help on this script, been Googling for hours now! :( Cheers Kieran

    Read the article

  • Ext JS 4: Show all columns in Ext.grid.Panel as custom option

    - by MacGyver
    Is there a function that can be called on an Ext.grid.Panel in ExtJS that will make all columns visible, if some of them are hidden by default? Whenever an end-user needs to show the hidden columns, they need to click each column. Below, I have some code to add a custom menu option when you select a field header. I'd like to execute this function so all columns show. As an example below, I have 'Project ID' and 'User Created' hidden by default. By choosing 'Select All Columns' would turn those columns on, so they show in the list view. listeners: { ... }, afterrender: function() { var menu = this.headerCt.getMenu(); menu.add([{ text: 'Select All Columns', handler: function() { var columnDataIndex = menu.activeHeader.dataIndex; alert('custom item for column "'+columnDataIndex+'" was pressed'); } }]); } } }); =========================== Answer (with code): Here's what I decided to do based on Eric's code below, since hiding all columns was silly. afterrender: function () { var menu = this.headerCt.getMenu(); menu.add([{ text: 'Show All Columns', handler: function () { var columnDataIndex = menu.activeHeader.dataIndex; Ext.each(grid.headerCt.getGridColumns(), function (column) { column.show(); }); } }]); menu.add([{ text: 'Hide All Columns Except This', handler: function () { var columnDataIndex = menu.activeHeader.dataIndex; alert(columnDataIndex); Ext.each(grid.headerCt.getGridColumns(), function (column) { if (column.dataIndex != columnDataIndex) { column.hide(); } }); } }]); }

    Read the article

  • Selecting and inserting text at cursor location in textfield with JS/jQuery

    - by IceCreamYou
    Hello. I have developed a system in PHP which processes #hashtags like on Twitter. Now I'm trying to build a system that will suggest tags as I type. When a user starts writing a tag, a drop-down list should appear beneath the textarea with other tags that begin with the same string. Right now, I have it working where if a user types the hash key (#) the list will show up with the most popular #hashtags. When a tag is clicked, it is inserted at the end of the text in the textarea. I need the tag to be inserted at the cursor location instead. Here's my code; it operates on a textarea with class "facebook_status_text" and a div with class "fbssts_floating_suggestions" that contains an unordered list of links. (Also note that the syntax [#my tag] is used to handle tags with spaces.) maxlength = 140; var dest = $('.facebook_status_text:first'); var fbssts_box = $('.fbssts_floating_suggestions'); var fbssts_box_orig = fbssts_box.html(); dest.keyup(function(fbss_key) { if (fbss_key.which == 51) { fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); //This part is not well-optimized. if (tag.match(/W/)) { tag = '[#'+ tag +']'; } else { tag = '#'+ tag; } var orig = dest.val(); orig = orig.substring(0, orig.length - 1); var last = orig.substring(orig.length - 1); if (last == '[') { orig = orig.substring(0, orig.length - 1); } //End of particularly poorly optimized code. dest.val(orig + tag); fbssts_box.hide(); dest.focus(); return false; }); fbssts_box.show(); fbssts_box.css('left', dest.offset().left); fbssts_box.css('top', dest.offset().top + dest.outerHeight() + 1); } else if (fbss_key.which != 16) { fbssts_box.hide(); } }); dest.blur(function() { var t = setTimeout(function() { fbssts_box.hide(); }, 250); }); When the user types, I also need get the 100 characters in the textarea before the cursor, and pass it (presumably via POST) to /fbssts/load/tags. The PHP back-end will process this, figure out what tags to suggest, and print the relevant HTML. Then I need to load that HTML into the .fbssts_floating_suggestions div at the cursor location. Ideally, I'd like to be able to do this: var newSuggestions = load('/fbssts/load/tags', {text: dest.getTextBeforeCursor()}); fbssts_box.html(fbssts_box_orig); $('.fbssts_floating_suggestions .fbssts_suggestions a').click(function() { var tag = $(this).html(); if (tag.match(/W/)) { tag = tag +']'; } dest.insertAtCursor(tag); fbssts_box.hide(); dest.focus(); return false; }); And here's the regex I'm using to identify tags (and @mentions) in the PHP back-end, FWIW. %(\A(#|@)(\w|(\p{L}\p{M}?))+\b)|((?<=\s)(#|@)(\w|(\p{L}\p{M}?))+\b)|(\[(#|@).+?\])%u Right now, my main hold-up is dealing with the cursor location. I've researched for the last two hours, and just ended up more confused. I would prefer a jQuery solution, but beggars can't be choosers. Thanks!

    Read the article

  • js detect https

    - by ntan
    Hi, i am trying to find how can i "detect" width JavaScript if i am ih http or https environment I am calling ajax request so if i am in https and call http ajax i get 302 Moved Temporarily I was thinking of get the current window.location.href and do a strinh manipulation Any suggestion is welcome.

    Read the article

  • Is there a Scheduler/Calendar JS Widget library?

    - by Ravi Chhabra
    I am looking for some JavaScript based component to be used as a course scheduler which would be a cross between Google Calendar and the login time. I do not know if the right term for this is Course Scheduler but I shall describe this in more detail here. Course Scheduler The widget would be used to enter date and times of a course, as an example if I run a programming course 3 days a week on Mon, Tue and Wed every 7:00 am to 9:00am, 2 hours every day from 1st September to 30th November. I could answer various questions and the course data would be displayed in the calendar. It would also allow for non pattern based timings where each week is different from the other week etc. Question So would I end up creating something from scratch? Would it be sensible to use Google Calendar API for this? I did a Google search for some widgets, but I believe I need better keywords, as I could not find anything close to what I am looking for. Any tips? Commercial libraries would also work for me. Thanks.

    Read the article

  • IE Cannot open the internet site (no JS on the page)

    - by Nic Hubbard
    I know that there are many posts about this on Stackoverflow, but this one is different. All of the other fixes to this have to do with javascript, but I don't even have javascript on my page. None. And I am still getting this error. Was there any other reasons why this error was being caused? Also, it only happens when I visit my top navigation links, rather than the page directly from the url. Take a look at: http://www.mayandivers.com/see EDIT: This is happening in IE6/7.

    Read the article

  • Click to show more - maybe JS?

    - by Luke
    I am not sure what language or how to do this, but I am looking to have a word on a page, and when clicked, it will reveal more underneath. If it is clicked again, that stuff will hide away again? Any ideas?

    Read the article

  • background-color hex to js variable (jquery)

    - by Ezdaroth
    I'm kinda new to javascript and jquery and now I'm facing a problem: I need to post some data to php and one bit of the data needs to be the background color hex of div X. Jquery has css("background-color") function and with it I can get rgb value of the background into a javascript variable. The css function seems to return a string like this rgb(0, 70, 255). I couldn't find any way to get hex of the background-color (even tho it's set as hex in css). So it seems like I need to convert it. I found a function for converting rgb to hex, but it needs to be called with three different variables, r, g and b. So I would need to parse the string rgb(x,xx,xxx) into var r=x; var g=xx; var b=xxx; somehow. I tried to google parsing strings with javascript, but didn't really understand the regular expressions thing. Could someone tell me if there's a way to get background-color of div as hex, or explain how to convert the string into 3 different variables.

    Read the article

  • EXT JS toLayout on Viewport doesnt show anything...

    - by Nazariy
    After reading many example about adding new components in to existing container without reloading whole page I run in to small problem while combining tree and tabs inside Viewport component. What I'm trying to do is to register on click event to tree node and load in to content container new component, depending on node type it can be tabpanel, gridpanel or any other available component. here is short example of tree object: { xtype: 'treepanel', id: 'tree-panel', listeners: { click: function(n) { var content = Ext.getCmp('content-panel'); content.setTitle(n.attributes.qtip); //remove all components from content-panel content.removeAll(); content.add(dummy_tabs2); content.doLayout(); return; } }} All DOM manipulation went fine, everything registered properly, new Title shown, but dummy_tabs2 are not shown. I did try to set various properties for doLayout(true|false, true|false) but nothing happens. Am I doing something wrong?

    Read the article

  • Cross-reference js-object variables when creating object

    - by Ivar Bonsaksen
    Summary: I want to know if it is possible to do something like this: {a: 'A',b: this.a} ...by using some other pointer like {a: 'A',b: self.a} or {a: 'A',b: own.a} or anything else... Full question: I'm trying to extend MyBaseModule using Ext.extend, and need to cross-reference values in the extension object passed to Ext.extend(). Since I'm not yet in context of MyModule, I'm not able to use this to reference the object (See example below line 12). Is there any other way to reference values like this without creating the object first? 1 MyModule = Ext.extend(MyBaseModule, { 2 dataStores: { 3 myDataStore: new Ext.data.Store({...}) 4 }, 5 6 myGridDefinition: { 7 id: 'myGridDefinitionPanel', 8 bodyBorder: false, 9 items: [{ 10 xtype: 'grid', 11 id: 'myGridDefinitionGrid', 12 store: this.dataStores.myDataStore 13 }] 14 } 15 }); Or is the following the only solution? I would like to avoid this if possible, as I find it less readable for large extension definitions. 1 var extensionObject = { 2 dataStores: { 3 myDataStore: new Ext.data.Store({...}) 4 }, 5 6 myGridDefinition: { 7 id: 'myGridDefinitionPanel', 8 bodyBorder: false, 9 items: [{ 10 xtype: 'grid', 11 id: 'myGridDefinitionGrid' 12 }] 13 } 14 }; 15 16 extensionObject.locationsGrid.items[0].store = extensionObject.dataStores.locations; 17 18 MyModule = Ext.extend(MyBaseModule, extensionObject);

    Read the article

  • Missunderstanding js variables

    - by meo
    I have a little problem: slideHelpers.total = 4 for (i=1;i <= slideHelpers.total; i++) { $('<a href="#">' + i + '</a>').bind('click', function(){ alert('go to the ' + i + ' slide')}).appendTo('.slideaccess') } the alert gives out 5 what is logic, because when the function click triggers i is actually 5. But i would like to have the same i as in my <a> tag. What is the best way to handle this? I could put i in the data() of the <a> tag for example but i am sure there is a easier way.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >