Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html/js]Otwieranie linkow w ramkach
Bojakki
post
Post #1





Grupa: Zarejestrowani
Postów: 379
Pomógł: 0
Dołączył: 18.08.2004

Ostrzeżenie: (0%)
-----


Mam zakladki, ktorych zawartosc otwiera sie w iframie. Zawartosc tej ramki jest generowana przez kod js. problem jest w tym, ze linki wygenerowane przez ten kod nie chca sie otwierac w oknie matce, aniw nowym oknie, ale zawsze w tym iframe. Zrobilem test i dopisalem kawalek kodu do pliku, ktory jest otwierany w tym iframie:
  1. <a href="index.php" target="_blank">lkljjk</a>

i sie otworzylo w nowym oknie, ale czesc wygenerowana przez kod juz nie chce tego robic:

  1. <?php
  2. function showInfoWindowHtml(marker, name, status, description, id)
  3. {
  4. var footer = [];
  5. var thumb = [];
  6. thumb.push("");
  7.  
  8. description += '[thumb]'+images[id]+'[/thumb]';
  9.  
  10.  
  11. var convertedText = convertText(description, footer, thumb);
  12. var thumbUrl = "";
  13.  
  14. if (thumb[0] != "") {
  15. thumbUrl = "<div style=\"float: left; margin-right: 10px;\"><a href="" + 'building.php?wsk=' + id + "&#092;" target=\"_blank\"><img src=\"" + thumb[0] + "\" style=\"width:170px\"></img></a></div>";
  16. width = "400";
  17. height = "160";
  18. } else {
  19. width = "350";
  20. height = "160";
  21. }
  22.  
  23.  
  24. var content = "<div style=\"text-align: left; height: " + height + "px; width: " + width + "px\"><div style=\"float: left; font-size: 7pt;\">" + id +
  25. ")</div><div style=\"text-align: center;\"><span style=\"font-weight: bold; font-size: 12pt;\">" + name + "</span><small> (" + localeStatus(status) +
  26. ")</small></div><br/><div style=\"overflow: hidden\">" + thumbUrl + convertedText + "</div><hr/>";
  27.  
  28. if (id != "") {
  29. content += "<div style=\"float: right;\"><a target=\"_blank\" href=\"add.php?id=" + id + extraUrlArgs + "\">" + lcEdit + "</a></div>";
  30. }
  31.  
  32. for (r in footer)
  33. {
  34. content += " <a href=\"" + footer[r].url + "\">" + footer[r].name + "</a>";
  35. }
  36.  
  37. content += "</div>";
  38.  
  39. marker.openInfoWindowHtml(content);
  40. }
  41. ?>

Chodzi o 15 i 29 linijke
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
potreb
post
Post #2





Grupa: Zarejestrowani
Postów: 1 568
Pomógł: 192
Dołączył: 7.03.2005
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Bo może twoje funkcje odwołują do jakichś zmiennych, które są w iframe.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 22:01