I have a javascript file (with an .aspx extension) which is generated at runtime. It changes less than once per hour, generally. My goal is to include this javascript file in part of an existing CompositeScript on the server to reduce the number of server requests by 1. Yes, this is probably a bit crazy; I still wonder if it is solvea...
Any ideas on how to use Google Closure Compiler to combine multiple JavaScript files w/o any optimizations? Specifically, we want to use Closure to deploy two versions of our combined site JavaScript: release and debug. For release, we are using --compilation_level SIMPLE_OPTIMIZATIONS --manage_closure_dependencies which is working as ...
Is their a way to programmatically select an item in a dashcode list with having the user click on the list? Something like:
var list = document.getElementById("list");
list.select_item(3);
...
I know im doing something wrong here:
document.getElementById("body_bg_top").style.background-image:url(main_bg_top.jpg);
if any one can correct me i would appriciete it !
thank you
...
I am trying to add a string variable as a child of a node. The code that I'm using looks like this
$(this).parentNode.parentNode.insertBefore('content',$(this).parentNode)
I believe that this is correct syntax, but I keep receiving NOT_FOUND_ERR: DOM Exception 8. Does anyone have any pointers?
...
How do I use Google Closure compiler to remove unused code?
I am using the JQuery Slider control but am not using anything else within JQuery. So I read that Google Closure compiler in Advanced mode can remove unused code, but I don't know how.
I have frontpage.html that links to an external JQuery, JQuery UI and JQuery Slider control ...
The note at the bottom of this Mozilla wiki page currently says: "Using canvas.drawWindow() while handling a document's onload event doesn't work. In Firefox 3.5 or later, you can do this in a handler for the MozAfterPaint event to successfully draw HTML content into a canvas on page load." Which is fine, except that I tried it in Fire...
I have a PHP array:
foreach($xpath->query('//a') as $element) {
$linklabel[] = $element->textContent;
$link[] = $element->getAttribute("href");
$i=$i+1;
}
I also have an HTML form:
<form name="keypad" id="form" onSubmit="return pass(this)">
<input type="text" size="100%" length="25" value="" name="lcd">
<input type="b...
because of gfw(great firewall) in our country , I have to encode content within http transfer (https is better , but its a second choice).
my way is use base64 encode by php and decode by js , then show in an iframe. but there's some problem in FF.
is there any better way to show base64 encoded string in browser , or another way to enc...
i need some advice. i have an html page that i need precise control over when printing. using @media and @page and css styles etc i have given it all the attributes for printing i want, but the margin is really still governed by the browser (let's not debate the relative benefits here of browser control, suffice it to say i need it to pr...
Is it possible to create a cookie with javascript and then read it with PHP? And What about the other way around?
...
Previously answered questions here said that this was the fastest way:
//nl is a NodeList
arr=Array.prototype.slice.call(nl);
In benchmarking on my browser I have found that it is more than 3 times slower than this:
arr=[];
for(var i=0,n; n=nl[i]; ++i) arr.push(n);
They both produce the same output, but I find it hard to believe th...
Is there a way without using a server proxy to perform a cross domain GET or POST request?
...
I'm having a hard time trying to find a rotator to fit my needs since I cant seem to make one...
I want to automatically fade rotate a entire div, any help with this?
...
Does anyone know how to make a multiple select (see below HTML) sortable? Using either jQuery or Ext JS? By sortable, I mean that I can drag an item (an option) up or down to reposition it in the select control.
<select id="testing" multiple=multiple>
<option>First Option</option>
<option>Second Option</option>
<option>Thi...
I received some great help here the other day and hope once again I can get the answer I need as Im pretty stuck right now. I have a form that has a text input (#USA_sub) and two subsequent text input's (#FirstName) and (#LastName) I have a validation rule that checks to see if each value of (#FirstName) and (#LastName) each appear in (#...
I'm new to Javascript/Jquery and struggling with a certain issue.
In the process of adding a job to a database, the users have an option to update the contents of dropdown lists with new options. Adding the new options is handled through a greybox which posts data with PHP through to the database.
After adding the new option it doe...
Hi, here's my story:
I have two checkboxes: cb1 and cb2. They are both hooked up to an onClick event which checks if at least one checkbox is clicked. If this is not the case, it throws an alert and reverts the change. If a legal change was made (e.g. cb2 was checked, followed by cb1 being unchecked), the function calls the server funct...
i am trying to hide radio button values when you click it. i can do this if in a non dynamic way like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript">
<!--
function showDiv( id ) {
document.all.textBox01.style.visibility = 'hidden';
d...
When I insert a new text_area input(created by rails) into an existing form with jQuery it doesn't allow the user to type in the box, but the text_field(also created by rails) input field does.
-form_tag user_posts_path do
[email protected]_with_index do |post,index|
-semantic_fields_for "posts[#{index}]", post do |f|
=re...