SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2003
    0 Post(s)
    0 Thread(s)

    another pop up question

    Hi you guys!
    thanx 4 letting me in here...i´m quite desperate 4 a couple of days already, cause i´ve found lot´s of help on popups from the web, but it all doesn´t work out. i copied some other website tryin to make my own first one, but the popup picture gallery doesn´t work. all i get is a blank pop upwindow. and here´s what i put in:
    in the HEAD i put:
    <script language=Javascript>
    function PopupPic(sPicURL) {"popup.htm?"+sPicURL, "","resizable=1,HEIGHT=550,WIDTH=550" );
    , in the BODY:
    <td align="center" width="70%">
    <table border="0">
    <td width="140" height="93" align="center">
    <p><a href="java script:PopupPic('galerie1/birtebilder/kanal.gif')">
    <img name="kanalklein" alt="am kanal" align="center" border="0" width="112" height="150" src="galerie1/kanalklein.jpg">
    <p><a href="java script:PopupPic('galerie1/birtebilder/raucher.gif')">
    <img name="raucher" alt="mit Raucher" align="center" border="0" width="150" height="113" src="galerie1/raucherklein.jpg">
    <p><a href="java script:PopupPic('galerie1/birtebilder/blume.gif')">
    <img name="blume" alt="mit Blume" align="center" border="0" width="150" height="112" src="galerie1/blumeklein.jpg">
    as you can guess...there´s the subdirectories /galerie1 (for the small ...klein.jpg pics) and underneath (inside) /birtebilder where i put the large pics in.
    i used the recomended popup.htm file:
    *<script language='javascript'>
    * *var Temp=self.location.href.split("?" );
    * *var PicURL = (Temp.length>0)?arrTemp[1]:"";
    * *var NS = (navigator.appName=="Netscape" )?true:false;
    * * *function FitPic() {
    * * * *iWidth = (NS)?window.innerWidth:document.body.clientWidth;
    * * * *iHeight = (NS)?window.innerHeight:document.body.clientHeight;
    * * * *iWidth = document.images[0].width - iWidth;
    * * * *iHeight = document.images[0].height - iHeight;
    * * * *window.resizeBy(iWidth, iHeight);
    * * * *self.focus();
    * * *};
    <BODY onload='FitPic();' topmargin="0" *
    marginheight="0" leftmargin="0" marginwidth="0">
    *<script language='javascript'>
    *document.write( "<img src='" + PicUrl + "' border=0>" );
    and i´m going nuts....should i put something in for " + PicUrl +" or is it part of javascript? please....where´s my mistake? i know i´m a bloody amateur...but thanx anyway!

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    0 Post(s)
    0 Thread(s)

    Post A Little Advice


    I'm afraid that I don't know much about JavaScript, so I won't be able to help you there. I'm sure that someone on SP can, though, so don't dispair.

    To help make your code more readable, consider using VB Code. A full listing of VB Code is available for your perusal. Here are some examples:
    • The [ Code ] and [ /Code ] tags (for languages that are not PHP or W3C (X)HTML):
    //Put your non-PHP or -(X)HTML code here
    • The [ Php ] and [ /Php ] tags (for PHP only!):
    PHP Code:
    //Put your PHP code here 
    • The [ Html ] and [ /Html] tags (for (X)HTML only!):
    HTML Code:
    <!--Put your (X)HTML code here-->
    Note the syntax coloring the latter two examples.

    Important note: you must remove the spaces from the VB tags mentioned. The spaces are only there so that VB does not parse them as actual tags.

    Good luck!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts