SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mozilla, button, location

    Why this does not work in Mozilla?

    <input type="button" name="cancel" value="Cancel" class="button"
    onClick="location.href('page.php?m=per');">

  2. #2
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) Any chance you can give us a link to a page demonstrating the problem?

    2) what, exactly, do you expect it to do?

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After click new page should be loaded (page.php)
    In IE it works and nothing happened in Mozilla
    (click and nothing happened)

  4. #4
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try amending
    HTML Code:
    onClick="location.href('page.php?m=per');"
    to
    HTML Code:
    onClick="window.location.href='page.php?m=per';"
    IE lets you use a shortcut to get at the location, Moz probably wants you to access it properly via the window object.

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thaks. Solved.

    location.href('page.php?m=per'); - not works
    location.href='page.php?m=per';- works


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
  •