SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 63
  1. #26
    The Mind's I ® silver trophy Dark Tranquility's Avatar
    Join Date
    Sep 2003
    Location
    KSA - UAE
    Posts
    9,457
    Mentioned
    8 Post(s)
    Tagged
    1 Thread(s)
    Let's keep the conversation "in topic" please

  2. #27
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Chris Coyier gives another tooltip-ish solution that I find to be just spiffy:

    Fold Out Popups | CSS-Tricks

    Quote Originally Posted by Dark Tranquility View Post
    Let's keep the conversation "in topic" please
    And mutually respectful please...

  3. #28
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JJMcClure View Post
    lol! As soon as someone asks about pop-up code, out come the soap boxes and the purists can't resist giving their opinion on the evil of pop-ups.

    Every. Single. Time.
    Ever think there might be a REASON for that? It's like the people who use/abuse TARGET -- then when told not to go and replicate it's functionality with scripting without thinking "maybe there's a REASON it's deprecated and people keep telling me not to do it?"



    Kinda like smoking, alcohol or drug use -- it's bad for you, it makes you look and act like a dumbass, it destroys lives from an economic standpoint -- EVERYONE except your die hard stoners who've already fried their brains to mush knows it -- and there are still people who do it every single day of their lives. Not to use my soapbox to turn this into a tolerance lecture...

    Basically, some people always have to make bad decisions no matter how many times they're warned off from it. If they didn't, your various "stupid people doing stupid things" video websites would go out of business.

    That said, it really depends on the content and how accessibility would be handled -- as said it almost sounds more like you want a lightbox than an actual window. Four years ago I was playing with making popups using some fairly lean .js

    Index of /for_others/ag

    Code hasn't aged well, but it might be a decent starting point depending on what it is you're trying to do. The big trick would be that if scripting is disabled, you just show the elements on the screen as part of the page.

    Really though we'd have to see the content of the popup and the page it's being linked/displayed/popped up over to truly say what the best approach would be -- without that we're all guessing wildly.

  4. #29
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by JJMcClure View Post
    I don't really know what that means but since the OP asked for a solution and not for your opinion on pop-ups, I'm wondering if you're talking about yourself?
    Sometimes the answer to a question is "You're asking the wrong question". Part of the reason SPF is successful is because we always try to give people more than they asked for. They ask us how to do something, and we show them a better way of achieving their goal. Pop-ups suck. No-one who knows anything at all about web design and usability will deny that. And that has been the case for years, it isn't a recent development. No-one who knows anything about 21st century web design and usability would countenance using pop-ups. Unfortunately, we do get a lot of people calling in here who are using very outmoded design methods, and we earn our reputation by setting them on the right path.

    If the question is phrased along the lines of "Look, I know pop-ups are a really stupid idea, and I know there are all sorts of accessibility and usability problems, not least of which is the vast array of blockers and the issue of tabs and all that, but despite that, I really need a way to get pop-up windows", then and only then is the right answer to tell them how to generate pop-up windows. For any other formulation of the question, the answer is "Don't use pop-ups".

  5. #30
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    For any other formulation of the question, the answer is "Don't use pop-ups".
    Quote for truth. Truth often hurts... and many times the answer should be ... well, it's the old joke:

    "Doctor, Doctor! It hurts when I do this!"

    Someone asks how to shoot themselves in the head with a crossbow -- you could tell them exactly how to pull it off; or you could ask what's wrong and try to get them some REAL help.

  6. #31
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,208
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by deathshadow60 View Post
    Four years ago I was playing with making popups using some fairly lean .js

    Index of /for_others/ag
    Looks interesting, ds60. Out of interest, tried tabbing to those popups but wasn't able to. Is there a way to keyboard access those popups, or is there a way at all to make popups accessible? Maybe it's a job for aria roles etc.

  7. #32
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Looks interesting, ds60. Out of interest, tried tabbing to those popups but wasn't able to. Is there a way to keyboard access those popups, or is there a way at all to make popups accessible? Maybe it's a job for aria roles etc.
    Well, as I said it hasn't aged well -- and was more meant for content you would NOT keyboard navigate too... though I'd consider making the close boxes anchors so that you can at least get to those via keyboard.

    Really needs a rewrite as it was more of a "how quick can I show how to move a DIV like it was a window" than a practical code for deployment. As I said, might be a good base for someone else to take and run with.

  8. #33
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by oddz View Post
    Sounds like your goals would be best served with a modal window.
    I found that modeless window work for me! Here's a origin page of code:
    Dynamic Drive DHTML Scripts- Modeless Window

    and my code with minor changes:
    Code:
    <script>
    <!--
    function modelesswin(url,mwidth,mheight){
    if (document.all&&window.print) //if ie5
    eval('window.showModelessDialog(url,"","help:0;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
    else
    eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px")')
    }
    
    //configure URL and window dimensions (width/height)
    modelesswin("http://yahoo.com",500,378)
    // -->
    </script>
    
    <body>...
    <a href="javascript:modelesswin('http://yahoo.com',500,378);">Click here</a>
    </body>
    It work now in any browser (IE9, Chrome and FF)
    But now I got problem that popup window load on every refreshing of page! I don't want that. I want to modeless window popup when user click on my flash banner!

    What to change/add in code to make my popup "listen me!"?

    Why window popups on every refreshing of page?
    What part of code above making that?

    hm... this is also cool:
    http://jqueryui.com/demos/dialog/#default

  9. #34
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Gorgoyle9 View Post
    I found that modeless window work for me!
    I wouldn't call that modern - more like prehistoric.

    You have the script wrapped inside <!-- --> to hide it from people using Internet Explorer TWO and Netscape ONE and browsers that were around prior to the release of IE3.

    You have href="javascript: which isn't even proper JavaScript and which can easily break in ANY browser since JavaScript doesn't belong there. You could at least move the code into a stone age onclick= instead.

    If you want to modernise that script into the 20th century you would stop hiding it from browsers no one uses any more and swap it to use event listeners for attaching the JavaScript. To be slightly more modern you'd delete all the references to JavaScript out of the HTML except for a single script tag just before the </body> tag and use JavaScript to attach the JavaScript to whatever it needs to be attached to.

    IE2 is hardly one of the latest browsers so why cater for it with the script. This thread is supposed to be about how to write code for modern browsers so suggesting code that uses obsolete and invalid code is hardly an appropriate response.

    As for eval - well eval is just evil and should never have been a part of JavaScript in the first place. It has NEVER ever been needed and is just a HUMONGOUS security hole.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  10. #35
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Location
    Knoxville TN
    Posts
    2,034
    Mentioned
    65 Post(s)
    Tagged
    0 Thread(s)
    eval has it's place and most all interpreted languages support the statement. Tell me how you would do this without eval...

    Code javascript:
    __parseXMLResponse: function ( r ) {
    		var html = this.getXMLValue(r, 'h');
    		var js = this.getXMLValue(r, 'j');
    		if (js) {
    			eval (js);
    		}
    	},

    The function in question is a callback to resolve a server response to an Ajax request. That response comes in the form of an xml file with two elements - The html to insert and the javascript to execute. The received javascript has to be passed through eval in order to resolve - there's no other way (other than to compose a file with code for every possible server response which is, at best, clumsy).

    This structure allows one javascript function to handle the initiation of most requests to the server I use. The exact details of the response are chosen by the server depending on the outcome of the request. It allows the javascript control logic to reside alongside the relevant php control logic.

    eval gets abused a lot in every language where it exists. I won't deny that. And it is important to be security conscious when using it (though this applies more to PHP eval calls than JS calls since the former take place on your server putting it at risk). But that doesn't mean it shouldn't ever be used nor does it mean that it shouldn't be part of the language.

  11. #36
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You guys gave me bunch of examples how to resolve my problem but I found myself overloaded with info. I now go to jquery (of which I aware badly) and cant find right solution for me it's too much "galleries, boxes which just look nice and doing nothing, badly designed galleries too, user experience "disasters" etc. Jquery requires at least 5 css files which sux if you ask me. Very uncomfortable technique for files structure and folder trees!

    I need:

    1. something to open new window on web page by user on his click!
    2. to can click around on any part of web page and drag window where ever user want!
    3. to can close window on "X"
    4. to can put everything in that window (HTML , flash, video etc)
    5. to not load on every single reloading-refreshing of webpage
    6. to work in any browser


    I need 1 solution! Not thousands please.
    I need simple implementation in existing HTML pages
    I wanna simple folder tree on my website hosting place (not need more than 1 file of js or css or html per "web item, a web page")

    I prefer "bare bone" solutions for "bare bone" systems, in this case my website. So lighter and easier and stable solution would work for me. I asked 1st in my topic creation post something in plain HTML but you guys came with "modern" solutions which making me mess in my files and folder tree.

    Please try post more simple and effective solutions. Universal ones, cross browser and stable if it's possible.


    PS... I'm think I'm starting to hate lightbox "everything blocking behind" solutions!

  12. #37
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,190
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Gorgoyle9 View Post
    .....
    Please try post more simple and effective solutions. Universal ones, cross browser and stable if it's possible.

    PS... I'm think I'm starting to hate lightbox "everything blocking behind" solutions!
    I'm not a big fan of lightbox either. Almost as annoying as a pop-up isn't it?

    Why not just do target=blank ??

  13. #38
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Why not just do target=blank ??
    Declared to be no longer a part of HTML back in 1997 when HTML4 was released. Fortunately very easy to turn off in browsers so as to ensure that absolutely everything always opens in the same tab unless the person viewing the page tells it to open somewhere else.

    If you are going to use popups of any sort then don't forget to use blink on 3/4 of the content and to wrap 3/4 of the content in a marquee. If you are trying to annoy someone you may as well go all out to make sure that you annoy absolutely everyone and not just 99%.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  14. #39
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Go this link { visibility: inherit; } Tools to learn

  15. #40
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by garagedoors View Post
    Go this link { visibility: inherit; } Tools to learn
    ok ill try this: { visibility: inherit; } Accessible Pop-up Window

    EDIT:
    This works only in FF like I want to work... in IE9 and Chrome it opens in next tab!


    I'll think I'm forced to use "new page" solution... but I'm soon will need something for poping up with few pictures on each picture link so I still need solution for other part of my website. Some clean solution for few pictures in popup window. Idk this sux. sorry. I appreciate your help ppl. Thank you for your help all of you!

  16. #41
    SitePoint Guru bronze trophy TheRaptor's Avatar
    Join Date
    Jul 2011
    Location
    New York
    Posts
    710
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gorgoyle9 View Post
    will need something for poping up with few pictures on each picture link so I still need solution for other part of my website. Some clean solution for few pictures in popup window.
    Why not use a lightbox solution?

  17. #42
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by TheRaptor View Post
    Why not use a lightbox solution?
    That is the only option that will actually work in modern browsers.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  18. #43
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by felgall View Post
    If you are going to use popups of any sort then don't forget to use blink on 3/4 of the content and to wrap 3/4 of the content in a marquee. If you are trying to annoy someone you may as well go all out to make sure that you annoy absolutely everyone and not just 99%.
    ... and they call me snarky on stuff like this.

  19. #44
    SitePoint Guru bronze trophy TomB's Avatar
    Join Date
    Oct 2005
    Location
    Milton Keynes, UK
    Posts
    989
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Michael Morris View Post
    eval has it's place and most all interpreted languages support the statement. Tell me how you would do this without eval...

    Code javascript:
    __parseXMLResponse: function ( r ) {
    		var html = this.getXMLValue(r, 'h');
    		var js = this.getXMLValue(r, 'j');
    		if (js) {
    			eval (js);
    		}
    	},

    Code javascript:
    var js = 'alert("Test");';
    var script = document.createElement('script');
    script.src = 'data:text/javascript,' + js;
    document.head.appendChild(script);

    But it's a dubious method of avoiding eval and will lack the browser support. (Or use window.location.href = js; but I believe that will limit the number of characters you'd be allowed)

  20. #45
    SitePoint Enthusiast
    Join Date
    Sep 2011
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRaptor View Post
    Why not use a lightbox solution?
    I maybe use it cause I really need to show some pictures of works of company for their each client logo (picture link). Only way so far I see to make it... is to use Lightbox solution but I'm afraid I will confuse that web page visitors/users. That Lightbox's blocking is annoying.

    I still would like to find clean popup crossbrowser solution like was before and worked well.

  21. #46
    SitePoint Guru bronze trophy TheRaptor's Avatar
    Join Date
    Jul 2011
    Location
    New York
    Posts
    710
    Mentioned
    40 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Gorgoyle9 View Post
    is to use Lightbox solution but I'm afraid I will confuse that web page visitors/users. That Lightbox's blocking is annoying.
    Why? What do you mean by "that lightbox's blocking is annoying"?

  22. #47
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Gorgoyle9 View Post
    That Lightbox's blocking is annoying.
    A lightbox is the only sort of 'popup' that the popup blockers DON'T block.

    The lightbox can appear however you want it to appear because it is simply another part of the same web page that you have set to 'popup' in front of the other content. There are hundreds of different lightbox scripts that people have written ands each works slightly differently depending on how they wanted their popup to function. The only restriction is that you have to do it within the same web page instead of trying to create a new page.

    So there isn't any type of 'blocking' that can be annoying you if you use the appropriate lightbox script to suit your needs.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  23. #48
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,190
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I interpreted Gorgoyle9's "blocking" to mean something like "steals focus" or "must be closed to continue navigating the page".

    I didn't know there were flavors of lightbox not like that, which is why I suggested simply inserting the mark-up into the DOM - something like a "click here, open the accordian".

    As for having something like the old days, who knows? The way HTML5 crosses the boundaries of presentation and behavior maybe by the time it's primetime there'll be a <popup> tag

  24. #49
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by felgall
    If you are going to use popups of any sort then don't forget to use blink on 3/4 of the content and to wrap 3/4 of the content in a marquee. If you are trying to annoy someone you may as well go all out to make sure that you annoy absolutely everyone and not just 99%.
    Not always true. I am building an admin UI and the people that will be using it requested a pop-up for things just so that they could easily access information and come back without reloading the page. This is only one single case, but there are times they can increase useability, especially when requested by the users them self. Oh… and before you say a modal could be used the information being provided in the pop-up is large data set of reporting information that can not be paginated for various system limitation reasons.
    The only code I hate more than my own is everyone else's.

  25. #50
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,836
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by oddz View Post
    Not always true. I am building an admin UI and the people that will be using it requested a pop-up for things just so that they could easily access information and come back without reloading the page. This is only one single case, but there are times they can increase useability, especially when requested by the users them self. Oh… and before you say a modal could be used the information being provided in the pop-up is large data set of reporting information that can not be paginated for various system limitation reasons.
    If they want to REQUEST that something open in a new tab or window then all they need do is right click on the link and select where they want it to open. No action whatever is required on the part of the web page author as anything that you add to the web page will just REDUCE the options available to your visitors unless they disable whatever you have done.

    So YES it is always true that the page author should NOT try to force a page to open in a specific place.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Tags for this Thread

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
  •