SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem with button as link in form

    I have a login form that has two buttons. One for submitting your login and one for creating a new account. The one for creating a new account opens a new window to the create account page.
    PHP Code:
    <input TYPE="button" value="New User" onClick="window.open('login/create_username.php','Sign Up for Access', 'toolbar=yes, location=yes,menubar=yes,directories=yes,scrollbar=yes,resizable=yes');"
    is what I use.

    This seems to work in Opera and Mozilla, but no luck in IE. I get a real nice general JS error.

    Anyone have any ideas as to how I can make this work out in IE a bit better?

    Thanks
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  2. #2
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the error?

  3. #3
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    'Sign Up for Access'

    I don't know if having spaces in the target like that is 'kosher'
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  4. #4
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the error is invalid agrument on that line of code character 1.

    line: 60
    char: 1
    error: invalid argument
    code: 0
    url: index.php
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, as I suspected. The target cannot have spaces in it. Replace them with underscores

    'Sign_Up_for_Access'
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    Can we go to a 48 hour day?
    Join Date
    May 2002
    Location
    MI
    Posts
    906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sweet! it worked. Thanks!
    mitechie.com
    "Techies just think a little differently
    ...at least that is what they keep telling me."

  7. #7
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Also, just if you care This
    Code:
    'toolbar,location,menubar,directories,scrollbar,resizable'
    works just the same as this
    Code:
    'toolbar=yes, location=yes,menubar=yes,directories=yes,scrollbar=yes,resizable=yes'
    because it's still initialising the variables so JS can read that it is equal to yes/true/1.


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
  •