Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Aufklapplink - keine Ahnung wie

Empfohlene Antworten

Veröffentlicht

Hi.

Wie bekomme ich so einen Link hin das wenn ich drauf klicke das unter dem Link der Text erscheint.

Ein Beispiel hierfür findet ihr auf mymtw

Da ist in den News immer unten Links ein Plus und wenn man auf die Grafik klickt kommen weitere Infos "ausgeklappt"... und es wird zum Minus

Suche sowetwas das ich wenn ich auch bei mir auf die Grafik klicke das unten der Text aufklappt...

Wie geht sowas?

Hi.

Wie bekomme ich so einen Link hin das wenn ich drauf klicke das unter dem Link der Text erscheint.

Ein Beispiel hierfür findet ihr auf mymtw

Da ist in den News immer unten Links ein Plus und wenn man auf die Grafik klickt kommen weitere Infos "ausgeklappt"... und es wird zum Minus

Suche sowetwas das ich wenn ich auch bei mir auf die Grafik klicke das unten der Text aufklappt...

Wie geht sowas?

wie du schon sehr gut erkannt hast, ist alles was du brauchst, auf der mymtw site.

schau doch einfach in den source code rein.

Hier die Javascript Function:


function ToggleFrontNews (id)

		{

			if (document.getElementById("FrontNewsRow_" + id).style.display == 'none')

			{

				document.getElementById("FrontNewsImg_" + id).src = "/images/symbols/collapse.gif";

				document.getElementById("FrontNewsRow_" + id).style.display = "";

				document.getElementById("FrontNewsImg_" + id).alt = "Hier klicken um die weiteren Infos Beitrag anzuzeigen";

			}

			else

			{

				document.getElementById("FrontNewsImg_" + id).src = "/images/symbols/expand.gif";

				document.getElementById("FrontNewsRow_" + id).style.display = "none";

				document.getElementById("FrontNewsImg_" + id).alt = "Hier klicken um die weiteren Infos zu verstecken";


				//

				// Call function to increment # views

				//

				CreateNewsView (id);

			}

		}

Hier der link dazu:

<a href="javascript:ToggleFrontNews('9027')"><img alt="Hier klicken um die restlichen Infos anzuzeigen" src="/images/symbols/expand.gif" border="0" id="FrontNewsImg_9027" style="position: relative; left: -2px;"/></a>

und wo geb ich dann den text an der angezeigt werden soll :-)

Ja schon klar irgendwie mit der ID aber wie ?

schau dir ma die sourcen an!!!

z.b.


<table>

<tr>

<td>NewsTitel</td>

</tr>

<tr>

<td onClick="ToggleFrontNews(58632)">NewsText</td>

</tr>

<tr id="58632" style="display: none">

<td>NewsKlapptext</td>

</tr>

</table>


schau dir ma die sourcen an!!!

z.b.


<table>

<tr>

<td>NewsTitel</td>

</tr>

<tr>

<td onClick="ToggleFrontNews(58632)">NewsText</td>

</tr>

<tr id="58632" style="display: none">

<td>NewsKlapptext</td>

</tr>

</table>


Also entweder bin ich jetzt total besoffen oder kapier gar nix mehr... Ich habe folgendes eingefügt
 

<tr>

   <th align="right" class="down">

<a href="javascript:ToggleFrontNews('0001')"><img src="./pic/plus.gif" id="FrontNewsImg_0001" border="0"></a></th>

<th align="left" class="down">Miscellaneous</th>

</tr>

<tr id="0001" style="display: none">

     <td>Verschiedene Downloads</td>

</tr>

Und nun wenn ich auf das Plus klicke kommt folgendes Fehler in Zeile 29 - Objekt erforderlich... OK schau ich Zeile 29 nach ist das folgende Zeile im Java Script
if (document.getElementById("FrontNewsRow_" + id).style.display == 'none')

und nu?

so muss es heissen:


<tr>

   <th align="right" class="down">

<a href="javascript:ToggleFrontNews('0001')"><img src="./pic/plus.gif" id="FrontNewsImg_0001" border="0"></a></th>

<th align="left" class="down">Miscellaneous</th>

</tr>

<tr id="FrontNewsRow_0001" style="display: none">

     <td>Verschiedene Downloads</td>

</tr>

Ahh danke :)

jetzt funkts es!

immer wieder gerne :-)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.