I have been using the following snippet of code in my app to drive a menu that contains different trees depending upon what is selected. It tries to create tree panels only once and to then reuse them if they are selected again, i.e. to keep the trees expanded state.
var west = Ext.getCmp("west-panel");
west.removeAll(false);
...
I have begun writing my 'class' type JavaScript functions like the Module Pattern or Revealing Module patten. This avoids the use of 'new' and allows me to define which functions are public in a single place. However, I have been unable to see how to use and access public data members in this pattern.
e.g. the member 'id' below is ac...
Hi
Can anyone explain how i can access the rails routes/names routes in javascript ?
The following are some of the things i tried
http://github.com/jsierles/js_named_routes.
but no luck.
...
I first write the JSON:
$arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
print json_encode(array(
"array" => $arr
));
Then in the jQuery I do:
j.post("notifications.php", {}, function(data){
Now this is where I'm a little confused, as I would normally do:
data.array
To get the data, but I'm not sure how to handle the array....
Hello,
I have a list of URLs and need to load each page, one after another.
This is my main function that i have in my Mind.
mainFunction() {
loop { // Loop through URL list
oPage = func1(URL); //Get page contents
aResult = func2(oPage); //Analyse the contents
func3(aResult); //Do current page modifications
}
}
func1 uses GM_xml...
I have the following link-
<a href="ex.com" onClick="return popitup2('<?php echo $var3; ?>');">Grab Coupon</a>
Where i have initialized $var3 like this
$var3 = "brand1,camp2";
The code for the function popitup2() is -
<script language="javascript" type="text/javascript">
function popitup2(id) {
$.ajax({
url: "http://jainkunal...
Basically I want to get some javascript to be sent back to the client and executed from a postback inside an UpdatePanel. Furthermore this is inside of a reusable WebControl.
I've tried this.Page.ClientScript.RegisterStartupScript and this.Page.ClientScript.RegisterClientScriptBlock but Firebug shows that those scripts aren't sent back...
I have 3 column table, I will need one of the columns to give me color change notification or flashing, how to do this?
...
I am running into a bit of a problem in debugging a web application for mobile safari. The web app is a front-end for a fairly complex server-side simulation tool. The overview of how the web app works is:
User is presented with a screen where they fill in values for the simulation to be performed.
User clicks "run simulation" at whi...
I've been playing with Raphael trying to create a combination of two of his example charts. The first being http://raphaeljs.com/analytics.html which I have working properly, now I'm adding in some elements from http://raphaeljs.com/chart.html as my chart will be a monthly report. I have the forward/back buttons drawing correctly at th...
Possible Duplicate:
whats the javascript var _gaq = _gaq || []; for ?
In the asynchronous example of Google Analytic's Ecommerce tracking code, the declaration of the array is:
var _gaq = _gaq || [];
I'm trying to understand what they are doing here. Is this a true OR statement? Is this because of the async treatment of t...
I don't know if I'm intruding too much in a person's code.
This website uses jQuery Tool's Scrollable in big images (3 horizontally positioned images each time). But these images are only loaded when the previous one is clicked.
Can anyone explain to me the code that does that?:
Reference:
index.php
<div class="item current" title="...
I was looking through a number of websites, but i couldn't find out how to use a toggle panel to change the visibility of another element. Please see the example..
<rich:togglePanel switchType="client"
stateOrder="panelOneOff, panelOneOn">
<f:facet name="panelOneOff">
<rich:toggleControl>
<h:outputText value=...
I wanted to disable a button after it is clicked and at the same time fire the post back event to generate a report. My first set of code did not work because soon after the button is disabled the page won't submit/post back. here's the first set of code which was not implemented. the onclientclick calls a javascript function which has t...
Possible Duplicate:
how to disable javascript errors on twebbrowser ?
I'm using the TWebBrowser component with Delphi 6.0 to display a YouTube web page. Sometimes I get a Script error message box from Internet Explorer, which TWebBrowser embeds, complaining that an error has occurred in a script running on the page and prompt...
I am getting runtime error in IE 6 for below code.
function loadFromPopup(url) {
if (top.opener){
top.opener.window.location.href = url;
window.close();
return false;
}
return true;
}
Really appreciate if any one can give some suggestions.
...
My site has a "print this page" button.
I load a static print template HTML file into a hidden iframe, copy the HTML into that page using jQuery, and call window.print() from the Iframe page. All is well, except on Safari, which wants to print the parent frame as well, so I get two print dialogs opening.
I've tried calling window.print...
Cocoa Touch's UITableView allows a user to scroll through large numbers of data rows with good performance because it recycles table rows. Rather than create a GUI element for every single data row, a limited number of table rows is created, and simply updated with the relevant data as the user scrolls, giving the illusion of navigating ...
I'm working on a realtime media browsing/playback application that uses <video> objects in the browser for playback, when available.
I'm using a mix of straight javascript, and jQuery,
My concern is specifically with memory. The application never reloads in the window, and the user can watch many videos, so memory management becomes ...
I have a drop down list that gets enabled/disabled based on a checkbox onclick. On my debugging my object reference is not set when my checkbox is disabled in my controller.
CONTROLLER
Subject = Request.Form["DetailSelect" + rowID].ToString();
JAVASCRIPT
ddlSelect.disabled = !ddlSelect.disabled;
ASPX
<select = i...