I have a normal search box on my webpage. It is filled with text: Search this website
This text is removed when you click into the box to type your search query:
onfocus="if(this.value=='Search this website') { this.value=''};
But how can I detect when someone drags text from the page onto the search box, as I often do myself? onfocu...
Hello, i want to to validate a string if contains only a-z, 0-9, and the symbols . - _ @ and ;
i have this code:
var regex = new RegExp('[a-z0-9@.;_-]{8,}');
and is not far from what i am looking for but it return true also for:
'[email protected] °%'
I'm working with jquery to load the string by a div, i put a some code more:
var ...
Can anybody help. I have below code and it's working fine but I would like to open info window outside of Google Map.
Example: <a href='javascript:void(0)' onclick='infoopen("1")'>Marker 1</a>
JavaScript code:
var infowindow;
var map;
var mapDrawn = false;
var hotels = [];
var markers = [];
Site.gmapInit = function(centerX, centerY,...
Hi,
I'm using the jQuery plugin GalleryView and current, when the thumbnails in the galllery are rolled over their opacity gradually becomes 100%, and when clicked, the main frame updates to reflect this thumbnail's image.
I'm trying to change it so that the main image is updated when the thumbnails are rolled over instead of having to...
Some time ago I started learning of ExtJS library and now I would like to create following:
There is a browser window and it is separated verticaly.
On the left there is a TreePanel with directories and subdirectories (only 2 level deep).
On the right side there will be an output for content of the selected subdirectory.
I have done th...
I want to select all checkbox when i click the top check,
below is my code:
run.html
<script language="JavaScript" src="media/js/jquery-1.4.2.min.js"></script>
<script language="javascript">
$("#selectAll").change(function() {
$(".xxx:checkbox").attr('checked', this.checked);
});
</script>
Select All: <input type="checkbox" id="sele...
I'd like to manage a timetable using Drupal 6, there are several pieces of equipment on which an administrator distributes people who get to use the equipment.
Essentially I want a table of equipment versus day of the week. The plan shows the occupation of all equipment for the whole week.
What makes it more complicated is that the ed...
I get 'parent.iframePDF is undefined' JavaScript error when i use the below code in Firefox and an 'object expected' error in IE.
Can someone tell me what it is that i'm doing wrong? Thanks
function PrintFrame(xFile){
parent.iframePDF.location.href = xFile;
document.getElementById("spanMess").style.display = "block";
pare...
Hi,
I have a strange problem.
I'm using Protoype to show a "<ul></ul>" markup with Show() method (Toggle() too).
When I click on my button to display my "<ul></ul>", Internet Explorer display it on the screen, but in the source code, the "display:none" is always present O_o
And my flash player doesn't work because of this.
But on ot...
How can I trigger a function when the browser window stops scrolling? Either by mouse wheel, click, space bar or arrow key? Is there any event for such action? I have tried to search online but couldn't get any solution. I'm fine with a jQuery solution.
...
please am having some challenges adding a date picker in my date parameter in eclipse report. and i have little or no knowledge in javascript...pls how do i go about it (step by step)....pls i need your help
...
I often code in PHP and for caching I like to use the md5 of a particular request (ie an sql statement) as the name of my cache key. md5 gives me a pretty string that is unique and thus, the reason why I use it.
Now, I am trying to implement some caching at the browser level using JQuery. It is for an address verifier form. To reduce th...
I have an image slider that slides automatically. Because I'm nice, I want to ensure that it doesn't continue to slide when the user has a different window/tab focussed.
What events fire when leaving a tab/window, and which fire when returning?
...
I have a problem with my form querystring being too long.
I plan on solving this problem by simply disabling all un-used form elements before submit.
But I need help on making this js function...
You need to know that I have a js-function which shows sub-categories whenever a main-category is chosen. This happens "onChange" on a drop-l...
trying to sort the masonry jquery plugin like vgrid plugin
heres the test page http://syndicutsite.syndicut.com/index2.htm
what i want to do is when the filters are clicked is sort the items so they alternate by there height.
in the vgrid plugin they have this code , any ideas how i can add this to masonry
'vgsort: function(func, ea...
I have a website that, upon clicking a link generates a div.
Allow me to explain a little deeper. I have a table of "pages" in my CMS and I've added the ability to add new pages through a little popup div.
My pop-up div is defined below the table, but is style="display:none" so it does not appear on the page. Upon clicking the Add New...
i am trying to use like
var modelLength = document.getElementsByName("FK_BrandID")[0].text;
when i try to alert this it prints only undefined.. is this not proper..?
...
Hi there,
what is the recommended place to put .js files - not really talking about jquery etc.... but my own custom js files..
The scripts directory seems to contain ajax, jquery etc... So is this the correct place?
OR would a better place be COntent?
I also was doing a search and saw some arguments for placing the JS files in the V...
Hi,
I have this code somewhere in my plugin:
$('tr', $this).hover(function(){
var cur_color = null;
cur_color = $this.css('background-color');
$this.css('background-color', options.tr_hover_bgcolor);
}, function(){
$this.css('background-color', cur_color);
});
Above, $this refers to wrapped set or table as an example. The code ...