PDA

View Full Version : SWF object problem


Medina
05-05-2008, 04:52 PM
with collapsable "usercp", take a look to the picture.



http://img389.imageshack.us/img389/2660/naamloosuw5.jpg







The picture is a swf object, I am using this script.

<center> <tr><td align="center"><script type="text/javascript" src="http://cars.nl/swfobject.js"></script></head><body><div id="flashcontent3"></div>
<script type="text/javascript">
var so = new SWFObject("vernieuwing5.swf", "movieTarget", "728", "90","8");
so.write("flashcontent3");
</script></body></td></tr> </center>




Somebody told me about z-index, but how I have to do this?

Medina
05-18-2008, 09:01 PM
????

GameWizard
05-19-2008, 01:03 PM
Here is the code you need to have, by adding style="z-index:0" as follows:

<div id="flashcontent3" style="z-index:0"></div>Alternatively, if this doesn't work, try changing it to z-index:1

The idea behind z-index is that it applies which layer will show up on top first. In this case we say that 0 or 1 is the lowest layer so it should show up on the very back whilst everything else (such as your drop down menu) should then appear on top. However, you may need to apply the z-index to your menu aswell assuming the code does not work with a higher z-index.

Medina
05-19-2008, 04:03 PM
It still doesn`t work, I am try to working out for a month. But it still not fixed.


I know a another forum, they don`t have this problem. :confused:

GameWizard
05-19-2008, 04:23 PM
post your entire navbar template here.

Medina
05-19-2008, 06:27 PM
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grays cale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script><br><table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"><tr><td class="alt1" width="100%" rowspan="2"><if condition="is_array($navbits)"><table cellpadding="0" cellspacing="0" border="0"><tr valign="bottom"><td><a href="#" onClick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td> <td>&nbsp;</td><td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span><font size="2"> $navbits[breadcrumb]</font></td></tr><tr><td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$scriptpath"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td></tr></table><else /><div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0"/></a>&nbsp;<strong>$vboptions[bbtitle]</strong></if></div></td>

<if condition="$show['member']"><td bgcolor="#ebebeb" class="smallfont" colspan="0" rowspan="2" nowrap="nowrap"><a href="$vboptions[bburl]/profile.php?do=editavatar" border="0" cellspacing="0" cellpadding="0">$navbaravatar</a></td><td bgcolor="#F1F1F1" valign="top" nowrap="nowrap" colspan="2"><div class="smallfont"> <!--<span style="float:right"></span>--><strong><phrase 1="$bbuserinfo[username]"><div align="left">$vbphrase[welcome_x]</div></phrase></strong><phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]"><div align="left">$vbphrase[last_visited_x_at_y]</div></phrase></div></td></tr> <td class="alt1"><a href="private.php?"><img src="http://onboard.nl/images/icons/email_envelop.gif" border="0" alt="Priv? mail"></a></td><td valign="top" nowrap="nowrap" <if condition="$bbuserinfo['pmunread']">id="pmBox"<else />class="alt2"</if></div></strong><p><span class="smallfont"><strong><if condition="$show['pmstats']"></if></span></p><p><span class="smallfont"><if condition="$show['pmstats']"><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]"> $vbphrase[private_messages_nav]</phrase></if><if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if></span></p></td><if condition="$bbuserinfo['pmunread']">
<script type="text/javascript">
<!--
pmBox.bgColor='#c54d4d';
setInterval("Timer()", 500);
x=1;
function Timer()
{
set=1;
if (x==0 && set==1)
{
pmBox.bgColor='$stylevar[navbar_bgcolor]';
x=1;
set=0;
}
if (x==1 && set==1)
{
pmBox.bgColor='#c54d4d';
x=0;
set=0;
}
}
--></script></if><else /><td class="alt2" nowrap="nowrap" style="padding:0px"><form action="login.php?do=login" method="post" onSubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script><table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"><tr><td class="smallfont"><label for="navbar_username">$vbphrase[username]</label></td><td><input type="text" class="bginput" style="font-size: 11px" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="$vbphrase[username]" onFocus="if (this.value == '$vbphrase[username]') this.value = '';" /></td><td class="smallfont" colspan="2" nowrap="nowrap"><label for="cb_cookieuser_navbar"><input type="checkbox" name="cookieuser" value="1" tabindex="103" id="cb_cookieuser_navbar" accesskey="c" />$vbphrase[remember_me]</label></td></tr><tr><td class="smallfont"><label for="navbar_password">$vbphrase[password]</label></td><td><input type="password" class="bginput" style="font-size: 11px" name="vb_login_password" id="navbar_password" size="10" tabindex="102" /></td><td><input type="submit" class="button" value="$vbphrase[log_in]" tabindex="104" title="$vbphrase[enter_username_to_login_or_register]" accesskey="s" /></td></tr></table><input type="hidden" name="s" value="$session[sessionhash]" /><input type="hidden" name="do" value="login" /><input type="hidden" name="vb_login_md5password" /><input type="hidden" name="vb_login_md5password_utf" /></form></td></if></tr></table><table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" bgcolor="ededed" class="tborder" style="border-top-width:0px"><tr align="center"><td bgcolor="f7f7f7" class="vbmenu_control" id="Sport"><a href="http://forums.nl/forumdisplay.php?f=36" class="stij14 stijl7"> <font size="1">Sport</font></a>


<if condition="$show['member']"><td id="usercpoptions" class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]" class="stijl7"><font size="1">$vbphrase[user_cp]</font></a>

<script type="text/javascript"> vbmenu_register("usercpoptions"); </script></td>
<span class="stijl4"></if></span><if condition="$show['registerbutton']"><td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" class="stijl4" rel="nofollow"><font size="1">$vbphrase[register]</font></a></td></if>$template_hook[navbar_buttons_left]<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" class="stijl4" accesskey="5"><font size="1">$vbphrase[faq]</font></a></td><td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]" class="stijl4"><font size="1">$vbphrase[members_list]</font></a></td>
<td class="vbmenu_control"><a href="ledenlijst.php$session[sessionurl_q]" class="stijl4">$vbphrase[ledenlijst]</a></td><span class="stijl4"><if condition="$show['popups']"></span><if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" class="stijl4" accesskey="2"><font size="1">$vbphrase[new_posts_nav]</font></a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" class="stijl4" accesskey="2"><font size="1"><$vbphrase[todays_posts]</font></a></td>
</if>
<td class="vbmenu_control stijl4" id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow"><font size="1">$vbphrase[search]</font></a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
<div>
<if condition="$show['member']">
<td class="vbmenu_control stijl4" id="usercptools"><a href="$show[nojs_link]#usercptools" accesskey="3"><font size="1">$vbphrase[quick_links]</font></a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" class="stijl4" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" class="stijl4" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" class="stijl4" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" class="stijl4" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" class="stijl4" onClick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
<span class="stijl4">
</if>
</span>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" class="stijl4" onClick="return log_out('$vbphrase[sure_you_want_to_log_out]')"><font size="1">$vbphrase[log_out]</font></a></td>
</if>
</tr>
</table>
<!-- / nav buttons bar -->
<!-- nav buttons bar -->
<table width="100%" border="0" align="center" cellpadding="$stylevar[cellpadding]" cellspacing="0" bgcolor="#ededed" class="tborder" style="border-top-width:0px">
<tr align="center">

<td bgcolor="ededed" class="vbmenu_control" id="Nieuws & Actualiteiten"> <a href="http://forums.nl/forumdisplay.php?f=30" class="stijl6"> <font size="1"> Nieuws & Actualiteiten</font></a>
<td bgcolor="ededed" class="vbmenu_control" id="Onzinhoekje"> <a href="http://forums.nl/forumdisplay.php?f=23" class="stijl6"> <font size="1"> Onzinhoekje</font></a>
<td bgcolor="ededed" class="vbmenu_control" id="Gezelschapshoekje"> <a href="http://forums.nl/forumdisplay.php?f=28" class="stijl6"> <font size="1"> Gezelschapshoekje</font></a>
<td bgcolor="f7f7f7" class="vbmenu_control" id="Dar al-islam"> <a href="http://forums.nl/forumdisplay.php?f=38" class="stijl6"> <font size="1"> Dar- Al-islam</font></a>
<td bgcolor="f7f7f7" class="vbmenu_control" id="Uit het zicht verloren"> <a href="http://forums.nl/forumdisplay.php?f=53" class="stijl6"> <font size="1"> Uit het zicht verloren</font></a>
<td bgcolor="f7f7f7" class="vbmenu_control" id="Muziek Club"> <a href="http://forums.nl/forumdisplay.php?f=42" class="stijl6"> <font size="1"> Muziek Club </font></a>
<td bgcolor="f7f7f7" class="vbmenu_control" id="Verhalenhoekje"> <a href="http://forums.nl/forumdisplay.php?f=33" class="stijl6"> <font size="1"> Verhalenhoekje</font></a></tr>
</table>

</if>

<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
</if>
<if condition="$show['member']">
<!-- user cp tools menu -->

<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>

<tr><td class="vbmenu_option"><a href="#" onClick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
$template_hook[navbar_quick_links_menu_pos1]

<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>

<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
$template_hook[navbar_quick_links_menu_pos2]

<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
$template_hook[navbar_quick_links_menu_pos3]

</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->

<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
</if>
<if condition="$show['popups'] AND $show['member']">
<div class="vbmenu_popup" id="usercpoptions_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead" align="$stylevar[left]"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['pmstats']"><tr><td class="vbmenu_option" align="$stylevar[left]"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option" align="$stylevar[left]"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option" align="$stylevar[left]"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<tr><td class="vbmenu_option" align="$stylevar[left]"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option" align="$stylevar[left]"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
<tr><td class="thead" align="$stylevar[left]">$vbphrase[miscellaneous]</td></tr>
<tr><td class="vbmenu_option" align="$stylevar[left]"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
</table>
</div>
</if>
</if><!-- Search Google -->
<center>
<form method="get" action="http://www.google.nl/custom" target="_top">
<table bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle" width="75" height="32"></img></a>
<label for="sbi" style="display: none">Voer uw zoekwoorden in</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Zoekformulier verzenden</label>
<input type="submit" name="sa" value="Zoeken" id="sbb"></input>
<input type="hidden" name="client" value="pub-3531963405457983"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="ie" value="UTF-8"></input>
<input type="hidden" name="oe" value="UTF-8"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="nl"></input>
</td></tr></table></form></center><br>
<div align="center"><font size="1">ADVERTENTIE:</font></div>

<div id="flashcontent3" style="z-index:1" align="center">
<script type="text/javascript">
var so = new SWFObject("http://onboard.nl/advertens/randommovies.swf", "movieTarget", "720", "90","8");
so.write("flashcontent3");
</script></div><br>



Here it is.

GameWizard
05-20-2008, 06:08 AM
Find this line:
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
Replace it with this:
<div class="vbmenu_popup" id="usercptools_menu" style="display:none; z-index:10;">
Try that, it should fix the problem atleast for the UserCP drop down menu. You can apply the same code to the other menus as well if you notice the same problem.

Medina
05-20-2008, 06:59 PM
It screwing the forum, look. :S

http://img361.imageshack.us/img361/6681/naamloossj0.jpg

GameWizard
05-20-2008, 08:52 PM
Alright, then remove the last changes and try this:

Find:
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
Replace with:
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0" style="z-index:10">

Medina
05-21-2008, 06:27 AM
That doesn`t work also, but I have read somewhere else. That you have to add "position: absolute;" beforen or after z-index. If you don`t add that, it will not work.

GameWizard
05-21-2008, 08:40 AM
That might be true, although I believe it should actually be position: relative; instead of absolute in this case. I would keep playing with it. Look up on Google regarding z-index. I'm sure if you keep playing with it, you will find a solution.

Medina
05-22-2008, 04:51 PM
I try for a month at least, and I am still not figure it out.


I hate it now to try by myself, because I can`t find out new things.


But should I send you the codes and .js file of the other forum where it`s working?


thanks.