Hi guys,
I'm trying to adopt Jammit in my Rails application.
Default config provided in documentation grabs all js files including view specific javascript:
embed_assets: on
javascripts:
workspace:
- public/javascripts/vendor/jquery.js
- public/javascripts/lib/*.js
- public/javascripts/views/**/*.js
- app/views/work...
I'm in the process of learning Javascript and I'm trying to create a simple dropdown menu. An example of my desired functionality can be seen on the google homepage in the top menu with the "more" and "settings" dropdown. Specifically when you click off the menu, the menu disappears.
What code do I need to place in the hideMenus functio...
I add an event to a frame using the inline syntax:
<FRAME SRC="s.htm" NAME="WINCONTENT" onload="alert( this )">
This works (=the event fires whenever a new URL is loaded),
except that I'd much rather register events using
addEventListener/attachEvent.
Now -- in the onload="alert( this ) example this is set to HTMLFrameElement.
How...
I working with some ajax at the moment, the result of a successful ajax result is that some more content is add to the page on the fly. My problem is that is added on the fly it looks like I cannot attach any events to the elements that are added.
The flow of what happens is that the user selects an option from a dropdown list, the valu...
I have an HTML page where I want to change Image & Link with at regular interval of time.
I have following code in Head Tag :
<sctipt>
var slideimages=new Array()
var slidelinks=new Array()
var text = document.getElementById('slidetext')
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=ne...
Hi,
How can I split up xmlhttp.responseText I receive from a database select row by row?
My database layout contains 3 columns which I want to hand over to a function.
This is what the responsetext looks like:
75px, 218px, foo, 12px, 13px, bar, 27px, 37px, bla
The function should be called:
myfunction(75px, 218px, foo)
and so o...
I am using a a href "Click Here" link in the page and if we click it will open a pop up contact form using javascript, here i need to get the value say like "id" into that popup from the a href so that i can manipulate the contact form,
<a href="javascript:showDiv('Showcase_10','<?=$mainrow[1]?>')">Click Here</a>
javascript function:
...
Hi All,
I have a table & when I click a cell, it displays a DIV(to the right of the mouse) with absolute positioning.
I want the DIV to display using minus co-ords(positioning), so it never display outside the table('#holiday-planner-table') .
Here's the concept I'm thinking of:
if($('#DayInfo'). is outside of $('#holiday-plann...
I have a page with a form with data filled by ajax post; on form page fields values are loaded correctly but I cannot get loaded value from a function inside the page; here is an example:
<input type="text" id="mela">
<div style="border:1px solid black; display:none" id="vv">aaa</div>
<script>
alert($("#mela").val());
if ($("#mela"...
<div id="main">
<a id="mainp" >Parent Window</a>
<iframe id="iframeindex" src="iframeindex.html" >
</iframe>
</div>
<script>
$(function() {
$('#mainp').live('click', function(e) {
alert("hi");
e.preventDefault();
});
iframeindex source:
<a id="child1" class="test" href="a.htm...
I have two Ext.Panels, one the scrollingContent, inside another, called wrapper. Wrapper is less large than scrollingContent, so the latter scrolls horizontaly inside his wrapper.
I would like to handle scroll events and the position of scrollingContent inside wrapper after each scroll.
I did not find any solution for this. Any help wo...
Is it possible using jQuery to count the number of div elements?
I have this code:
<div id = "center">
<div class ="name">text text</div>
<div class ="name">text text text ... </div>
<div class ="name">text ...</div>
</div>
And get number: 3
...
I'm writing a greasemonkey extension for a site which at some point modifies location.href.
How can I get an event (via window.addEventListener or so) when window.location.href changes on a page? I also need access to the DOM of the document pointing to the new/modified url.
I've seen other solutions which involves timeouts and polling...
I'm working on a site for myself, and I'm using a custom horizontal scroller done with Mootools that I got from another site (and got their permission to use). While I've managed to get the scroller to function the way I want to, there are two issues I'm looking to fixed and don't have the know-how myself to figure out.
I've set up a si...
I remember some options where Ajax like(No post back world) file upload was supported,
Hidden iframe
Using flash object (Though i still have curiosity of why SWF is used ? and what advantages it offer ?)
However by looking at blogs it appears that HTML 5 is promising, i tried some small examples and it really works :)
But recently ...
I have a model with a json field. The contents of which may or may not be pretty-printed, I don't really mind either way as long as the data is valid. However when it is displayed in django admin I would like for the contents of the field to be pretty printed so that it is easy to read. I don't mind if this means the pretty printed versi...
i have a function call it: myFunction(A,B,C)
I have onchange event in my option select that process "myFunction(A,B,C)"
<select id='B' onchange="myFunction(userid,B,C)">
I have two radio buttons that also have an onclick event that process "myFunction(A,B,C)"
<input type=radio, id="Cyes" onclick="myFunction(userid,B,Cyes)">
<input ty...
Hi,
On my home page, I have four boxes, and when you click on them, javascript expands them (gradually), and when you click again, it makes it smaller.
The one thing I can't figure out is that in the top left hand corner there should be a closebox icon. This isn't displaying for me. I'm not an expert in javascript but I think this is...
I'd like to know if standard JS provides a way of splitting a string straight into a set of variables during their initial declaration. For example in perl I would use:
my ($a, $b, $c) = split '-', $str;
In Firefox I can write
var [a, b, c] = str.split('-');
But this syntax is not part of the ECMA standard and as such breaks in all...
Hello
I can drag items without any problem unfortunately items can be dragged everywhere which I do not want. I only want items to be dragged on some specific areas such as buttonmenu. I used many methods but I have not got any result. Could you please tell me how to disable a buttonmenu which has id of 34 not to drop buttons there? You ...