Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-04-2012, 07:49 PM   PM User | #1
Tertius81
New to the CF scene

 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tertius81 is an unknown quantity at this point
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.
Tertius81 is offline   Reply With Quote
Old 10-04-2012, 08:40 PM   PM User | #2
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 941
Thanks: 7
Thanked 95 Times in 95 Posts
WolfShade is an unknown quantity at this point
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".
WolfShade is offline   Reply With Quote
Old 10-04-2012, 09:08 PM   PM User | #3
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
Philip M is offline   Reply With Quote
Old 10-04-2012, 11:22 PM   PM User | #4
Tertius81
New to the CF scene

 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tertius81 is an unknown quantity at this point
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.
Tertius81 is offline   Reply With Quote
Old 10-04-2012, 11:45 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Old 10-05-2012, 01:01 PM   PM User | #6
Tertius81
New to the CF scene

 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tertius81 is an unknown quantity at this point
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.
Tertius81 is offline   Reply With Quote
Old 10-05-2012, 07:00 PM   PM User | #7
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Old 10-08-2012, 04:32 PM   PM User | #8
Tertius81
New to the CF scene

 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Tertius81 is an unknown quantity at this point
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.
Tertius81 is offline   Reply With Quote
Old 10-08-2012, 04:56 PM   PM User | #9
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,033
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
Philip M is offline   Reply With Quote
Old 10-08-2012, 04:56 PM   PM User | #10
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
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.
xelawho is offline   Reply With Quote
Old 10-08-2012, 09:06 PM   PM User | #11
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
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.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:36 PM.


Advertisement
Log in to turn off these ads.