SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Apr 2003
    Location
    ny
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation PHP and Javascript problem into MySql

    I have setup a primitive site management system. I have a script which allows me to insert, update, and/ or delete entries from a database. I insert all my content this way.

    My problem is the following:

    I tried to put in a link to a page which uses javascript. the link should look like the following

    <a href="javascript:window.open("page.html","newPage","toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=200,height=200")">LINK</a>

    however, when I view the page and I rollover the link i only see this "javascript:window.open( " in the status bar. The link does not work.

    I have tried using addslashes() and stripslashes() when inserting and extracting from the DB.

    What can I do to fix this ?

  2. #2
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Montgomery, TX
    Posts
    59
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    PHP Code:
    <a href="#" onclick="window.open('page.html', 'newpage', 'toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=200,height=200');">LINK</a
    I think it's the double quotes around the page name and so forth that's messing it up. I just had to do this yesterday.

    HTH,

    David


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
  •