SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    what do you think of JS pop-ups?

    hey all

    i'm redesigning a pretty heavy content site - i'm debating on pop-up description windows using JS.

    they ARE pretty annoying aren't they?
    but what if used properly...

    will they cause any cross-browser difficulties, or anything like that?

    thanks~

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think they're pretty annoying. If they open when the user clicks a button that says "Open a Window with These Details," that's different. But for anything else...

  3. #3
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thats actually exactly what i would be using them for - its a software company - they have many products - and for feature details & screen caps you would have to click a link for a separate windows (so they will know that its coming) it won't be one of those windows opening everywhere experiences... i'm just wondering on how buggy it is to try and do this.. i've never used pop-ups before - i've always stayed away from it

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm... JavaScript support in browsers is a problem. You could add a "Troubleshooting" link that would say things like:

    Quote Originally Posted by Sample troubleshooting page
    Our site uses JavaScript popups to provide information about our products. If the popups do not work in your browser, try enabling JavaScript. To enable JavaScript...
    Get my drift? Additionally, some people hate all popups. You could also add a debug function where if the popup doesn't work, the same product page would open in the main window. Jeremy W. has some instructions on doing that from his post on Ensight.

  5. #5
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alright compuwhiz7 thanks a bunch
    i'll take a look at that article
    i think i just might stay away from them all together - we have a lot of clients that still use dial-up - so... <sigh> ... thinks... thanks again

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dialup is a pain.

    You're welcome.

  7. #7
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I prefer to use Javascript with links that work with or without Javascript. example:
    HTML Code:
    <a href="description.html" onclick="window.open('description_popup.html', '_blank', 'width=200,height=400,toolbar=0'); return false;">View Product Description</a>
    Or something similar, or if you are using a server-side scripting language like PHP, you can link to product_description.php?id=4&popup=1, hope that helps.

    Edit:

    I see the link compuwhiz7 posted contained this info. [img]images/smilies/wink.gif[/img]
    Last edited by Jeff Lange; Jul 31, 2003 at 09:18.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  8. #8
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    478
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey! that might work

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What might work? The thing Jeremy mentioned in his post or the thing Jeff mentioned? I hope it's the one Jeremy mentioned, 'cause I suggested it. No offense, Jeff.

  10. #10
    Forensic SEO Consultant Webnauts's Avatar
    Join Date
    Jun 2003
    Location
    European Union
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The accessibility police recommends!!!

    If a users browser doesn't support JavaScript, or the JavaScripts you are using, or if user has JavaScript OFF, will disable your visitor to access your content.

    Avoid as far as possible JavaScript, to avoid running risks on
    complications on the end users machines, or while goverment and other
    employees are required to disable this feature, for security or other
    reasons. Also there is a number of users who are very concerned about
    security issues and disable this feature too.

    To avoid these problems do the following:

    1. Include in the head of your document the following script:

    <script language="JavaScript" type="text/javascript">
    <!--
    var newWindow = null;
    function closeWin(){
    if (newWindow != null){
    if(!newWindow.closed)
    newWindow.close();
    }
    }
    function popUpWin(url, type, strWidth, strHeight){
    closeWin();
    if (type == "fullScreen" ){
    strWidth = screen.availWidth - 10;
    strHeight = screen.availHeight - 160;
    }
    var tools="";
    if (type == "standard" || type == "fullScreen" ) tools = "resizable,toolbar=no,location=no,scrollbars=no,menubar=no,width="+strWidth+",height="+strHeight+",top=0,left=0";
    if (type == "console" ) tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
    newWindow = window.open(url, 'newWin', tools);
    newWindow.focus();
    }
    //-->
    </script>

    2. Replace your links with:

    <a href="<A href="http://www.webnauts.net/cse_validator.html">http://www.webnauts.net/cse_validator.html" target="popUpWin" title="new window" onclick="popUpWin(this.href,'standard',600,400);return false;">Test</a>"

    (Script produced with the popup generator of Accessify.com and slightly modified by myself).

  11. #11
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting, Webnauts. Although, I must admit, that it would be a little difficult for novices to implement. Eh?

  12. #12
    Forensic SEO Consultant Webnauts's Avatar
    Join Date
    Jun 2003
    Location
    European Union
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by compuwhiz7
    Interesting, Webnauts. Although, I must admit, that it would be a little difficult for novices to implement. Eh? [img]images/smilies/wink.gif[/img]
    I think it is described so well, that it should not be a problem.
    They just need to replace the URLs. Or? [img]images/smilies/cool.gif[/img]

  13. #13
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good point, Webnaut.

    Admittedly, I like to understand something before I implement it. Although I myself do understand your example, novices might not. (Shrugs.)

  14. #14
    SitePoint Zealot jinx3's Avatar
    Join Date
    May 2002
    Location
    Vancouver, WA
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never realized that so many people turned off JavaScript, I haven't ever been concerned about that?!?!

    According to W3Schools.com 13% of people have JavaScript turned off!
    http://www.w3schools.com/browsers/browsers_stats.asp
    jinx
    superbubba.com
    If you want to learn something . . . start doing it!

  15. #15
    Forensic SEO Consultant Webnauts's Avatar
    Join Date
    Jun 2003
    Location
    European Union
    Posts
    1,488
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jinx3
    I never realized that so many people turned off JavaScript, I haven't ever been concerned about that?!?!

    According to W3Schools.com 13% of people have JavaScript turned off!
    http://www.w3schools.com/browsers/browsers_stats.asp
    I would not doubt that more than 13% of users disable JS. For example myself. But I am not included in this statistic! They did not ask me... [img]images/smilies/cool.gif[/img]
    Last edited by Webnauts; Aug 5, 2003 at 13:54. Reason: Correcting content


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
  •