Go directly to the various tags in the page
<script type="text/javascript">
<!--
function travelTo(el){
document.getElementById(el).scrollIntoView(true) // true = top of page, false = bottom of page
}
// -->
</script>
<a href="#null" onclick="travelTo('anchor1')">Anchor 1</a>
<div id="anchor1"></div>Anchor 1
Or
<script type="text/javascript">
<!--
function travelTo(el){
here=document.getElementById(el).offsetTop
window.scrollTo(0,here)
}
// -->
</script>
<a href="#null" onclick="travelTo('anchor1')">Anchor 1</a>
<div id="anchor1"></div>Anchor 1
IE=document.all
tag_id=(IE?event.srcElement.id:e.target.parentNode.id) // specific IDs
if(tag_id=="yourid"){
window.event.returnValue=false
}
tag_id=(IE?event.srcElement.tagName:e.target.nodeName) // specific TAGS
if(tag_id=="A"){
window.event.returnValue=false
}
function stop(){ // prevent use of mousewheel
return false;
}
document.onmousewheel=stop;
The webpage you are viewing is trying to close the window.
Do you want to close this window?
Add the following to a function
window.opener = top;
window.close()
document.getElementsByTagName("P").length
Add onContextMenu="return false"to the opening BODY tag.
Shows the location of the document.
<script type="text/javascript">
<!--
document.write(document.location)
//-->
</script>
function test(){
window.location = "page.htm"
}
<a href="#null" onclick="test() ; return false">test</a>
<span id="ID">The Element</span>
<A href="#null" onClick="alert('This is a\n\n'+ event.type+'\n\nEvent')">OnClick event</A>
<A href="#null" ondblClick="alert('This is a\n\n'+ event.type+'\n\nEvent')">Double Click event</A>
<A href="#null" onMouseover="alert('This is a\n\n'+ event.type+'\n\nEvent')">OnMouseOver event</A>
<A href="#null" onMouseout="alert('This is a\n\n'+ event.type+'\n\nEvent')">OnMouseOut event</A>
<A href="#null" onMousedown="alert('This is a\n\n'+ event.type+'\n\nEvent')">OnMouseDown event</A>
<A href="#null" onMouseup="alert('This is a\n\n'+ event.type+'\n\nEvent')">OnMouseUp event</A>
Script wise
<script type="text/javascript">
<!--
function test_mouse_event(e){
alert(e.type)
}
// -->
</script>
You have just done an event type of
Testable events.
onmouseover="test_mouse_event(event)"
onmouseout="test_mouse_event(event)"
onclick="test_mouse_event(event)"
ondblclick="test_mouse_event(event)"
onmousedown="test_mouse_event(event)"
onmouseup="test_mouse_event(event)"
<a href="#null" onclick="test1(1,2,3)">Variable</a> <a href="#null" onclick="test1('a','b','c')">String</a>
function test1(x,y,z){
setTimeout("conclusion("+ x + "," + y + "," + z + ")",1000) // integer only
}
function test2(x,y,z){
setTimeout("conclusion( ' "+ x + " ',' " + y + " ',' " + z + " ' )",1000); // integer & string
}
function test3(x,y,z){
setTimeout(function(){conclusion(x,y,z)}, 1000) // integer & string
}
function conclusion(x,y,z){
alert("F2 = "+x+" "+y+" "+z)
}
You can prevent a document from being cached by adding the following META tag to the document.
Preventing the document from being cached ensures that a fresh copy of the document will always be retrieved from the site, even during the user's current session, regardless of how the user has set the browser's caching options.
Determine position stated in inches into pixels.
Create a dummy marker using a div tag and style attributes.
State the absolute position in inches then use pixelLeft or offsetLeft to convert into pixels.
<div id="dummy" style="position:absolute; left:1in; top:2in"></div>
<A href="javascript:alert('dummy.style.pixelLeft = '+dummy.style.pixelLeft+' pixels\n\ndummy.offsetLeft = '+dummy.offsetLeft+' pixels')">Convert</A>
With SP2 installed the default setting is to block JavaScript from running on the local machine.
Go into Internet Explorer tools menu and select internet options.
Scroll down until you see the Security heading.
Check the "Allow active content to run in files on my computor" checkbox and your code will run.
Example:
Full path = C:\My Documents\My Pictures\Sample.jpg
Short path = Sample.jpg
Apparently if you include unselectable="on" in any HTML tag it renders the contents of that tag .... well ...... unselectable.
The following examples and may vary depending on which browser you are using to view this page.