hoi tweakers ben nieuw hier
mijn volgende probleem is dat ik een eerst werkende zoekfunctie had ,maar opeens niet meer werkt in IE7 , maar nog wel op FF3 .
ik heb namelijk een webserver die mp3,s streamt dus de zoekfunctie zit dan ook in het programma zelf
het gaat namelijk om deze script : performsearch.vibe geintregeert dus!
<script src="jscript/directory.js"></script>
<script src="jscript/functions.js"></script>
<script src="jscript/searchindex.js"></script>
<script>
var objLeftFrame = parent.parent.frames[1];
var objRootContainer = objLeftFrame.document.getElementById('rootContainer');
var objRightFrame = parent.parent.frames[2];
var objContentDiv = objRightFrame.document.getElementById('contentDiv');
var objNewItem;
var searchTerm = "<? print(str_jsafe(request_querystring("q"))); ?>";
var exp = new RegExp(searchTerm, "i");
objContentDiv.innerHTML = '';
for(var i=0; i<searchIndex.length; i++)
{
if (searchIndex[i].Name.match(exp) != null)
{
var type = "other";
var mimetype = searchIndex[i].Mime;
if (mimetype=="audio/mpeg")
{type = "audio";}
else if (mimetype=="image/jpg" || mimetype=="image/jpeg" || mimetype=="image/gif")
{type = "image";}
else if (mimetype=="text/plain")
{type = "text";}
objNewItem = create_item(objRightFrame,searchIndex[i].VirtualName,searchIndex[i].VirtualName,searchIndex[i].Name,
ITEMTYPE_FILE,0,mimetype,'item_dotted','','','itemchild2_file_' + type,'itemchild3_normal');
objContentDiv.appendChild(objNewItem);
}
}
if (objContentDiv.innerHTML == '')
{
objNewItem = objRightFrame.document.createElement('<span>');
objNewItem.innerHTML = 'No results found for ' + searchTerm;
objNewItem.className = 'itemchild3_normal';
objContentDiv.appendChild(objNewItem);
}
objLeftFrame.g_objExpandingItem = null;
</script>
------------------------------------------------------------------------------
het zorgt ervoor dat ik de resultaten zie op de bestemde html bestand ,alleen in in ff3 werkt het nog , en spuwt de resultaten op de betrefende html,maar in IE7 krijg ik gewoon een blank scherm terwijl hij toch wel bezig is om de resultaten op te halen!
het vreemde is dat dit script altijd gewerkt heeft,en nog in ff3
en dit is de html script waar de resultaten in moeten verschijnen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>
<!--
BODY{
CURSOR: url(cd.ani);
}
-->
</style>
<link href="style/global.css" rel="stylesheet" type="text/css">
<link href="style/directory.css" rel="stylesheet" type="text/css">
<script src="jscript/functions.js"></script>
<script src="jscript/directory.js"></script>
<script language="JavaScript" src="mainmenu.js"></script>
<script>
var g_browser = detect_browser();
var g_objActiveItem = null;
/////////////////////////////////////////////////////////
function init()
{
on_resize();
}
/////////////////////////////////////////////////////////
function on_resize()
{
var newWidth = 0;
var newHeight = 0;
// set size of playlist content
if ( g_browser=='msie' )
{
newHeight = document.body.offsetHeight-23;
}
else if ( g_browser=='firefox' )
{
newWidth = self.innerWidth-13;
newHeight = self.innerHeight-36;
}
else
{
newWidth = self.innerWidth;
newHeight = self.innerHeight-22;
}
// make sure new size is valid
if ( newWidth<1 ) { newWidth = 1; }
if ( newHeight<1 ) { newHeight = 1; }
// set new width and height
if ( g_browser!='msie' ) { document.getElementById('contentDiv').style.width = newWidth; }
document.getElementById('contentDiv').style.height = newHeight;
}
/////////////////////////////////////////////////////////
function on_item_click(e)
{
var objElement = null;
var objItem = null;
// get element that caused the click event
var objElement = e.srcElement || e.target || e.currentTarget;
if ( objElement==null ) {
return;
}
// get item from clicked element
objItem = get_item_from_clicked_element(objElement);
if ( objItem==null ) {
return;
}
if ( objElement.className=='itemchild0_addfolder' )
{
// check if user has browse access only
var objPlaylistFrame = parent.frames[0];
if ( objPlaylistFrame )
{
if ( objPlaylistFrame.g_bHasBrowseAccessOnly ) {
alert('Your access is restricted to browsing only. You are not allowed to stream any files.');
return;
}
}
// add folder to playlist
parent.frames[0].add_folder(objItem.id);
}
else
{
// activate item
activate_item(objItem);
}
}
/////////////////////////////////////////////////////////
function on_item_dblclick(e)
{
var objElement = null;
var objItem = null;
// get element that caused the click event
var objElement = e.srcElement || e.target || e.currentTarget;
if ( objElement==null ) {
return;
}
// make sure it wasn't the "add folder" icon that was double clicked
if ( objElement.className=='imgAddFolder' ) {
return;
}
// get item from clicked element
objItem = get_item_from_clicked_element(objElement);
if ( objItem==null ) {
return;
}
// check if item is a folder
if ( objItem.getAttribute('itemtype')==ITEMTYPE_FOLDER )
{
// find 'frameFolders'
var objFoldersFrame = parent.frames[1];
if ( objFoldersFrame ) {
objFoldersFrame.open_folder_by_id(objItem.id);
}
}
else
{
// check if user has browse access only
var objPlaylistFrame = parent.frames[0];
if ( objPlaylistFrame )
{
if ( objPlaylistFrame.g_bHasBrowseAccessOnly ) {
alert('Your access is restricted to browsing only. You are not allowed to stream any files.');
return;
}
}
// check if item should be added to the playlist or handled in another way
if ( objItem.getAttribute('mimetype')=='audio/mpeg' ) {
parent.frames[0].add_track(objItem.id);
}
else
{
window.open('virtual/' + url_encode(objItem.id),'VibeStreamer','toolbar=no,location=no,directories=no,status=no,menubar=no');
}
}
}
/////////////////////////////////////////////////////////
function activate_item(objItem)
{
// make sure this item isn't already active
if ( g_objActiveItem==objItem ) {
return;
}
// highlight item
highlight_item(objItem,g_objActiveItem);
// set item to new active item
g_objActiveItem = objItem;
}
/////////////////////////////////////////////////////////
</script>
<style>
#contentDiv
{
padding:7px;
position:relative;
overflow:auto;
width:100%;
height:100%;
}
#headBottom1
{
width:100%;
height:1px;
background-color:#87947f;
}
#headBottom2
{
width:100%;
height:3px;
background-color:#c4d1bc;
}
#headBottom3
{
width:100%;
height:1px;
background-color:#3f3f3f;
}
</style>
<title>l</title>
</head>
<body style="background-color:#000000; scrollbar-base-color: #ccff00;scrollbar-arrow-color: #ccff00;scrollbar-face-color: #000000;scrollbar-highlight-color: #00ff00;scrollbar-track-color:#ccff00;" onload="init();" onresize="on_resize();" leftmargin=0 topmargin=0 unselectable="on">
<body style="background-color: rgb(0, 0, 0);" onload="init();" onresize="on_resize();" leftmargin="0" topmargin="0" unselectable="on">
<div class="head" unselectable="on" valign="middle">
<div class="headTabNormal"></div>
</div>
<div id="headBottom1" unselectable="on"><img src="images/dot.gif"></div>
<div style="background-color: rgb(30, 0, 90); height: 2px;" id="headBottom2" unselectable="on"><img src="images/dot.gif"></div>
<div id="headBottom3" unselectable="on"><img src="images/dot.gif"></div>
<div id="contentDiv" unselectable="on">
</div>
<script language="JavaScript">
<!--
function click() {
if (event.button==2)
window.external.AddFavorite('http://b-22.ontvangt.nl','radio B-22');
}
document.onmousedown=click
// -->
</script>
</body>
</html>
--------------------------------------------------------------------------------------
sorry voor de scripts die ik hier plaats maar ik dacht dat ik het wel zo duidelijk hier opstel,ben er al weken mee bezig maar ik kan de fout niet vinden ik dacht aan een iframe probleem maar ben niet zeker
bedankt alvast voor de response!
mijn volgende probleem is dat ik een eerst werkende zoekfunctie had ,maar opeens niet meer werkt in IE7 , maar nog wel op FF3 .
ik heb namelijk een webserver die mp3,s streamt dus de zoekfunctie zit dan ook in het programma zelf
het gaat namelijk om deze script : performsearch.vibe geintregeert dus!
<script src="jscript/directory.js"></script>
<script src="jscript/functions.js"></script>
<script src="jscript/searchindex.js"></script>
<script>
var objLeftFrame = parent.parent.frames[1];
var objRootContainer = objLeftFrame.document.getElementById('rootContainer');
var objRightFrame = parent.parent.frames[2];
var objContentDiv = objRightFrame.document.getElementById('contentDiv');
var objNewItem;
var searchTerm = "<? print(str_jsafe(request_querystring("q"))); ?>";
var exp = new RegExp(searchTerm, "i");
objContentDiv.innerHTML = '';
for(var i=0; i<searchIndex.length; i++)
{
if (searchIndex[i].Name.match(exp) != null)
{
var type = "other";
var mimetype = searchIndex[i].Mime;
if (mimetype=="audio/mpeg")
{type = "audio";}
else if (mimetype=="image/jpg" || mimetype=="image/jpeg" || mimetype=="image/gif")
{type = "image";}
else if (mimetype=="text/plain")
{type = "text";}
objNewItem = create_item(objRightFrame,searchIndex[i].VirtualName,searchIndex[i].VirtualName,searchIndex[i].Name,
ITEMTYPE_FILE,0,mimetype,'item_dotted','','','itemchild2_file_' + type,'itemchild3_normal');
objContentDiv.appendChild(objNewItem);
}
}
if (objContentDiv.innerHTML == '')
{
objNewItem = objRightFrame.document.createElement('<span>');
objNewItem.innerHTML = 'No results found for ' + searchTerm;
objNewItem.className = 'itemchild3_normal';
objContentDiv.appendChild(objNewItem);
}
objLeftFrame.g_objExpandingItem = null;
</script>
------------------------------------------------------------------------------
het zorgt ervoor dat ik de resultaten zie op de bestemde html bestand ,alleen in in ff3 werkt het nog , en spuwt de resultaten op de betrefende html,maar in IE7 krijg ik gewoon een blank scherm terwijl hij toch wel bezig is om de resultaten op te halen!
het vreemde is dat dit script altijd gewerkt heeft,en nog in ff3
en dit is de html script waar de resultaten in moeten verschijnen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style>
<!--
BODY{
CURSOR: url(cd.ani);
}
-->
</style>
<link href="style/global.css" rel="stylesheet" type="text/css">
<link href="style/directory.css" rel="stylesheet" type="text/css">
<script src="jscript/functions.js"></script>
<script src="jscript/directory.js"></script>
<script language="JavaScript" src="mainmenu.js"></script>
<script>
var g_browser = detect_browser();
var g_objActiveItem = null;
/////////////////////////////////////////////////////////
function init()
{
on_resize();
}
/////////////////////////////////////////////////////////
function on_resize()
{
var newWidth = 0;
var newHeight = 0;
// set size of playlist content
if ( g_browser=='msie' )
{
newHeight = document.body.offsetHeight-23;
}
else if ( g_browser=='firefox' )
{
newWidth = self.innerWidth-13;
newHeight = self.innerHeight-36;
}
else
{
newWidth = self.innerWidth;
newHeight = self.innerHeight-22;
}
// make sure new size is valid
if ( newWidth<1 ) { newWidth = 1; }
if ( newHeight<1 ) { newHeight = 1; }
// set new width and height
if ( g_browser!='msie' ) { document.getElementById('contentDiv').style.width = newWidth; }
document.getElementById('contentDiv').style.height = newHeight;
}
/////////////////////////////////////////////////////////
function on_item_click(e)
{
var objElement = null;
var objItem = null;
// get element that caused the click event
var objElement = e.srcElement || e.target || e.currentTarget;
if ( objElement==null ) {
return;
}
// get item from clicked element
objItem = get_item_from_clicked_element(objElement);
if ( objItem==null ) {
return;
}
if ( objElement.className=='itemchild0_addfolder' )
{
// check if user has browse access only
var objPlaylistFrame = parent.frames[0];
if ( objPlaylistFrame )
{
if ( objPlaylistFrame.g_bHasBrowseAccessOnly ) {
alert('Your access is restricted to browsing only. You are not allowed to stream any files.');
return;
}
}
// add folder to playlist
parent.frames[0].add_folder(objItem.id);
}
else
{
// activate item
activate_item(objItem);
}
}
/////////////////////////////////////////////////////////
function on_item_dblclick(e)
{
var objElement = null;
var objItem = null;
// get element that caused the click event
var objElement = e.srcElement || e.target || e.currentTarget;
if ( objElement==null ) {
return;
}
// make sure it wasn't the "add folder" icon that was double clicked
if ( objElement.className=='imgAddFolder' ) {
return;
}
// get item from clicked element
objItem = get_item_from_clicked_element(objElement);
if ( objItem==null ) {
return;
}
// check if item is a folder
if ( objItem.getAttribute('itemtype')==ITEMTYPE_FOLDER )
{
// find 'frameFolders'
var objFoldersFrame = parent.frames[1];
if ( objFoldersFrame ) {
objFoldersFrame.open_folder_by_id(objItem.id);
}
}
else
{
// check if user has browse access only
var objPlaylistFrame = parent.frames[0];
if ( objPlaylistFrame )
{
if ( objPlaylistFrame.g_bHasBrowseAccessOnly ) {
alert('Your access is restricted to browsing only. You are not allowed to stream any files.');
return;
}
}
// check if item should be added to the playlist or handled in another way
if ( objItem.getAttribute('mimetype')=='audio/mpeg' ) {
parent.frames[0].add_track(objItem.id);
}
else
{
window.open('virtual/' + url_encode(objItem.id),'VibeStreamer','toolbar=no,location=no,directories=no,status=no,menubar=no');
}
}
}
/////////////////////////////////////////////////////////
function activate_item(objItem)
{
// make sure this item isn't already active
if ( g_objActiveItem==objItem ) {
return;
}
// highlight item
highlight_item(objItem,g_objActiveItem);
// set item to new active item
g_objActiveItem = objItem;
}
/////////////////////////////////////////////////////////
</script>
<style>
#contentDiv
{
padding:7px;
position:relative;
overflow:auto;
width:100%;
height:100%;
}
#headBottom1
{
width:100%;
height:1px;
background-color:#87947f;
}
#headBottom2
{
width:100%;
height:3px;
background-color:#c4d1bc;
}
#headBottom3
{
width:100%;
height:1px;
background-color:#3f3f3f;
}
</style>
<title>l</title>
</head>
<body style="background-color:#000000; scrollbar-base-color: #ccff00;scrollbar-arrow-color: #ccff00;scrollbar-face-color: #000000;scrollbar-highlight-color: #00ff00;scrollbar-track-color:#ccff00;" onload="init();" onresize="on_resize();" leftmargin=0 topmargin=0 unselectable="on">
<body style="background-color: rgb(0, 0, 0);" onload="init();" onresize="on_resize();" leftmargin="0" topmargin="0" unselectable="on">
<div class="head" unselectable="on" valign="middle">
<div class="headTabNormal"></div>
</div>
<div id="headBottom1" unselectable="on"><img src="images/dot.gif"></div>
<div style="background-color: rgb(30, 0, 90); height: 2px;" id="headBottom2" unselectable="on"><img src="images/dot.gif"></div>
<div id="headBottom3" unselectable="on"><img src="images/dot.gif"></div>
<div id="contentDiv" unselectable="on">
</div>
<script language="JavaScript">
<!--
function click() {
if (event.button==2)
window.external.AddFavorite('http://b-22.ontvangt.nl','radio B-22');
}
document.onmousedown=click
// -->
</script>
</body>
</html>
--------------------------------------------------------------------------------------
sorry voor de scripts die ik hier plaats maar ik dacht dat ik het wel zo duidelijk hier opstel,ben er al weken mee bezig maar ik kan de fout niet vinden ik dacht aan een iframe probleem maar ben niet zeker
bedankt alvast voor de response!