In most browsers if you enter javascript:$('element').css('property', 'value');
will result in the javascript code being run.
In firefox this will cause the page to change to a blank white page with [object] [object]
why is this?
...
I'm using a simple jQuery script for tabs:
The JS:
$(document).ready(function() {
$(".tab-content").hide();
$("ul.tabs li:first").addClass("active").show();
$(".tab-content:first").show();
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active");
$(this).addClass("active");
$("....
Hi All:
I Have usercontrol and i registered the following javascript method in code behind :
changeSelectedMenu(controlID);
the previous method is declared in JScript.js file so i registered it also .
but the following exception has been thrown :
Microsoft JScript runtime error: Object expected
The result page is :
<script src=...
I have a basic Express server:
// server.js:
var Express = require('express');
app = Express.createServer();
app.configure(function(){
app.set('views', Path.join(__dirname, 'views'));
app.set('view engine', 'jade');
app.set('view options');
});
app.get('/', function (request, response) {
response.render('welcome', {
locals: ...
I am having strange behaviour on my Android emulator. window.open() always returns undefined when called from setTimeout or callback function e.g. AJAX callback. However window.open() successfully opens a popup when called from an event handler e.g. onclick
here is sample code:
<html>
<head>
</head>
<body>
<script type="text/jav...
I am trying to make a carousel of sorts. I am kind of stuck with hiding and displaying the next and precious buttons once a div moves to the far left and right of its container.
I think i have everything correct regarding calculating the widths but for some reason when you click the buttons, elements stay hidden irrespective of the cond...
I have a comments controller with index and create actions among others. Both those actions respond to html and js format.
Whenever I got create request via ajax, I would like to add new comment and then redirect to index.js, so the comments on screen are updated without reloading the page.
This sort of thing works flawlesly in Chrome...
Hi!
I've simplified the HTML and Javascript.
The HTML structure
ul -> li -> a
The javascript
var $ul = $('#the-list');
$ul.find('a').click(function(e){
e.stopImmediatePropagation();
console.debug('a');
});
$ul.unbind('click').click(function(){
console.debug('ul');
});
The problem
The first time a link is clicked, e...
Hi all,
I am trying to open a location in new window(tab) using window.open. It is not working in chrome. First I tried with window.open(url,name), this did not work, however this works in every other browser. Then I used something like this,
var w = window.open("about:blank");
w.opener = null;
w.document.location = url;
This opens th...
Hi Guys
I keep getting the error links[i] is undefined.
I define it explicitly and yet it keeps giving me that error -- any ideas?
I am trying to do unobtrusive image rolovers on 5 links that I have.
function loadImages(){
path = 'uploads/Splash-4/nav/';
links = new Array();
for (i=1;i<=5;i++){
var id = "link-"+i...
Hi everyone.
I'm looking for a voting script/widget (preferably jQuery), but not a star rating one, one with +1 and -1 options like this (admire my profesionnal MSPaint skills ^^) :
Anyone know about one ?
Thanks a lot !
...
Hi everyone i have a problem like this.
For example im in http://localhost/Search.aspx
I have 2 textboxes (txtUserName and txtPassword) in my page for login.
user can press enter key to call Login() method when any of these textboxes focused.
I capture enter key like this
txtUserName.Attributes.Add("onkeydown", "if(event.which || even...
Hello,
I want to enhance a composite control's client side, my approach is to recreate all method on JavaScript, so here I have some troubles:
Can I call onclick event on client side otherwise on server side?
the statement table.onclick=SelectRow(event) fires a bug!
Code:
function Control_Init() {
if( !(document.getElementById)...
Title says all, i need to JSON response string / object for debugging purposes. How can i get it ?
...
Is there any way to "break out" of an iframe? What I mean by this is that people will be placing my javascript tag inside an iframe (sometimes it ends up being nested iframes, but lets just deal with ONE for a now). I'm trying to gather certain information, like where that iframe is located on the page. It's easy enough to do it when you...
Hi there,
I am looking for a good template system (preferably XML-based) that provides implementations both for PHP and Javascript.
This would enable me to write templates for some elements that are either:
- Populated on server side : when simply displaying those, in "reader" mode.
- Or instantiated / populated on client side : whe...
Greetings,
After reading the following article I have a question:
https://developer.mozilla.org/en/Introduction_to_Object-Oriented_JavaScript
In the inheritance example, the Person constructor doesn't take any parameters. How would this same example look if I were to add one and call it from the Student constructor?
Thanks!
...
I'm working on a website for work that uses one master layout for the whole site which includes lots (over 40) js files. This website is really slow to render. How much overhead is there for the browser to parse and (for a lack of better technical term) "deal with" all these includes? I know that they are cached, so they are not bein...
Using jquery (javascript) need to display facebook user name in html page using facebook user id. I am not using facebook api. Any one have any idea.
...
so, my URL is example.com/?ref=person
but ref is null after the regex. What am I doing wrong here?
function getReferer(){
var regex = new RegExp(/ref=(.+)/);
var ref = regex.exec(window.location.ref);
alert(ref);
if (ref == null) return "";
else return ref[1];
}
...