» Home » JavaScript » Page 1
GWTTestcase accessing javascript object defined in an external javascript file fails
Category : 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


View Replies


Command Line JavaScript Input Arguments Issues While Minifying JavaScript in Gedit
Category : Javascript

I want to minify my JavaScript files immediately in Gedit. I tried do it via external tools option with jsmin.js script. I have SpiderMonkey engine installed. I stored jsmin.js file at /home/mushex/use/js/jsmin.js and created a new js file named jsmin-low.js in the same directory with content


#!/usr/bin/js
load('/home/mushex/use/js/jsmin.js');
var body = arguments[0],<

View Replies


Is it necessary to write tests for both Javascript and non-Javascript for apps that “degrade gracefully”?
Category : 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


or


B) Write the tests for both


I have learned basically everything I know from RailsCast


View Replies


JSP/Javascript/JQuery: store html/javascript content in a variable + write it to textarea
Category : 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:


"content":"<%=StringEscapeUtils.escapeHtml(StringEscapeUtils.escapeJavaScript(content))%>"


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


View Replies


JavaScript inline variables used by external JavaScript file? (Variable Scope issue)
Category : 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,

View Replies


looking for any codes(javascript/jquery/ajax) like able to pause the javascript and only activate it when onclick else dont do anything
Category : 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.



View Replies


how to assign a block of html code to a javascript variable (to invoke a javascript call)
Category : Javascript

I want to assign a block of html code to a js variable


the html code is


<script>alert('test');</script>

I want to do this


var script = "<script>alert('test');</script>";
document.getElementById('test').innerHTML = script;

but it does not work


if I substitute the tag (o


View Replies


Javascript to set hidden form value on drop down change - options not populating from Javascript array
Category : 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


View Replies


buttons generated in php and javascript calling a javascript function with an argument just refresh the page
Category : Javascript

I am trying to generate some buttons to hide a text field on a form with php and javascript, but every time i press the button it just refreshes the page. I cant tell if its the buttons or the function that is having troubles but i am assuming the program is refreshing because it is erroring out.


php generated button


echo("<button id="button".$count."" onclick=dele

View Replies


How to convert a javascript string to a javascript function, preserving the correct “this”?
Category : Javascript

A browser element has an onpopupshowing attribute, which is a string consisting of several javascript statements.


I want to "override" that bit of javascript.


Were this a function, I'd just assign it to a variable, assign my "overriding" function to the element attribute, and (if need be) call the original function from my overriding one, pretty much like this:



View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .