SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2002
    Location
    london
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    passing javascript parameters through <a> tags

    hey all

    trying to make a popup window with dynamic content. the bit i'm having trouble with is the height/width of the popup, everything else is working fine (title and content for the image source). here is the code i have so far:

    Code:
    <script LANGUAGE="JavaScript"> 
    function galpop(param1,param2,param3,param4,param5){
    window.open("pop.php?popcontent="+escape(param1)+"&poptitle="+escape(param2)+"&pop="+escape(param3),"height='+escape(param4)+',width='+escape(param5)+',menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,location=0,left=0,top=0")
    } 
    </script>
    any ideas much appreciated...

    L
    give me all your lentils

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That would probably have a lot to do with your use of conflicting " and '

    If you start off using " then you can't swap to ' when you feel like it - stick to one choice for a single expression.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Zealot
    Join Date
    Jan 2002
    Location
    london
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey flawless

    think i was gettin a bit confused there - managed to sort it in the end....

    Code:
    <script LANGUAGE="JavaScript"> 
    function galpop(URL,name,param1,param2){
    window.open(URL,name,'height='+escape(param1)+',width='+escape(param2)+',menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,location=0,left=0,top=0')
    } 
    </script>
    thanks for your reply though.

    L
    give me all your lentils

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any time.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---


Bookmarks

Posting Permissions

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