javascript

DropDownList + OnSelectedIndexChanged + AutoPostBack=False

hi my dear friends... is it possible to force dropdown list to fire OnSelectedIndexChanged event without AutoPostBack=True? i told that because i have some RadComboBoxes(telerik) In My Form i am controling their focus with JQuery such as this code when my form loads: <script src="../JQuery/jquery-1.4.1.js" language="javascript" type...

jQuery $.post callback function calling location.reload() without using an anonymous function

Consider the following: wrap callback in anonymous function (works) $('#updateView').change(function(e) { $.post(URL + "actions/updateView.php", { view: $(this).val() }, function() {reloadPage();} ); }); call function directly (cookie is set but doesn't seem to update before page reload) $('#updateView').change(function(...

Querying large XML file (600mb+) in PHP or JavaScript?

I have a large XML file (600mb+) and am developing a PHP application which needs to query this file. My initial approach was to extract all the data from the file and insert it into a MySQL database - then query it that way. The only issue with this was that it was still slow, plus the XML data gets updated regularly - meaning I need to...

How does SourceForge's download page work?

In answers to other questions it was pointed out that SourceForge's download page worked by adding a hidden <iframe>. This does no longer seem to be the case... How is the current version of the download page implemented? I'd like to build something similar because I consider SF's solution quite elegant. Ok, more precisely...True, the ...

how to hide javascript code

Possible Duplicate: How can I obfuscate JavaScript? Hello! Is it possible to hide JS code? How? I read somewhere a technique like: take JS to external file, and use js-encrypt. I know that is impossible to hide from all eyes, but... Thank you. ...

unable to run an external javascript using a bookmarklet

Totally newbie about JS. I need to use an external script which modifies some elements in the current page accessing it as a bookmarklet. If I modify the html source code of the web page inserting the following < script > lines: s=document.createElement('script'); s.type='text/javascript'; s.src='script.js'; document.getElementsByTagN...

How do I dynamically modify content (a TreeView) in the parent page from a child IFrame?

I have a TreeView menu on a parent or base base that hosts an IFrame in which content pages corresponding to menu items are loaded. Ideally one of my content pages should dymamically insert its own contextual items into it's section of the TreeView menu. I have a strong suspicion that jQuery is pretty much the only tool I am familair wi...

Return back to scroll position before Ajax request

I use to jquery's ajax function to update a div on my page. Everything works fine, except my page is scrolled up. I need somehow return to the updated div position. Any suggestions ? ...

How do I increment attributes with numbers using jquery?

I have a HTML snippet as follows, I want to take the 'article-form' div, clone it, and increment the numbers for the attributes for, id, and name. <div class="article-form"> <label for="id_form-0-section">Section:</label> <select id="id_form-0-section" name="form-0-section"> <option selected="selected" value="">---------...

jQuery/Javascript: string splitting question

hi all, i'd like to split an image's href tag like <img src='/root/myimages/myPic.jpg'> so that i'm getting just myPic.jpg - whats the easiest way? thx ...

Asynchronous programming in JavaScript without messy callbacks

I want to turn an asynchronous function to the synchronous. function fetch() { var result = 'snap!'; $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", function messyCallback(data){ result = data; }); return result; } document.write(fetch());​ See in action ...

Maximizing / Resizing a dialog window in CKEDitor

I need to programmatically maximize / resize a CKEditor IFrame dialog (i.e. a CKEditor dialog with an "ok" and "cancel" button, and an iframe in it for the rest). I would need the dialog to stay centered on the screen. I can see only functions to resize and re-position the window, but to use those, I'd have to calculate the window dimen...

select the #targetElem siblings(div class="content") animate

the html is <a class="minimize" href="#targetElem" >Min</a> <div id="targetElem"> <p class="handler"></p> <div class="content"> content area </div> </div> the javascript is the following code $(document).ready(function(){ $('a.minimize').click(function() { $($(this).attr('href')).siblings(".content").slideToggle("slo...

JW Player playlist only loads randomly in IE, works fine in FF every time

The playlist loads every time in FF but only the first time in IE (6-8), after that only randomly. If I alert the error that's thrown I get "TypeError: playerReady is undefined". My code looks good and obviously works since FF displays the playlist perfectly. I've got no idea how to solve this. Anyone? <script type='text/javascript'> ...

Javascript replace() doesn't work in VS - unknown character

I'm trying to use the javascript replace function to replace curly quote with straight quotes: var EditedContent = content.replace(/“/g, '"'); This works great in a little proof of concept html file I've whipped up, but when it's in a visual studio project, it replaces the curly quote with a symbol that suggests 'unknown character': ...

jquery plugin functions return values

I stripped all my logic out of my jquery plugin for this question, but my problem is that when I call my function checkValidationName, it does it's thing and sets name = to true. Then when i try to compare it right after where i called it, the value is false. Why is this? (function($){ $.fn.validate = function() { ...

ExtJS beginner - Samples/Extensions where is the documentation ?

Hello We have been looking at the ExtJS samples quite a few times over the years and recently decided to use it because I was looking at the samples and saw a Tree Grid and felt like "Yes this is exactly what I need". So I download ExtJS read a bit on the getting started/FAQ/Tutorial from the website. Then I decide to try to use the Tr...

jquery find div or select by name returning 0 results

I'm trying to select a <div> inside of a <p> by name, but it's returning 0 results. The same type of selection works fine for <input> and <span>, but not for <select> and <div>. The code below demonstrates what I mean: <html> <head> <script type="text/javascript" src="jquery-1.4.1.min.js"></script> </head> <body> <p id="foo"> ...

Jquery Global Function?

I'm somewhat new to this so I think there is an easy answer. I have a function that strips the youtube id off a url. I then want to use this function 10 time per page (in the wordpress loop). The function works great when I feed it the url within my function script tags, but when I start a new set of script tags within the loop, it do...

How do you grab an element from a remote page using MooTools and Request.HTML?

I'm using MooTools ( part of the project ) to load a page using Request.HTML which works fine except that I don't want the whole page, just one fragment which has an id. This is the code in question var req = new Request.HTML({ onSuccess: function( res ) { // according to the docs // res should be the node list of...