When using goog.require inside a <script> tag to load a script, the specified files aren't loaded. For example:
<script>
goog.require('goog.dom');
var mydiv = goog.dom.$('foo');
</script>
Gives:
goog.dom is undefined
What's wrong with this usage?
...
Hello
I am trying a new functionality for my web site. I want to do simple navigation by hiding/showing elements.
For example, when a user clicks a "details" button on some product, I want to hide the main div and show the div containing the details for the product.
The problem is that to go back to the previous "page", I have to und...
Hey,
I have a problem returning a variable in my function, the below script works fine:
function sessionStatus(){
$(document).ready(function(){
$.getJSON(scriptRoot+"sessionStatus.php",function(status){
alert(status);
});
});
}
sessionStatus();
Bet when I try the following I get a message box with the message...
I have an ascx control bound to a datasource with frequently changing data. Is there a quick way to have an ascx control postback, rebind and refresh itself every X seconds. The ascx control is in an update panel.
...
I have a ActiveX object witch I want to use in the browser (javascript).
There is a function I want to call. It's prototype is:
function TOPOSFiscalPrinter.DirectIO(Command: Integer; var pData: Integer;
var pString: WideString): Integer;
So, the function returns three values: result code, pData and pString;
In javascript the functio...
How do I find out if my browser supports Javascript 1.5 or not? using javascript of course. (or should I have googled or binged some more?)
...
Anyone know if jsbin.com implements any protection for XSS or other javascript attacks?
I see jsbin links used fairly regularly on sites like this one and I can't find any indication from the site one way or another. If it does implement counter measures, what kinds of things does it block out. If not, I should probably be more carefu...
Hi there!
Let's say I have a div with a backgroundimage (my logo) and I need this div to be switched with other 4 divs which are the same image but with other colours. Each image will be called on a mousehover using a jquery effect so it shows up smoothly, the order will be div1,2,3,4,5 and then restarts.
An easier explanation would b...
http://stackoverflow.com/questions/225843/how-can-i-have-a-sliding-menu-div-that-doesnt-move-unless-the-page-is-scrolled-d
i used the code from this link for a floating menu. it has how to stop the stop float at the header, but not at the footer. how can i modify this code to stop at the footer?
//// CONFIGURATION VARIABLES:
var n...
Basically I have a bunch of IMG tags wrapped in a bunch of divs, and some javascript to make them do rollovers. The page functions beautifully in IE and in Firefox, but Safari gives:
"TypeError: Result of expression 'ImageNavigateForum' [undefined] is not an object."
Where ImageNavigateForum is the ID tag of the 'img'. (a simmelar err...
i have two divs on a page. each has several dijits. i have atoggle that shows only one div or the other. when i submit the form, i only want to validate the dijits that are in the div that is displayed. is there a way to do this? basically, and dijits that have "display:none" should not be validated.
...
Is there any way to intercept all ASPX Page Responses? I'd like to intercept all the pages served and inject a small JavaScript at the end of each.
...
I want to add a transparent png into google maps instead of using the default icon. Where in my sample code would I change the default icon to a png named transparent.png?
Thanks!
function onLoad() {
map = new GMap(document.getElementById("div_map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTy...
So instead paying $35 for slideshowpro for lightroom, I just decided to whip up a quick javascript slideshow to do a simple task. Rotate 10 images within a div, randomly.
It works like so:
var imageSrc = "source_folder/";
var imageType = ".jpg";
var randomImage = imageSrc + 0 + Math.floor(#*Math.random()) + imageType;
(This isn't all ...
Kind of a weird problem... not something ive ever run into before.
So, i am using CKeditor, and am creating the upload and browse functions for users to upload and use images in the rich text editor. So, everything works great in firefox, they can upload images, and place them into the rich text editor, and save whatever they are doing ...
If I nest ordered lists with the same class and connect them to each other, it's very difficult to move the list items between lists in Firefox, and in IE it's totally whacked. In order to move list items between nested list levels, I need to first drag the item totally outside the parent container.
Here is a demonstration of the proble...
Does the iPhone browser have special events that I can hook into with Javascript? For instance, if the users slides to the left, I would like to perform a certain action. If there are events like this available, it would be nice to see a reference for all of them. ideally, there will someday be a standard for all touch-screen mobile b...
Few addons are not compatible with mine, so how to detect their presence and inform the user.
Thanks
...
I made up an editable PDF for students to request transcripts. Now, I want to constrain the input. For example, I want only numbers for their ID number, and I want only letters (no special characters) in the name fields, etc. In addition, there's an input called "Year Last Attended" where they enter the last academic year the user attend...
Error console:
unterminated string literal
$html='<li><div class="above">'+$question_number+ 'Question Title</div>
The JQuery code is:
$html='<li><div class="above">'+$question_number+ 'Question Title</div>
<div class="middle"> <input type="text" name="question'+$question_number+ '" size="55"/></div>
<div class="below">'+$question_nu...