[GastForen Programme Web/Internet Adobe Dreamweaver Rollover-Button sol beim Klick aktiv bleiben - geht das?

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste
Web/Internet - Webdesign, eForms
Themen
Beiträge
Moderatoren
Letzter Beitrag

Rollover-Button sol beim Klick aktiv bleiben - geht das?

homeedition
Beiträge gesamt: 198

29. Mär 2011, 11:01
Beitrag # 1 von 6
Bewertung:
(3184 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo,

ich habe mir mit dreamweaver ein Menü mit Rollover-Buttons gebaut.

Ist es irgendwie möglich das beim Klicken eines Menüpunktes der 2te Buttonzustand stehen, also aktiv, bleibt?

hier mal die html:
Code
<table width="1007" border="0" align="center" cellpadding="0" cellspacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> 
<td height="50" style="text-align: right;"><a href="index.php?option=com_content&view=article&id=70&Itemid=69" target="_self"><a href="index.php?option=com_content&view=article&id=68&Itemid=69" target="_self"><a href="index.php?option=com_content&view=article&id=69&Itemid=69" target="_self"><a href="http://www.neueseite.com/" target="_blank"></a><img src="images/stories/atb/bottommenu/b_left.jpg" width="439" height="30" border="0" /><a href="http://www.atb-motors.com/" target="_blank"><img src="images/stories/atb/bottommenu/atb_gruppe.jpg" alt="ATB-Gruppe" width="94" height="30" border="0" /></a><a href="#" target="_self" onmouseover="MM_swapImage('deutsch','','images/stories/atb/bottommenu/b_deutsch2.jpg',0)" onmouseout="MM_swapImgRestore()"><img src="images/stories/atb/bottommenu/b_deutsch1.jpg" alt="deutsch" name="deutsch" width="63" height="30" border="0" id="deutsch" /></a><a href="#" target="_self" onmouseover="MM_swapImage('english','','images/stories/atb/bottommenu/b_english2.jpg',0)" onmouseout="MM_swapImgRestore()"><img src="images/stories/atb/bottommenu/b_english1.jpg" alt="english" name="english" width="63" height="30" border="0" id="english" /></a><a href="index.php?option=com_content&amp;view=article&amp;id=68&amp;Itemid=69" target="_self"><img src="images/stories/atb/bottommenu/b_anfahrt.jpg" alt="Anfahrt" width="61" height="30" border="0" /></a><a href="index.php?option=com_content&amp;view=article&amp;id=70&amp;Itemid=69" target="_self"><img src="images/stories/atb/bottommenu/b_impressum.jpg" alt="Impressum" width="116" height="30" border="0" /></a></td>
</table>


Danke :)
X

Rollover-Button sol beim Klick aktiv bleiben - geht das?

homeedition
Beiträge gesamt: 198

29. Mär 2011, 11:24
Beitrag # 2 von 6
Beitrag ID: #467905
Bewertung:
(3178 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Ich habe beim kopieren des Quellcodes das script vergessen ... hier der KOMPLETTE Code:

Code
<script type="text/javascript"> 
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<table width="1007" border="0" align="center" cellpadding="0" cellspacing="0" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<td height="50" style="text-align: right;"><a href="index.php?option=com_content&view=article&id=70&Itemid=69" target="_self"><a href="index.php?option=com_content&view=article&id=68&Itemid=69" target="_self"><a href="index.php?option=com_content&view=article&id=69&Itemid=69" target="_self"><a href="http://www.atb-motors.com/" target="_blank"></a><img src="images/stories/atb/bottommenu/b_left.jpg" width="439" height="30" border="0" /><a href="http://www.atb-motors.com/" target="_blank"><img src="images/stories/atb/bottommenu/atb_gruppe.jpg" alt="ATB-Gruppe" width="94" height="30" border="0" /></a><a href="#" target="_self" onmouseover="MM_swapImage('deutsch','','images/stories/atb/bottommenu/b_deutsch2.jpg',0)" onmouseout="MM_swapImgRestore()"><img src="images/stories/atb/bottommenu/b_deutsch1.jpg" alt="deutsch" name="deutsch" width="63" height="30" border="0" id="deutsch" /></a><a href="#" target="_self" onmouseover="MM_swapImage('english','','images/stories/atb/bottommenu/b_english2.jpg',0)" onmouseout="MM_swapImgRestore()"><img src="images/stories/atb/bottommenu/b_english1.jpg" alt="english" name="english" width="63" height="30" border="0" id="english" /></a><a href="index.php?option=com_content&amp;view=article&amp;id=68&amp;Itemid=69" target="_self"><img src="images/stories/atb/bottommenu/b_anfahrt.jpg" alt="Anfahrt" width="61" height="30" border="0" /></a><a href="index.php?option=com_content&amp;view=article&amp;id=70&amp;Itemid=69" target="_self"><img src="images/stories/atb/bottommenu/b_impressum.jpg" alt="Impressum" width="116" height="30" border="0" /></a></td>
</table>



als Antwort auf: [#467901]

Rollover-Button sol beim Klick aktiv bleiben - geht das?

SabineP
Beiträge gesamt: 7586

29. Mär 2011, 12:23
Beitrag # 3 von 6
Beitrag ID: #467912
Bewertung:
(3168 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Was meinst Du mit "beim Klicken"?
Meinst Du beim Klicken in der aktuellen Seite oder die Seite, die nach dem Klicken im Browser geladen wird.


als Antwort auf: [#467901]

Rollover-Button sol beim Klick aktiv bleiben - geht das?

homeedition
Beiträge gesamt: 198

29. Mär 2011, 13:17
Beitrag # 4 von 6
Beitrag ID: #467921
Bewertung:
(3150 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Ich meine:
Wenn ich mit der Mouse über einen Button fahre dann wird dieser z.b. rot.

Wenn ich nun dort drauf klicke soll der Button rot bleiben und die neue Seite geöffnet werden.

:)


als Antwort auf: [#467912]

Rollover-Button sol beim Klick aktiv bleiben - geht das?

SabineP
Beiträge gesamt: 7586

29. Mär 2011, 13:33
Beitrag # 5 von 6
Beitrag ID: #467923
Bewertung:
(3145 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Du mußt den roten Button in den HTML-Code der neuen Seite einfügen.
Das Javascript wechselt den Button nur aus bei Mausberührung.


als Antwort auf: [#467921]

Rollover-Button sol beim Klick aktiv bleiben - geht das?

homeedition
Beiträge gesamt: 198

29. Mär 2011, 13:41
Beitrag # 6 von 6
Beitrag ID: #467924
Bewertung:
(3139 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Alles klar, hab es mir schon fast gedacht :)

Ich habe jetzt für jeden Bereich ein extra Menü mit dem jeweiligen roten Button erstellt und per include den beiträgen zugewiesen.

Danke dir :)


als Antwort auf: [#467923]
X