javascript

How to create a JQuery Tab with Asp.NET MultiView

I Do not know any JQuery and have to create a Tab with JQuery or JavaScript which works well with Multiview. And note that I have this kinds of tabs in more than 40 pages so I'm looking for a solution which works for all of them. This is my current Scenario I have a Multiview and some Buttons above Multiview. Each Multiview contains a ...

Javascript expression to define object's property name?

Hello, I'd like to create this object... object = { 'object[1][var_name_1]' : 'value1', 'object[1][var_name_2]' : 'value2', }; I'm trying to it this way, but I'm getting error missing : after property id... function getPrefix() { return 'object[1]'; } object = { getPrefix() + '[var_name_1]' : 'value1', getPrefix() + '[var...

js detect https

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. ...

Google Maps rendering locally but not in live environment

I have a page that renders a simple google map for a specified location. This map renders without any problems at all when I run it locally on localhost, however, when I deploy this code to our live web servers (using our LIVE google API key for the appropriate domain) it fails to render, and upon putting a series of alerts within the ja...

Openlayers - LayerRedraw() / Feature rotation / Linestring coords

TLDR: I have an Openlayers map with a layer called 'track' I want to remove track and add track back in. Or figure out how to plot a triangle based off one set of coords & a heading(see below). I have an image 'imageFeature' on a layer that rotates on load to the direction being set. I want it to update this rotation that is set in 's...

Flex/Flash 4 ExternalInterface.call - trying to get a string from HTML to Actionscript.

Dear all, I need to obtain a string from HTML and put it into Actionscript. the actionscript: import flash.external.ExternalInterface; protected function getUserName():void{ var isAvailable:Boolean = ExternalInterface.available; var findUserName:String = "findUserName"; if(isAvailable){ ...

jQuery how to set click on href in the div?

Good day, I want to set click event on every anchor element in my div container. Here is an example what I want to do: ---HTML--- <div id="my-container"> <a href="page1.html">page1</a> <a href="page2.html">page2</a> <a href="page3.html">page3</a> </div> ---- jQuery ---- $("#my-container a").click(function() { var link ...

What's wrong with my website?

I've launched a website: .. But it does not work in IE 8 (the Flash movie does not load). It works fine in every other browser. I've no clue what's wrong or where to look.. Any ideas? ...

jquery range utility for quick iteration (prototype's $R equivalent)

In prototype the cumbersome for: for (i=0; i<10; i++) { ... } can be written as $R(0, 10).each(function(i){ ... }); Is there an equivalent of range in JQuery ? ...

[javascript] Good (better) substition for setInterval or setTimeout

I've got a masterpage with some nice UI (jQuery) features. One of these options is interefering with my embedded YouTube (or other alike-) objects. On each, in this case, setInterval event the embedded video stops displaying new frames (for like a second). More detail: I've got a "polaroid" gallery (in the header) with only 5 100x100 im...

Javascript ajax GET call does not include cookie-sid on initial page load.

In my application, when /iframe is requested, I create a cookie and serve the iframe.html file. In the html file I use a Javascript Ajax call to request for user data (/user), which is called on $(document).ready and needs to pass the sid from the cookie (so I know the call is authenticated). The problem is that, the cookie-sid is not p...

Question - Setting dynamic HTML using Javascript to iFrames on Windows Mobile 6.1 - IE Mobile6

Hi Experts, (excuse me if this is not the right forum to post - i couldn't find anything related to non-native programming and related to this topic) I Am trying to set a dynamic HTML into an iFrame on the webpage. I have tried a couple of things but none of them seem to work. I m able to read the innerHTML but can't seem to update it. ...

add tinymce to wordpress plugin

hi, is there a way to add tinymce into my own wordpress plugin? i've got a textarea in my backend script and want to make this area into a tinymce wysiwyg editable field. is there a way to do that? edit <?php wp_tiny_mce(false,array("editor_selector" => "test")); ?> <textarea class="test" id="test" name="test"></textarea> doe...

how to clone forms in javascript preserving event bindings

I am about to clone a part of form which has some actions bound to click events. I want to change all occurences of word TEMPLATE in attributes to 'n_'+ID. I want to abstract from structure of cloned part - It would be one TEMPLATE or 10. I tried to something like this but the bindings are lost: insert = function(){ var old = $('#T...

how to take Value From java Scrpit File and send it to php File?:(

Hi ! Can U tell me how to take Value From java Scrpit File and send it to php File . code : var year = (year != null) ? year : '".$this->arrToday["year"]."'; var month = (month != null) ? month : '".$this->ConvertToDecimal($this>arrToday["mon"])."'; var day = (day != null) ? day : '".$this->arrToday["mday"]."'; m...

Reference the oncomplete event by an external java script function

Hi , I want to do some logic at the oncomplete attribute of the a4j:commandButton ,but my logic is too complicated , can I reference the code using a java script functions located in a external java-script file to have a better maintenance ? I found it has error because the JavaScript file cannot understand the EL expression . For exa...

Getting data out of the company wiki using jQuery and ajax

The following javascript code gives me ">success-<", i.e. empty data. Pasting the url in my browser gives me the expected content. $.get("http://company.tld/wiki/api.php?action=query&amp;titles=Page%20Title&amp;format=xml&amp;prop=revisions&amp;rvprop=content", function (data, status) { alert(">" + status + "-" + data + "<"); }); ...

Passing an array as a function parameter in JavaScript

Hi all, i'd like to call a function using an array as a parameters: var x = [ 'p0', 'p1', 'p2' ]; call_me ( x[0], x[1], x[2] ); // i don't like it function call_me (param0, param1, param2 ) { // ... } Is there a better way of passing the contents of x into call_me()? Ps. I can't change the signature of call_me(), nor the way x...

Help needed with JavaScript variable scope / OOP and call back functions

I think this issue goes beyond typical variable scope and closure stuff, or maybe I'm an idiot. Here goes anyway... I'm creating a bunch of objects on the fly in a jQuery plugin. The object look something like this function WedgePath(canvas){ this.targetCanvas = canvas; this.label; this.logLabel = function(){ console.log(th...

Detecting HTML5 Drag And Drop support in javascript

Hi. I'm trying to detect the HTML5 Drag And Drop support in javascript. Modernizr seems to not handle this test case. Any idea ? Regards ...