WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] pop ups in php (11 posts)

  1. jamesgraham2k1
    Member
    Posted 8 years ago #

    i was told before using java try and find a PHP alternative. well I want to make a pop up window for certain links so i can control the size etc. is this possible with php? if not how can I empliment the java so it works with word press? any help is apreciated thx.

  2. jamesgraham2k1
    Member
    Posted 8 years ago #

    anyone?

  3. jamesgraham2k1
    Member
    Posted 8 years ago #

    Can someone please help me?

  4. tomhanna
    Member
    Posted 8 years ago #

    1. Your question isn't clear. I for one am not at all clear what you are trying to achieve.

    2. When you "bump" your request with an "anyone" it shows that your question has already been replied to.

    3. Patience. No one is paid to answer your questions here.

  5. tomhanna
    Member
    Posted 8 years ago #

    Generally speaking for popups, you would not use Java, you would use Javascript. PHP can output the content of the Javascript for you, but you have to have some way to tell the browser at the other end to open a new window. PHP doesn't run on the client (the browser) it runs on the server. Javascript runs on the client side, so it can do things like opening a new window. PHP can produce the code that will go in the new window, but something has to happen on the client side to tell the browser to open the new window.

  6. pizdin_dim
    Member
    Posted 8 years ago #

    "well I want to make a pop up window for certain links so i can control the size etc."

    This is considered a rude thing to do these days. It has been proven time and time again that popups are a very bad idea on public websites.

  7. jamesgraham2k1
    Member
    Posted 8 years ago #

    the pop ups are when a "lyrics" link is clicked so the lyrics are in a seperate window. I dont find this rude. right now im using target="_blank" but it fills the entire screen I want it just big enough for the Lyrics to fit.

  8. pizdin_dim
    Member
    Posted 8 years ago #

    While you may not find it rude, your users probably do: target="_blank" was a mistake to begin with and is depreciated for exactly this reason. In fact it's already invalid, if you're using XTHML strict, and it's days are obviously numbered.

    See http://www.w3.org/ for more.

  9. jamesgraham2k1
    Member
    Posted 8 years ago #

    well what is a better alternative so the page with the song isnt left when the lyrics are viewed? Im open to sujestions?

  10. pizdin_dim
    Member
    Posted 8 years ago #

    Who decided that forcing the user to stay on one particular page is a good thing? It's not. Just forget about controlling the user experience. The only people who want do that don't understand what the web is about, so be one of the other people:

    Leave the user of your website in charge.

  11. tomhanna
    Member
    Posted 8 years ago #

    jamesgraham2k1, I disagree with pizdin_dim. There are lots of situations (help files, for example) where something like you are describing is exactly the right solution. The problem you will run into is not that people are inherently hostile to having a small window popup for additional information when it's expected and appropriate. Most of us won't be offended as it is MUCH more convenient than navigating back and forth from page to page. But you will have a problemt because the prevalence of popup advertising has many people using popup blockers and the less technically inclined will simply assume that your links aren't working.

    Regardless, whoever told you "java" was a bad solution either a) thought you really meant a Java class which really would be a hideous solution and not a javascript which is a completely different thing or b) they were off their rockers. Javascript is the simplest and best way to achieve what you want to achieve.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags