/    Sign up×
Community /Pin to ProfileBookmark

Hello,

I don’t really know anything about javascript but its done some great things for me on my site already.

I was wondering if you can use js to open up a popup window that has no address bars or title bars on it. And that has x-width and y-height.

Thanks.

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@fredmvMar 30.2004 — You can, though it isn't recommended due to accessibility reasons. The most accessible way to do it would likely be something like this:<a href="foo.html" onclick="window.open(href, '', 'height=300,width=300,scrollbars');">bar</a>This way users in which do not have support for JavaScript will go to the page as they normally would, and users with JavaScript get the page to open in a new window. Note, however, that many users find new windows opening annoying and it would make a lot more sense to simply open the page as you normally would within the browser.
Copy linkTweet thisAlerts:
@stophon4Mar 30.2004 — or you could just make a plain popup that you don't have to have to click on for

window.open("whateverthenameis.htm")
Copy linkTweet thisAlerts:
@fredmvMar 30.2004 — [i]Originally posted by stophon4 [/i]

[B]or you could just make a plain popup that you don't have to have to click on for[/B][/QUOTE]
Two things to note about that method, however:[list=1]
  • [*]Real browsers will block the unrequested pop-up.
  • [*]It will become much less accessible to non-JavaScript users.
  • [/list]
    Which is why it's more practical to use the kind of method in which I suggested.
    Copy linkTweet thisAlerts:
    @steelersfan88Mar 30.2004 — it wouldn't, but this might be, depending on use:window.open(href, '[color=blue]_blank[/color]', '...')fred knows what this does, I'm sure but to the original poster: this simply makes sure that a new window is opened every time. If you want it to open in one window, then give it a descriptive name so it won't go over unintended windows ?
    Copy linkTweet thisAlerts:
    @DraikeauthorMar 31.2004 — Well, it sounds like popups aren't the best way to go.

    Would there be some other way that I could go about displaying the text?

    Displaying it in the main window doesn't sound so good because there will already be lots and lots of other text on the page.

    Something that you can click and close like a window but that's not a popup I guess.

    thnx.
    Copy linkTweet thisAlerts:
    @VladdyMar 31.2004 — You would just have to add the "close" button ? :

    www.vladdy.net/WCA/wintest.html
    Copy linkTweet thisAlerts:
    @stophon4Mar 31.2004 — I suggest a alert.

    Like this:

    alert("What ever you want it to say")

    very very simple and no browser (that I know of) blocks them ?
    Copy linkTweet thisAlerts:
    @DraikeauthorApr 01.2004 — Those window things don't work for me. I put them in but they do't work.
    ×

    Success!

    Help @Draike spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.18,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...