WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   JS - VBcode Klon (http://www.wcm.at/forum/showthread.php?t=62160)

pirate man 07.07.2002 01:16

JS - VBcode Klon
 
is ein blöder name für den thread aber mir is nix besseres eingefallen
ich bräuchte für meine seite so eine funktion für die links wie hier im board (auf den button klicken, in popup name und url eingeben, link is eingefügt)
nur soll dann der html-code ausgeben werden
wenn ich als name "test" und als url "www.test.at eingeb soll dort stehen
test
ich hoffe, ihr könnt mir helfen

sagi 08.07.2002 11:27

Probier mal:

url = prompt("URL:");
name = prompt("Name");
alert("" . name . "");

Ich bin mir nicht sicher, ob die Punkte stimmen (bin auch aus PHP gewohnt)

mfg

c.

käptn 08.07.2002 16:25

in js verknüpst du strings mit +

ich nehme mal an das ganze soll dann in einem textfeld stehen:

Code:

function insertLink()
{
  url = prompt('URL:');
  if(url)
  {
      name= prompt('Name:');
      if (name)
      {
        document.form.textfeld.value+=""+name+"";
      }
  }
}

ich glaub so sollts funzn

HTH


Alle Zeitangaben in WEZ +2. Es ist jetzt 11:39 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag