javascript

Anti-Frame Busting code ?

Possible Duplicate: My frame is redirecting page !! How to stop it ? Is there any code like that ? Please help..Thanks ...

Is there ANY possible way to disable HOVER in swMenu for Joomla?

I'm talking either a setting in the component or a CSS/JS hack. I've tried both but have failed. Why is this not a standard feature? Ideally i'd just want the background color to be disabled on hover, and the font color change to remain, but even disabling ANY kind of hover is proving to be a big mystery! Does anybody know how to do th...

Looking for lightweight modal popup JS library that runs stand alone

I need a pointer to a library to show modal dialog popup with HTML content. The library should be able to work in random websites without relaying on a library like jquery etc.. My requirements: 1. beautiful design (shadow is a plus for example). 2. compatibility with arbitrary doctypes 3. lightweight and quick to load. thanks ...

Regex to match '-' delimited alphanumeric words

I would like to test if user type only alphanumeric value or one "-". hello-world -> Match hello-first-world -> match this-is-my-super-world -> match hello--world -> NO MATCH hello-world-------this-is -> NO MATCH -hello-world -> NO MATCH (leading dash) hello-world- ...

Why javascript's typeof always return "object"?

What's it used for if it always returns "object" as type? --update always for Elements or lists. ...

jQuery ui autocomplete - renderItem url's

Hi, Using: .data( "autocomplete" )._renderItem = function( ul, item ) { var temp = item.url.substring(16, item.url.length) return $( "<li></li>" ) .data( "item.autocomplete", item ) .append( "<a>" + item.value + "<br>" + item.url + "<br>" + item.description + "<br>" + "Sup...

Where is the problem in this prototype [ajax.Request] code ?

function sendM() { new Ajax.Request("sendm.html", { method: 'post', postBody: 'text='+ $F('text') +'&sub='+ $F('subject') +'&sname='+ $F('name') +'&sfmail='+ $F('email') +'to='+ $F('to'), onLoading:showLoad, onComplete: showResponse }); } function showLoad(){ $('dresult').innerHTML= "מבצע את הפעולה &nbsp;&nbsp;<br /><br />";...

What do you mean by http://server-which-responds-with-204.com ?

I was reading this article : http://stackoverflow.com/questions/958997/frame-buster-buster-buster-code-needed I was wondering what it was ... ...

Looking for better/elegant solution to this Jquery code

To continue along my elegant solution series I am trying to figure out how to do this in a better way. I am cycling through all the a tags and trying to modify the href. This code works but seems sloppy and would love to know how to do this more efficiently. $('a').each(function(){ x=$(this).attr('href').replace(/mls\_number/i,'in...

encoding/decoding translated sentence

I've the following script in my HTML: jQuery.sundayMorning(text, { destination: 'en' }, function(response) { var uri = response.translation; var text = decodeURIComponent(uri); jQuery(".showText").val(text); }); Example input in Spanish: la casa de leo el combatiente. This translates into English as: leo&#39;s house fight...

jQuery querystring

Possible Duplicate: get querystring with jQuery How do I get the value of a querystring into a textbox using jQuery? Lets say the url is http://intranet/page1.php?q=hello I would like the "hello" to be in the textbox. ...

jquery, how to check if a specific ID is a child of an other id?

Hello, I have a specific id ("mysubid"), now I want to check if this element (this id) is in a child path of an other id ("mymainid"). Is there an easy way to do this or will I go upwards, element by element, to see if the element is in a child path. By child path I am talking about something like this: A > B > C > D So D is in the...

Stopping .click() listener until fadeIn() is finished in jQuery

$('#div1_button').click(function() { $('#div0').fadeOut(function(){ $('#div1').fadeIn(); }); }); When a user clicks div1_button the previously selected div0 fades out and div1 fades in. If the user goes click crazy and clicks div2 before div1 is finished fading in then div2 begins to fade in and eventual...

Ajax post doesn't work with html in parameters in combination with .net 4 framework

After upgrading our project to the .net 4.0 framework (from 3.5), we facing some problems with ajax calls with html in the parameters. As soon as the user enters some html in a text area the ajax call isn't executed anymore. If the user enters plain text only, there is no problem. <script language="javascript"> /* Doesn't work */ var...

ASP.NET MVC without javascript

We're developing a site initially without javascript for maximum support with the intention of layering js functionality over the top. The problem we have is where a single page has 2 or more pieces of functionality (as an example a screen to capture personal details that includes a postcode lookup for address). With no ability to cha...

'Movie not loaded.." IE6 using swfobject2.2

Hi, I'm getting and error that only occurs with IE6 using swfobject to dynamically embed flash on a page. the link to the test page is: http://maxtest.7thsensedesign.com/ I could post some code if that helps. ...

Simplifying regex OR patterns

I was asked today if there was a library to take a list of strings and to compute the most efficient regex to match only those strings. I think it's an NP Complete problem by itself, but I think we can refine the scope a bit. How would I generate and simplify a regex to match a subset of hosts from a larger set of all hosts on my networ...

Are there any vulnerabilities of this site ?

Guys, I made a site recently called www.Searchr.us I was wondering is there are any vulnerabilities.And how can i prevent hackers from hacking it ? Please scan the website properly. Thanking You, ...

How can I hide the navigation bar with Jquery?

Hey guys, I am trying to hide the navigation under the footer using Jquery. I mean, I want to show the navigation until it reaches footer stage. Then, I want to hide it. How can I do it? or Should I use z-index in state of jquery? Code and example: http://jsfiddle.net/yn8r4/1/ I would appreciate any kind of help. Thanks! NOTE ...

Javascript: passing constructor arguments down the prototype chain. Is there a way?

In the following example, is there a way to construct the object such that “b” has a property a1, initialised to “2”? function A(a1) { this.a1 = a1; } function B(b1, a1) { this.b1 = b1; } B.prototype = new A; var b = new B('1', '2'); I am basically trying to duplicate what would be known as “calling the base constructor” in...