Code: Selecteer alles
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
</head>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<script language="javascript" type="text/javascript">
function checkFieldType(type){
if(type == "submit" || type == "reset" || type == "hidden"){
return false
}
else {
return true
}
}
function fIt(){
/* ******************************************************************************************
** BLOCK FOCUS INSTRUCTIONS
** The following array named "noFocusPages" was constructed to block the focus script on certain pages.
** The array contains a default list of blocked pages using subsilver template which do not play nice with this script.
** You may add to or from the default list, just be sure the element indexes (numbers between the "[]")
** are in chronological order after making changes. If you don't want any pages blocked, just comment out
** the elements (by placing 2 slashes "//" in front of each element statement).
****************************************************************************************** */
var noFocusPages = new Array()
noFocusPages[0] = "index.php"
noFocusPages[1] = "viewforum.php"
noFocusPages[2] = "viewtopic.php"
noFocusPages[3] = "profile.php?mode=viewprofile"
noFocusPages[4] = "search.php?search_author"
noFocusPages[5] = "faq.php"
//noFocusPages[6] = "SampleCommentedOutElement.php" this is how to comment out an element
var locVar = location.href
if(locVar.indexOf(".php") == -1){//check to see if url ends with dir+slash (no file name)
locVar += "index.php"
}
var formExists = (document.forms[0]) ? document.forms[0] : null
if(formExists){ //first check to see if there is a form on this page
var x = 0
for(var i=0; i<noFocusPages.length; i++){ // begin looping through noFocusPages array
if(locVar.indexOf(noFocusPages[i]) > -1){ // is this a 'no-focus' page?
x+=1
break
}
} //end noFocus for
if(x == 0){ //this page is NOT a no-focus page, so focus if there is appropriate field
for(var e=0; e<formExists.elements.length; e++){
if(checkFieldType(formExists.elements[e].type)){
formExists.elements[e].focus()
break
}
}// end elements for
}//end if
} //end formExists if
}
</script>
#
#-----[ FIND ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}">
#
#-----[ REPLACE WITH ]------------------------------------------
#
<body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" onload="fIt()">
Op die pagina's komt de cursor niet in het onderwerp veld, maar in het bericht veld. Komt dit door de tabindex die in sommige velden wordt opgegeven.
Ik heb al van alles geprobeerd, zelfs alle tabindexen veranderd, maar helaas, de cursor blijft in het berichtveld staan