473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

nach funktionsaufruf öffnet sich jeder link in neuem fenster...

tach zusammen,

folgendes jscript bringt mich zur verzweiflung...

jedesmal, nachdem ein solches popup aufgerufen wurde, öffnet sich
jeder andere link
in einem neuen fenster (als ob bei jedem link target="_blank" stehen
würde).

so sieht das ganze im php-script aus:
die werte kommen aus einem array ($config) das in der datei
classes.php steckt

Expand|Select|Wrap|Line Numbers
  1. <?
  2. require_once('classes.php');
  3.  
  4. echo "<SCRIPT LANGUAGE=\"JavaScript\" type=\"text/javascript\">\n";
  5. echo "    <!--\n";
  6. echo "        function launchsmall(url) {\n";
  7. echo "            window.name = 'opener';\n";
  8. echo "            remote = open(url, \"\",
  9. \"resizable,status,scrollbars,width=" . $config['popup_small_width'] .
  10. ",height=" . $config['popup_small_height'] . ",left=" .
  11. $config['popup_small_left'] . ",top=" . $config['popup_small_top'] .
  12. "\");\n";
  13. echo "        }\n";
  14. echo "        function launchbig(url) {\n";
  15. echo "            self.name = \"opener\";\n";
  16. echo "            remote = open(url, \"\", \"resizable,scrollbars,width=" .
  17. $config['popup_big_width'] . ",height=" . $config['popup_big_height']
  18. .. ",left=" . $config['popup_big_left'] . ",top=" .
  19. $config['popup_big_top'] . "\");\n";
  20. echo "        }\n";
  21. echo "    // -->\n";
  22. echo "</SCRIPT>\n";
  23. ?>
im browser kommt folgendes an (wie erwartet):

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript" type="text/javascript">
  2. <!--
  3. function launchsmall(url) {
  4. window.name = 'opener';
  5. remote = open(url, "",
  6. "resizable,status,scrollbars,width=500,height=270,left=200,top=100");
  7. }
  8. function launchbig(url) {
  9. self.name = "opener";
  10. remote = open(url, "",
  11. "resizable,scrollbars,width=550,height=400,left=220,top=120");
  12. }
  13. // -->
  14. </script>
für den fall das es interessant sein sollte, hier nochmal der teil des
$config-arrays aus dem die
größen für die popups kommen:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. // ...
  3.  
  4. $config['popup_small_height']        =    '270';
  5. $config['popup_small_width']        =    '500';
  6. $config['popup_small_left']            =    '200';
  7. $config['popup_small_top']            =    '100';
  8.  
  9. $config['popup_big_height']            =    '400';
  10. $config['popup_big_width']            =    '550';
  11. $config['popup_big_left']            =    '220';
  12. $config['popup_big_top']            =    '120';
  13.  
  14. // ...
  15. ?>
die links bei denen ich die funktionen anwende sehen vom aufbau her
folgendermaßen aus:
Expand|Select|Wrap|Line Numbers
  1. <a href="javascript:launchbig('../pfad/pfad2/datei.php?value=new&stamp=1060087156&day=2')">link</a>
  2.  
// nebenfrage: kann ich bei einem link statt & auch &amp; schreiben
oder gibt es da irgendwelche probleme? funktioniert nämlich auch..

hat jemand einen tipp woran es liegen könnte das nach einmaligem
ausführen einer dieser funktionen (launchsmall/launchbig)
jeder andere link auch in einem neuen fenster geöffnet wird? nach
einem reload der _gesamten_ seite gehts übrigens wieder normal...

danke für hilfe
mfg, chris
Jul 20 '05 #1
2 2285
... und weil der source hier so wild aussieht habe ich das ganze
nochmal auf einer no-paste seite gepostet:

http://nopaste.php.cd/2172
sorry das ich nicht früher dran gedacht habe..
chris
Jul 20 '05 #2
sorry, wrong newsgroup (language)

-> de.comp.lang.javascript
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: hichem | last post by:
Hallo Leute, Ich habe ein problem und zwar : ich will bilder aus meiner datenbank auslesen, aber jede zeile muß nur drei bilder enthalten und dann kommt ein absatz danach wieder drei bilder, kann...
3
by: Matt Adams | last post by:
As well known I could specify the text color in the body tag like: <BODY TEXT=WHITE LINK=WHITE VLINK=RED ALINK=WHITE> What I want to achieve now is that always (!) the text of the last visited...
6
by: Carla | last post by:
hi people, I have a little problem that I can't solve with css and i was wondering if you could help me. I have 4 links, I want that when I click/mouseover in the link 1, it turns to a color...
7
by: Shawn Windle | last post by:
----begin node.h-------- #ifndef NODE_H #define NODE_H #include <iostream> //NULL using namespace std; class node {
1
by: John Doe | last post by:
I have a PHP page that generates a list box with several options in it. I would like to have a "view" link next to the list box. When the user changes the contents of the list box, I would like...
26
by: Harrie | last post by:
Hi, After Brian mentioned the use for <link rel=..> for navigational purposes in another thread, I've been looking into it and found that HTML 3.2 has two other recognized link types than HTML...
0
by: Adrian Sommer | last post by:
Hallo, meine frontend-mdb lässt sich nicht mehr benutzen. Sie kann zwar geöffnet werden aber sobald ich eine Tabelle/Formular/Modul öffnen möchte erscheint die Fehlermeldung: "Es wurde...
1
by: Alexander Mueller | last post by:
Hallo Mein Ziel ist es, das Desktop-Fenster als Bitmap zu speichern bzw als Bitmap-Objekt zu erhalten. Das geht auch recht gut mit Graphics.FromHwnd() und der Verwendung von GetDesktopWindow()...
5
by: Robert Marti | last post by:
Hallo In meinem ASP.NET-Projekt öffne ich ein Fenster mit der Javascript-Function showmodaldialog(...). Alles klappt perfekt, ausser dass sich das Browser-Busy-Icon (Fenstersymbol rechts oben im...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.