Help - Search - Member List - Calendar
Full Version: Do all javascript blocked by service pack 2?
WorkTheWeb Forums > Webmaster Resources > JavaScript Help
Support our Sponsors!
jonathan
I installed service pack 2. Sometimes I saw a link that link to:
<a href="javascript:popChatWin(0)">

Sometimes I use javascript to redirect website. Service pack 2 block
that.

Sometimes the javascript is not blocked. Sometimes it is. When is it
blocked and when not? Does javascript always blocked under service
pack 2?

Perttu Pulkkinen
I use hit two function to stop [ENTER] from sending the form. First one I
use to move focus to the next desired field, second one to do nothing (when
there is no desired field to go).

Works in IE & Opera. How can I make these Netscape/Firefox-compatible (while
still keep them working in IE/Opera)?

function moveto(goal)
{
if(window.event && window.event.keyCode == 13)
document.getElementById(goal).focus();
return !(window.event && window.event.keyCode == 13);
}

function noenter()
{
return !(window.event && window.event.keyCode == 13);
}

--
Perttu Pulkkinen
www.risteys.net
www.onnenliinat.com
www.palvelukaupunki.fi

Deryck
Hello,

I have been modifying some javascript shopping basket code and have run into
a problem. I have produced a subset of the HTML/JS that shows the problem
and placed it here:

http://dusrc.org/js_test.html

The problem is described on that page but basically 2 event handlers are
being called when I would expect just one to be called.

If someone could explain what I am doing wrong then I would be very
grateful.

Thanks

Deryck

Deryck
Hello,

I have been modifying some javascript shopping basket code and have run into
a problem. I have produced a subset of the HTML/JS that shows the problem
and placed it here:

http://dusrc.org/js_test.html

The problem is described on that page but basically 2 event handlers are
being called when I would expect just one to be called.

If someone could explain what I am doing wrong then I would be very
grateful.

Thanks

Deryck

McK, I really appreciate your help thus far, and I am learning (albeit
a bit slower than I would like) from your examples and suggestions.

I have a few more questions.

1. Going back to the rotate10 script (see below) you wrote, how would I
modify it to create a table with 1 column and 10 rows (instead of 2
columns with 5 rows). I would still want the cell contents to rotate
randomly.

2. I created a folder on the topsearchspot site called newpage folder,
and in that folder is a page called newpage.htm. On both versions of
the rotate10 script (1 and 2 columns) how would I add a RELATIVE link
so that the image is linked to /newpage folder/newpage.htm instead of
www.topsearchspot/newpage folder/newpage.htm?

Here is the script:

<html>
<head>
<title>rotate10.html</title>
<script type="text/javascript">
function numbers() {
var url = "http://www.topsearchspot.com/";
var gif = new Array(10);
gif[0] = "0.gif|Zero";
gif[1] = "1.gif|One";
gif[2] = "2.gif|Two";
gif[3] = "3.gif|Three";
gif[4] = "4.gif|Four";
gif[5] = "5.gif|Five";
gif[6] = "6.gif|Six";
gif[7] = "7.gif|Seven";
gif[8] = "8.gif|Eight";
gif[9] = "9.gif|Nine";
for (var i=0; i<gif.length; i++) {
gif[i] = url + gif[i];
}
var hig = 62;
var wid = 62;
var wyd = wid*2;
var ten = "";
var mod = ten.length;
var now = new Date();
var pos = now.getSeconds()%mod;
var num = ten.substr(pos);
if (pos > 0) num += ten.substring(0,pos);
var col = new Array();
var src;
var sub;
var tmp;
for (var j=0; j<num.length; j++) {
sub = num.charAt(j);
tmp = gif[sub].split("|");
src = "<a href='" + tmp[0] + "' target='_blank'>"
src += "<img src='" + tmp[0] + "'";
src += "border='0' width='" + wid + "' height='" + hig + "'
alt=''></a>";
src += "<br>" + tmp[1];
col[j] = src;
}
var k = 0;
var tab = new Array();
tab[k++] = "<table border='0' cellpadding='0' cellspacing='0'
width='" + wyd + "'>";
var mid = num.length/2;
for (var l=0; l<mid; l++) {
tab[k++] = "<tr height='" + 62 + "' valign='top'>";
tab[k++] = " <th width='" + 62 + "'>" + col[l] + "</th>";
tab[k++] = " <th width='" + 62 + "'>" + col[l+mid] + "</th>";
tab[k++] = "</tr>";
}
tab[k++] = "</table>";
document.write(tab.join(""));
}
numbers();
</script>
</head>
<body>
</body>
</html>

Thanks!


PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.