Search:
Type: Posts; User: clueful
Search :
Search took 0.02 seconds.
Any messages in the console?
Use the RegExp constructor.
For me it works the same in Chrome (Win XP) as in Firefox.
Why apply a separate function to each element when one will do?
What if there are dynamically-generated links?
<script type='text/javascript'>
document.onclick = ( function( myFunc )
{
return function( evt )
{
var e = evt || window.event,
srcElem = e.srcElement || e.target;
...
For security reasons, the ability to do that has been blocked.
Something like this perhaps:
function count( str, re )
{
var m = str.match( re );
return m ? m.length : 0;
}
alert( count( myString, /(^|\r*\n)\//g ) );
Time to post a live demo.
It's probably a cacheing problem. I would have expected the jquery module to address this problem or maybe there's a built-in way of so doing. Otherwise you could try changing the URL to:
...
var boolean = (true or false), s = boolean ? 40 : 80;
A 404 suggests it simply can't find the file.
Are you sure the file is named "httpRequest.txt" and not something different like "httprequest.txt"?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>TEST</title>
<style>
#bottom_ad
{
position: absolute;
right: 0;
bottom: 0;
Or just call the function in a script block anywhere below the div.
At the point that the div is referenced, it does not exist. I'm sure you see why.
It seems fine currently at 15 seconds.
This will increment the first integer found in a string:
<script type="text/javascript">
function bumpStringInt( str )
{
var data = str.match(/(\D*)(\d+)(\D*)/), newStr = "";
if( data...
That operator doesn't do what I think you think it does.
Use:
if (result)
Event handlers are all lowercase, so the syntax should be:
buttonarray[count].onclick = runonclick;
The .value property would be better assigned on load, so I would call
runonclick on load...
<a class="thumb" href="img/a.jpg" title="Day 1" onclick="showImg(this); this.className='visitedLink'; return false;">
Where 'visitedLink' is a copy of 'thumb' except with different default...
Have you tried alerting the values that Chrome is applying?
Does your framed document have a doctype?
pop is unsuitable because it can only remove the last element.
var all = [ l1, l2, l3, l4 ];
function loadAll()
{
if( all.length )
{
all[ randomnumber = Math.floor(...
There is a potential weakness there:
var re = new RegExp( '(^|\\s)' + nme+'[^;]+', 'i' );
Focus is being set, but it's the old issue that the focus is taken by the click on the alert's OK button.
You have to set a timeout to keep the focus in the field. Better yet just don't alert on...
This concept was covered in a very recent thread:
http://www.webdeveloper.com/forum/showthread.php?t=247899
Do you get more speed using i&1 instead of i%2 ?