» Home » javascript » Page 1
Is it necessary to write tests for both Javascript and non-Javascript for apps that “degrade gracefully”?
by Barfo in Javascript

In writing the tests for my Rails 3.2.3 application, I am writing the tests to handle the basic clicking and stuff minus the Javascript. However, I'm leaning heavily on jQuery in the application and I am wondering if I should:

A) Write the tests for JS instead


B) Write the tests for both

I have learned basically everything I know from RailsCast

GWTTestcase accessing javascript object defined in an external javascript file fails
by Alexander Schuc in Javascript

I have defined a GWT module that includes an external javascript file using tag. I have written a GWTTestCase that returns the above described module's name. When my testcase accesses a javascript object I see the following exception

Caused by: com.google.gwt.core.client.JavaScriptException: (null): null

Any idea on how to fix this?

Am I right in assuming

looking for any codes(javascript/jquery/ajax) like able to pause the javascript and only activate it when onclick else dont do anything
by droom in Javascript

hi i am new here and i need help!
i am looking for simple javascript for okay/cancel function. just like hotmail when want to delete email, it will prompt you whether you wan to proceed or cancel.
my current code will just auto runs two javascript.
so now i am looking for codes like able to pause the javascript and only activate it when onclick else dont do anything.

jQuery to JavaScript: equivalent to $(“.className tagName”) selector in javascript
by Thaweesak Suksuwan in Javascript

I wonder what's the equivalent to this jQuery selector: $(".className tagName") in javascript?
Anyone can help me?
Thnaks in adcance.

Javascript (Jquery or MooTools or pure Javascript) hide Element by content or href
by Marti in Javascript

I have a HTML that looks like this:

<td nowrap="nowrap">
<a href="/home" class="mainlevel_jos_mainmenu_menu" >Home</a>
<a href="/somethingelse" class="mainlevel_jos_mainmenu_menu" >Something Else</a>
<a href="/somethingelse2" class="mainlevel_jos_mainmenu_menu" id="active_menu_jos_mainmenu_menu">Something Else 2&l

javascript error “invalid XML attribute value <script language=JavaScript> ”
by mrmt in Web Design

i have some javascript files included in my html file for months. It used to work just fine until couple of days ago, now my scripts don't run anymore and i get javascript error "invalid XML attribute value <script language=JavaScript>
with firebug.

Does anyone know what this error means and how to get rid of it? i guess is something about that

JavaScript inline variables used by external JavaScript file? (Variable Scope issue)
by mikeymikec in Javascript

I have the following code:

<script type="text/javascript">
var ops = {
slideshow: {
slices: 20,
boxCols: 11,
boxRows: 6,
animSpeed: 750,
pauseTime: 6000
tweets: {
username: 'stigmahost',
count: 6,

(Ruby,Rails,Javascript) Redirecting/Rendering a different page when Javascript is disabled…?
by Zivic in Javascript

I'm having severe issues with Rails, Javascript, and redirects. Basically I have the "simple" issue of redirecting to a different page if JS is disabled. If JS is enabled, then I add a new item inline immediately -- this works like a charm. However, if JS is disabled I want to redirect to the NEW page of a different controller. Basically the model setup is as such:

Site ->

Javascript to set hidden form value on drop down change - options not populating from Javascript array
by Venezuela in Javascript

I have some Javascript code that creates 2 arrays: One for Product Category and one for Product.

But before the user can choose the Product Category or Product, they have to choose the type of Campaign they wish to use. Thus, the selection (event) of the 'Campaign', triggers the hidden drop-down menu from which to choose the Product Category. Once the Product Category is chosen

JSP/Javascript/JQuery: store html/javascript content in a variable + write it to textarea
by Silverforce11 in Web Design

I'm using a json object to store different bits of content, one of which can contain javascript & html relevant content (like quotes, semicolons, tags etc) which without encoding can break the page. To work around this I'm using:


(I'm using JSP as server-side technology and


Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .