Neil M

Greenhorn
+ Follow
since Jul 23, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Neil M

remote1 = window.open("","remotewin","width=600,height=135,top=250,left=100");
remote1.focus();

As long as "remote1" exists, then remote1.focus() will work.
You could also try:
<td nowrap></td>
That will make the cell have no automatic line breaks.
Rahul,
Use an image for the submit button also:
<img src="aaa.gif" onClick="document.formName.submit();">
I get "permission denied" when trying to manipulate a window which contains another site. Such as opening a window with http://msn.com in it, and then later on trying to grab it's current url.
Netscape uses the OBJECT tag, where IE uses the EMBED tag. Here's the code we use:
<Script language="JavaScript">
playerName = "audio";
fileName = 'audiofile.wav'; autoStart = 1;
width = 5; height = 5; showControls = 1;
if (!netscape) {
document.write('<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" name="' + playerName + '"\
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"\
width="' + width + '" height="' + height + '" id="vPlayer" type="application/x-oleobject" standby="Loading Media File..." VIEWASTEXT>')
document.write('<param NAME="AutoStart" VALUE="' + autoStart + '">')
document.write('<param NAME="AutoRewind" VALUE="0">')
document.write('<param NAME="DisplayMode" VALUE="false">')
document.write('<param NAME="DisplaySize" VALUE="0">')
document.write('<param NAME="ShowControls" VALUE="' + showControls + '">')
document.write('<param NAME="ShowDisplay" VALUE="0">')
document.write('<param NAME="FileName" VALUE="' + fileName + '">')
}
if (netscape)
document.write('<EMBED TYPE="application/x-mplayer2" PLUGINSPAGE="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&" SRC="' + fileName + '" AutoStart=' + autoStart + ' ShowDisplay=0 ShowControls=' + showControls + ' NAME="' + playerName + '" width="' + width + '" height="' + height + '"></EMBED>')
if (!netscape)
document.write('</object>');
</Script>
You're missing ".href" for your window.location line:
Try
window.location.href
or
location.href
------------------
I just figured it out. It's "backgoundColor" with a capital C:
document.all['distracterText4'].style.backgroundColor = 'blue';
I'm trying to dynamically change a div's background color, but I can't find the right syntax.
Here is my DIV tag:

<div id="distracterText1" onmousedown="drag('distracterText1','text')" style="background-color:lightyellow; position:absolute; left:60px; top:120px; width:364px; height:32px;
z-index:20; visibility:visible">
<span class="content">1 Click here to edit this text.</span>
</div>
And here is the JS line I'm using:
document.all['distracterText4'].style.background-color = 'blue';

What needs to be different?
Thanks,
Neil
Add an onFocus() and onBlur() to your text field:
onFocus="cursorInField(true)" onBlur="cursorInField(false)"
then the function:
function cursorInField(isIt) {
spaceBarCaptureDisabled = isIt;
}
then in your capture key function, check for that variable:
if (!spaceBarCaptureDisabled) {
// run space bar commands here
}