javascript

AIR: Should I use a Sandbox Bridge to provide access to local FS for HTML-based AIR app?

I've got a HTML/JS (YUI 2/3 framework) photo-organizer, and I want to get access to the local FS to organize desktop photos. Searching for the best approach to deal with security/sandbox issues and also maximize HTML/JS code reuse. Some key issues to consider: HTML/JS codebase still lives on for web-only content, ideally I could load ...

AIR: Does YUI3 work in the AIR application sandbox?

This page only lists YUI 2.5.1. Is it outdated? http://www.adobe.com/products/air/tools/ajax/community/ I know it works fine in a remote sandbox. ...

Detecting client-side DOM changes server-side in ASP.NET: Is It Possible?

I'm working on developing a custom control to select items from a predefined list. This is accomplished via 2 ASP.NET ListBox controls, with a few buttons to trigger the movement of ListItems from one ListBox to the other (lets call these ListBoxes lstSelected and lstDeselected). This is easy enough to do in ASP.NET or JavaScript indepe...

generating random numbers from skewed normal distribution

when you use the random(min,max) function in most languages, what is the distribution like ? what if i want to produce a range of numbers for 20% of the time, and another range of numbers for 80% of the time, how can i generate series of random number that follows that ? ex) i should get random frequency but the frequency of "1" must ...

Can you setup a variable for javascript in one page and have another page load and still have it recognize the variable?

Can you setup a variable for javascript in one page and have another page load and still have it recognize the variable? ...

Data mining from iframes

I am interested in developing some javascript that resides as browser bookmark that can mine data from nested iframes and AJAX the data back to a remote server. A small collection such scripts would be used to coordinate player stats and attack strategy for a popular online game. I am a novice javascript programmer and don't know if th...

Echo styles into the mashup of a google map and wordpress custom fields

Using wordpress, I am pulling in a custom fields from specific posts to fill in the content for a google generated map. I am using this code var point = new GLatLng(48.5139,-123.150531); var marker = createMarker(point,"Lime Kiln State Park", '<?php $post_id = 182; $my_post = get_post($post_id); $title = $my_post->post_title; ...

Creating a Javascript Facebook Connect Session based on a valid Offline Access Key (infinite session key)

I spent an entire Saturday exhausting Google. Serious good Karma belongs to anyone who can help. I'm using the .NET Facebook toolkit V3 to authenticate my users against Facebook. When a user grants the offline_access permission I store the session key. When they return later without a facebook session (but with a valid session for my we...

Bookmarklet Keeps going to new page

I made this bookmarklet: javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');document.getElementsByTagName('body')[0].appendChild(s);$('#hldIntMain').hide();$('#fadeBackground').hide();return false;})() Formatted code: // Add in jQuery v...

Log out of BOTH Wordpress & Facebook

Hi All, So I've successfully integrated Facebook into my Wordpress site. I've also linked together the accounts. However, the way the site works is that you're either logged into the site via the Wordpress Account Facebook Account or Wordpress & Facebook I know how to log out of Facebook and I know how to log out of Wordpress, but ...

Using Jquery, how do you update elements in an html page based on the key names returned in a JSON document?

I am currently asynchronously fetching json documents to update elements in a few html pages. My current approach seems less that elegant. For many pages I just need to update an element on the HTML page that corresponds to a key in the being returned in the json document. I'm looking for a simple jquery/javascript function that updates ...

Trouble outputting full list of numbers using innerHTML

Hi, the following is code to create a sequential list of numbers from 1 to 10. I'd like to take this list and output in the div "pagination" using innerHTML. However, when I execute the script, the only thing that is outputted is the number 10. When I overwrite the page using document.write instead, it outputs the whole list. Can som...

How to execute a page ,that contains JS ,in AJAX ,using innerHTML?

I send GET data with AJAX to another file.And on the another file I have echo "<script>alert('Something');</script>";.This is displayed dynamicly with AJAX ,i.e var ajaxDisplay = document.getElementById('edit'); ajaxDisplay.innerHTML = ajaxRequest.responseText; puts the <script>alert('Something');</script> to div with name edit. But ...

Store images in Javascript object.

Hi, I am not sure if this is possible, But I want to store an image in the javascript variable or an object. And when the page loads, i want to make those images appear where desired. I want to know that if some images are converted to binary form, Can they be converted back to images with Javascript. Thanks & Best Regards. ...

Where to place the timeout() fadeout?

Hello. function checkSession(){ $.ajax({url: "session.php", success: function(data){ if( data == 1){ var postFilen = 'msg.php'; $.post(postFilen, function(data){ $(".msg").html(data).find(".message2").fadeIn("slow") }else{ $('.msg').hide(); } }}); // se...

Image visualization with canvas. How to resize them?

I'm building a website photo gallery for a friend. Images are loaded as simple DOM image objects (<img src="" />), and the size of these images is based on the browser size. So I resize them with CSS. This isn't an optimal solution since CSS resizing seems to change the quality of the image and pixelate it quite a bit. I was thinking o...

dojo/dijit and Printing

I want to be able to provide a button to my users to just print a particular portion of my dojo/dijit application. There seems to be a general lack of documentation and examples when it comes to printing. For example, I have a specific dijit.layout.ContentPane that contains the content that I would like to print, but I wouldn't want to...

Getting CSS from parent on an iFrame

I am using a phpbb3 forum with a bbcode to insert an iframe. I want to use the css from the forum for the iframe. I tried some code I found here but it isn't working. I might be doing something wrong but I'd love to get this working, especially since users can change the forum css. The forum is: botdls.prophbb.com and the iframe is the "...

What should i learn after getting good knowledge of XHTML, CSS, Web Standards, Accessibility? Javascript or PHP?

What should i learn after getting good knowledge of XHTML, CSS, Web Standards, Accessibility,Usability, Information Architecture and Adobe Photoshop? Javascript/jquery or PHP First I want to learn and be focus to learn anyone of these two? Which language would be good to learn first? ...

JQuery's offset() function

Hello, I know JQuery does most when it comes to cross-browser issues. I just wanted to know if offset() method of JQuery serves the purpose of cross-browserability, I mean top, left, etc properties that can be derived from it? Basiclly once I apply top, left, etc properties (which are derived from offset() function) to an element, I ne...