javascript

sIFR font sizing problems

I'm trying to render a font using sifr to about 160px in size, but it seems to stop expanding anything larger than half of what i require. i've tried setting the font-size in the sifr-config and css. but to no avail it still won't get any larger. Any ideas? My example page is here: http://oonagi.org/sifr/ ...

can I learn and use jQuery with just basic Javascript experience ?

Hello again , I've tried to find an answer here before I submit this Q , but they weren't addressing the problem I have ! I'm wondering if I can code all of my scripts using jQuery, I already have a good background in programming and a good understanding of basic/intermediate javascript ( variables , variable scope , objects ,closures) ....

What does javascript function return in the absence of a return statement?

Hi all, I was just wondering, does a function without a return statement (or without hitting any return statements) return a value that is completely equivalent to false? For example: function foo(){}; !!foo(); This should return false if executed in firebug (but does not return anything if i just called foo();). Thanks a lot! Jas...

How to implement the orange dialog SO used to notify user?

Like "Please login or register to vote" and so on. ...

jQuery accordion, clicking an already opened accordion item just toggles it

I have a semi-working example that you can look at. This appears to work as most would desire, though it shares a bug I am seeing in many other accordions, which is if you click on the an already opened header link, it will be closed, and then opened again. Any elegant solutions? Here is the jQuery <script language="javascript"> ...

Prototype Javascript, working in Mozilla but not in IE

Dear Experts, I am using JavaScript Library from prototype v.1.6.0.3 I found out that the basic notation $ is working fine in Mozilla, but not in IE6. Here is simple example Element.hide('div123'); --> working at IE & Mozilla $('div123').hide(); --> working only at Mozilla I am wondering what i am missing here, as I also have some...

Access event object in event handler

When i try to attach event handler functions with parameters like : myhandle.onclick = myfunction(param1,param2); function myfunction(param1,param2){ } Now I want to access the event object in my handler function. There is an approach mentioned on the web of sending event object, like: myhandle.onclick = myfunction(event,param1,para...

Is it possible to create some property in JavaScript that contain some methods?

Please look at my required JavaScript. var someVariable = new SomeDataType(); // I can directly access value of its property. someVariable.someProperty = "test"; alert(someVariable.someProperty); // <- this command must should "test" // However, I have some methods in above property // I want to validate all rule in this property. so...

How can I represent a formula in a way that is understood by both Javascript and PHP?

I'm writing a shopping cart in PHP, and part of its function is to calculate shipping for a given set of products. For users with Javascript enabled, I want to provide the smoothest experience possible by having an accurate shipping calculation done on the client side so that changes in the cart do not require page reloads or AJAX calls....

How to restrict AJAX API from unwanted use (e.g. someone performing a SELECT *)

I have a restaurant locater web application that mashes up the location of restaurants to a Google Maps. I use JQuery sliders to limit the amount of restaurant to show on the map by having Search filter such as: price, type of food, locale. These JQuery sliders call back via AJAX to an API I created to update the map without the web pa...

Is there a way to force open a new browser window from MOzilla to IE by Onclick function?

Hi all, Iam getting new window pop up by using window.open(), but need When i click button in Mozilla browser, a new pop window should open in Internet Explorer, Is it possible...... ...

Object required

function OnImageClick () { var url; switch (picNumber) { case 0: url = "http://www.zagreb.in/horoskop/rak.html"; break; case 1: url = "http://www.zagreb.in/horoskop/ovan.html"; break; <-- error case 2: url = "http://www.zagreb.in/horoskop/djevica.html"; break; case 3: url = "http://www.zagreb.in/horoskop/...

Which GWT book to buy? Most seem to be for versions 1.4

I was thinking about getting GWT in Practice by Robert Cooper, or Google Web Toolkit Applications by Ryan Dewsbury However those are from May 08 and Dec 07. Both would be written for 1.4 - I was looking through the release notes to see what's changed since then: Nothing seems to have changed from 1.6 to 1.7 http://code.google.com/webto...

Firefox extension to find out which Javascript event is bound to an inspected element?

One can bind Javascript events to html elements without using inline declarations. Is there a way when inspecting an html element to know which events are bound to the element? I want to know about the events defined by the developer and not the internal ones that come with the browser. So if I hover over an element and a menu shows up...

closing browser after failing to login 3 times

after failing to login 3 times (wrong password, username), i want the browser/window/tab to be closed. how can i do this in javascript or php? and also can you give me some suggestions on what i can do to my system when user fails to login 3 times. thanks. ...

using jQuery (put at the bottom of the page) on specific page

Because of performance purposes I put loading of jQuery scripts at the bottom of the page (just before the closing body tag). My question is how to enable page specific scripts? I don't want to put everything inside $(document).ready method (again because of performance purposes). Update: I'm using a template system so I put jQuery loa...

How to add event 'TabOpen' to all windows in a Firefox extension?

I'm writing a Firefox extension. I'd like to have my code executed whenever a new tab opens. I've tried this: for (var i=0; i<Application.windows.length; i++) { var w = Application.windows[i]; w.events.addListener("TabOpen", function(event){ alert( 'tab #'+w.activeTab.index +' opened'); }); } It doesn't work right if window...

How to include dojox.gfx.SVG and dojox.gfx.VML in a custom Dojo build with cross-browser support?

Hello everyone. I am using dojo.gfx to create vector shapes and text on my website and everything works fine when I am "dojo.require"-ing all dependencies in my Javascript. But when I'm building everything I need in a custom build (especially dojox.gfx, dojox.gfx.svg and dojox.gfx.vml), Dojo's automatic differentiation for SVG-supportin...

calling nyro modal pop up using javascript

hello friends i m new to jQuery and nyro modal. right now i m using nyro modal pop up in this way: <a href='#add_sub_user' class="nyroModal" > <input type="button" name="a1" value="Add" class="buttons" /> </a> Now i want to call the same pop up using javascript like "to show hidden div we use $("#sent_already").show(); Can any bo...

imageflow animation looks bad on IE with opacity=false

Hi, I've been trying to install imageFlow in a site. It works fine except in IE (8 in mycase). The problem is that the animation isn't smooth. I've looked at their demo in IE8 and it works great. I can't for the life of me understand why my example isn't working and theirs does. I"ve tried changing the options of imageFlow based on the e...