javascript

disabling modal popup in jqgrid

I want to create a custom message without using the modal popup in jqgrid. Is there a way to disable it? Or is there a way to change the contents of the modal? ...

ASP.NET MVC markup in VS2008 script has warnings with "expected expression"

I've searched SO and have been unable to find this question asked before, but I can't believe I'm the only one running into it. If this is a duplicate, please point me to the original question. In VS2008, I have some ASP.NET MVC markup in a script section on some of my pages. I end up getting "expected expression" warning squiggles on...

javascript calling function

var macs = { getMacAddress : function() { document.macaddressapplet.setSep( "-" ); document.write( "Mac Address = " + document.macaddressapplet.getMacAddress() ); } how do i call this function and display out in the website? this doesn't seems working.. <script type="text/javascript"> document.write(ma...

Conflicts in Motools & Jquery In Joomla . Please HELP!

HI All, I read all the related post but i think i am missing something. My page structure is - 1.load Motools library in Joomla. code is JHTML::_('behavior.tooltip'); JHTML::_('behavior.mootools'); JHTML::_('behavior.formvalidation'); 2 Then load the Jquery library code is <script language="javascript" src="<?=$this->ba...

Date.toLocaleString() broken in Chrome?

Date.toLocaleString() returns this in Chrome: Mon Jan 18 2010 16:47:42 GMT+1100 (AUS Eastern Daylight Time) In firefox, it's this: Monday, 18 January 2010 4:47:42 PM Browser version doesn't seem to matter. Anyone have a suggestion on this one? ...

Resizable Gridview columns using javascript

I want to Resize Gridview columns using javascript. Below is an example. ...

when assigning location.href, please explain url encoding (in asp.net and firefox)

In some javascript, I have: var url = "find.aspx?" + "location=" + encodeURIComponent( address ); alert( url ); location.href = url; where the value of address is the string "Seattle, WA". In the alert I see find.aspx?Seattle%2C%20WA as I expect. But on the server side, when I look at Request.Url, the relevant substring I see is ...

how to get out of the fancybox iframe ?

i have to do some form submission and then get out of the fancybox which holds an iframe.. how to do that ? i tried using $.fn.fancybox.close(); but it cause some error.. thanks in adance... ...

Change color of an anchor when clicked

i want that when i click this link its color changes to the given color <li id="press"><a href="<?=base_url()?>index.php/page/press">Press</a></li> ...

I want to validate max quanity is greater then min qty in validation js.

Hi, I want to validate whether one element is greater then second one using validation plugin of jquery. There is no direct method available for doing this. There is one method called equalTo: but it's not doing stuff. ...

Validates as a phone number

I am trying to validate a string as a phone number (digits and certain special characters). I used a existing code snippet from here: http://snippets.dzone.com/posts/show/597 which seems to be correct. But everytime string.match(format) returns null, which causes to show the error message. var format = /^(\+\d)*\s*(\(\d{3}\)\s*)*\d{3}(-...

Windows.event is undefined -Javascript error in firefox

I'm using javascript to change some settings of asp button on mouseover. It is working in IE. But not working in Firefox. Is there any other javascript code that will support almost all browsers? My code is as follows <script type="text/javascript"> var previousColor; function Changecolor() { previousColor = ...

Does anybody use Clamato?

I'm interested if anyone uses clamato in a production environment? ...

Jquery UI slider, setting values bug

i have 3 div's <div id="slider-range1" class="slider-range"></div> <div id="slider-range2" class="slider-range"></div> <div id="slider-range3" class="slider-range"></div> i have added the slider to these div's using class reference $(function() { $(".slider-range").slider({ range: true, min: 0, ...

Fastest method to replace all instances of a character in a string = Javascript

Hi there What is the fastest way to replace all instances of a string/character in a string in Javascript? A while, a for-loop, a regular expression? Thanks in advance. ...

What would you expect of a mobile development framework?

Hi, we are planning to build a web based client side application framework. The main focus is to write native looking webapps using Java and compile them for your target platform. Our planned target platforms would be the iPhone and Android (on top of PhoneGap), Backberry and Palm WebOS. Our goal is to create a decent framework and tha...

How to assig a PHP variable a value inside a JavaScript block?

if ($page_title->exists()) { //the rest of the code is in php.here i insert a javascript for the confirm box. echo'<script type= "text/javascript" > var b=confirm("This page already exists.would you want to edit"); if(b == true) //here i want to assign a php variable , say for eg. $a to 1 so that i can use that value of $a...

Javascript in Virtual Directory unaware of Virtual Directory

Say I have the site http://localhost/virtual where virtual is the virtual directory I have an Ajax request that is defined in a javascript file using JQuery $.getJSON("/Controller/Action") When this is called, the client tries to find the url at the root level i.e. http://localhost/Controller/Action If I add the tilde (~) ...

how to make information displayed only in child window??

i hav written code for opening the child window(toolbar is disabled here) thro parent window by( using body onload function) calling the same(login.jsp) page again. wen the parent window (i.e login.jsp) opens for the first time in the browser(by typing the url) it displays all the information and then goes to child window where i have d...

Is there a out of the box Javascript "Tweet this" link solution around, which does not eagerly load files from other domains while loading the page, but still features URL shortening?

Requests to third party servers keep slowing my site down, so I am trying to have as few as possible. In my book, the ideal "tweet this" solution should be a small javascript snippet to be hosted on my own site not have any activity while loading the page (at least as few as possible, but no additional HTTP requests) just when clicked...