Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newb Question regarding Pop Ups

    Hello Everyone,
    I hope that I am posting in the right place.
    I have searched the net for various examples but have not found one that seems to work in my page. My boss wants me to create a pop-up whenever users enter my homepage. I had an alert, but she wants the pop up to go directly to a specific page. In this case, the person will log on to my homepage, and immediately get a pop up that takes them to my chatroom. Can anyone be of help to me in the right coding to make this happen? The site does have a lot of limitations that we are able to do, so as basic as possible is the way to go.
    Thank you very much.

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    I'd recommend against doing that. It would happen every time that page loads, even if you're already logged on.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,309
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Happily, modern browsers block unrequested popups.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #4
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Exactly Wolf. That is what my boss wants. I will turn the popup on when I am in the chatroom so that everytime a student clicks comes to my homepage, they are automatically funneled to my chatroom. This gives a better chance they may actually come.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,613
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    So why is there a problem? How do they popup the chatroom now? Can't just just clone or move that code to the front page of the site and always trigger it?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Old Pedant,
    Currently students have a a basic link on the homepage in which they click to come to the chatroom. However, attendance has been low, in part due to avoidance, in part due to them not paying attention to what time the room is open. We would like to semi-force" the student into the chat room when the open the homepage during times that I am in the chat session. I will have to manually insert and delete the code everyday, but it is what my boss wants us to try. I, unfortunately haven't been able to find a script that's working for me as I'm just a novice.
    I was using an alert box thatsaid hey it's open come in. But, since that doesn't seem to be having much effect, she wants them to go directly there from the homepage.

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,613
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    You didn't answer the question. Why can't you simply invoke the same code that opens the chatroom (manually) as part of the startup code on the home page?

    And if the problem is that you need to do that only when a given person (you?) is logged in, then you will have to use AJAX to solve it.

    But so far, we don't even know if your Chat code is JS-based or is something else entirely. If you want help, you have to show details, which probably implies showing code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #8
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My apologies for not being more specific.
    Here is how it works now. A student clicks on my classroom and is taken to my homepage. If they choose to enter the chat they click on a url link on my homepage. They are directed to a url page which asks them to sign in. The sign in then loads the chat. What I need is to have a pop up that immediately shows that log in url page in the pop up window. I have a script that currently opens a new window of a page that I created with the url link on it. That is great except the student still has to click that link to be taken to the chat log-in url, which most don't do. I know, the thought is hey, if they don't click on the link to login, what will make them actually put their info into the log in page instead, i'm skipping only one step right? Well....forget logic here, this is administration and they don't use it, they just want stuff and hold the peopns accountable when it isn't done verbatim.
    So, I need the code to open a window immediately upon entering my homepage, and that window will be the url page which allows a student to enter their log-in information.
    This would be simnilar to say, going to my homepage and immediately a new window with the historychannel.com opening up for them.

  • #9
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,309
    Thanks
    203
    Thanked 2,563 Times in 2,541 Posts
    Quote Originally Posted by Tertius81 View Post
    So, I need the code to open a window immediately upon entering my homepage, and that window will be the url page which allows a student to enter their log-in information.
    This would be simnilar to say, going to my homepage and immediately a new window with the historychannel.com opening up for them.
    As I have already mentioned, modern browser block unrequested popups. As you say, the user must click on a link to activate the popup.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #10
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    3,020
    Thanks
    56
    Thanked 566 Times in 563 Posts
    I think the key words here are "show some code".

    Specifically, what is the code that is triggered by the click on the link to open the popup? It's either going to be in the onclick of the <a> tag or (in case of ancientness) in the href.

    second thoughts, just show us the link. That's as good a place to start as any.

  • #11
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,613
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    Yes, at this point we are all guessing in the dark. No code, no help.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •