Execute dynamic code
i have following in a string. javascript: __doPostBack('GridWidget', 'Edit$0') how can i dynamically execute this? ...
i have following in a string. javascript: __doPostBack('GridWidget', 'Edit$0') how can i dynamically execute this? ...
I want to be able to close the browser window using JavaScript. Is this possible? ...
I am trying to serialize the current div by using a clickevent. See code for good explanation: $("#createreview").live('click', function() { alert($(this).parent().serialize()); $.post('/admin/home/review/create/', $(this).parent().serialize(), function(data){ alert('Review succesfully added to database.' +data); }); ...
I have been using the following code (with jQuery v1.4.2) to set the 'selected' attribute of a select list based on its 'text' description rather than its 'value': $("#my-Select option[text=" + myText +"]").attr("selected","selected") ; This code worked fine, until I noticed one select list on which it failed, depending on the text t...
As a non-professional programmer, I'm trying to self teach myself a little HTML and javascript. My learning project is a desktop gadget that will retrieve rss items from an rss feed. I would like an option to toggle so the user of the gadget can decide to display all items or only new items (unread items). It's displaying only the new i...
here is my code? FB.login(function(response){ console.log(response) if(response.session){ connectFacebook(); } },{perms:'email,read_stream,publish_stream,offline_access'}); I need to permission user to use my applica...
I just heard about JavaScript objects and was wondering what they are (because I cannot find any information out there) and what they are useful for. I really just need help with that. Sorry I am a beginner. ...
Can I get an explanation on how to make a wysiwyg editor using a textarea? All I need it to be able to do is parse basic html tags like bold, italics, underline, etc. It doesn't need to have any buttons that inserts it, I just want to have a default text inside the textarea tags that parse the html. Example: <textarea cols="20" rows="2...
Hello everyone, hopefully someone can help me with something that has been bugging me. I've got a page that is based on a fluid grid system. I'm using the gvchart plug-in: http://www.ivellios.toron.pl/technikalia/2010/06/22/gvchart-plugin-jquery-with-google-charts/ to use generate Google charts from a table. Everything works fine except...
I want a text field to always be focused. When they click out of the textfield, I want the focus to go back into the textfield. How would I accomplish this with jquery? $('input').focus(); $('input').**unfocused?**( function($) { $('input').focus();} ); ...
First great calendar! It's going to save me a lot of time and headaches. I have a couple questions I am populating my calendar using AJAX- and it's working fine.. MySQL gets queried sends back nice JSON-- and et voila-- populates my calendar. The events on my calendar are events logged in by different users (all authentication and asso...
first: always is the same action. two: the form has multiple "CSS SUBMITS" like <form action="/myaction" method="POST"> <a id="foo1" name="foo1" href="#" role="form_button">submit1!</a> <a id="foo2" name="foo2" href="#" role="form_button">submit2!</a> <a id="foo3" name="foo3" href="#" role="form_button">submit3!</a> <input type="submit...
A requirement for a current project of mine involves "highlighting" an HTML element in the context of a page. That is, I need to provide some sort of visual effect that decreases the brightness of the surrounding page while leaving the element at full brightness. To achieve this, I'm trying the following approach: Determining the high...
I need a JavaScript function to tell me whether a string object is empty. By "empty", I mean that it's not all just whitespace characters. I've written this prototype: String.prototype.isEmpty = function() { return this.length === 0 || this === " " || this.test(/^\s*$/); } Is this alright? Is there a more-performant version of this...
$(function () { function f1() { if (this.checked) { $('select[name=two]').removeAttr('disabled'); } else { $('select[name=two]').attr('disabled', true); } } $('input[name=one]').change(f1).triggerHandler('change'); $('.reset').click(function () { $('input[name=one]')...
Hi, Is there a way to keep children added to the DOM via .appendChild() after a POST/GET without regenerating them in JavaScript? Right now I'm regenerating them with a few function calls written in a script tag using php. ...
Hey all, I need to dynamically initiate a download with javascript. I have seen how people do this by doing something like window.open("some url", "Download"); but I need to do it without changing the url of the current page (and not using frames if I can help it, or created and destroying a frame dynamically). Anybody know how to d...
I'm in the middle of developing a CMS web app and I'd like to make it work well and look nice. Of course the age-old issues of browser support com into play here. What are some good frameworks for developing "Web apps"? I'm talking about libraries that do things that like AJAX, animations and HTML5 support. Please provide link and de...
$('.reset').click(function () { $('select[name=one]').val(opt2); }); JSFiddle here. What should I change? Thanks! ...
I used if statements before in a the success function of an ajax call but for the life of me I can't get this to work. I can alert all VARS and they show the data, but the condition statement will not work. What am I doing wrong? I just can't get it. jQuery.ajax({ type: "POST", url: "/ajax/uiProcessPhoto...