Solved

How-to Launch a Popup Window to another webpage

Posted on 2008-10-30
8
883 Views
Last Modified: 2010-08-05
Hello Folks,

I've been working on this issue for several days and I have tried all sort of code snippets but so far nothing is working, it really shouldn't be this difficult to launch a popup window from a transparent button within Adobe Captivate 3.

Here's what I've tried so far:
getURL('javascript:window.open("index.html","windowName","menubar=no,address=no,width=1024,height=825,toolbar=no");void(0)')

I've also tried
window.open("index.html","windowName","menubar=no,address=no,width=1024,height=825,toolbar=no");

and this:
'javascript:window.open("index.html","windowName","menubar=no,address=no,width=1024,height=825,toolbar=no");

I am also trying a different approach by only setting a variable with the button and doing the rest on the webpage side of it. I am settting a variable on the button like this:
identify("launch_button");

and then writing a function to inside the webpage that I got from an example I saw on the web that uses the Super Mario Brothers...

Adobe Captivate doesn't go a very good job with its Javascript support for buttons. Here is the function I am adding to the head section of the HTML page that Captivate creates after publishing the content:

                  function identify(person){
                        var feedback = document.getElementById("feedback");
                  switch(person){
                  case "launch_course" : window.open("index.html","UDDI Webservices","menubar=no,address=no,width=1024,height=825,toolbar=no");
                  break;
                  case "launch_navigation" : window.open("navigation.html","How To Navigate This Course","menubar=no,address=no,width=1024,height=825,toolbar=no");
                  break;
                        }
                  }

So far nothing but bad luck with what I've tried so far....any ideas?

Thank you,

Milo Dodds
0
Comment
Question by:Milo_Dodds
8 Comments
 
LVL 21

Expert Comment

by:silemone
ID: 22845337
maybe it's your switch statement...make sure person is being passed...use alert(person) and in other places where you think the problem may be occurring...
0
 
LVL 82

Expert Comment

by:hielo
ID: 22845353
did you try onclick:
<input type="button" value="Go to page" onclick='window.open("index.html","windowName","menubar=no,address=no,width=1024,height=825,toolbar=no");'/>

Open in new window

0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22847446
"So far nothing but bad luck with what I've tried so far....any ideas?"

Sure, try what you are doing, including above comments OUTSIDE of adobe captiva.  If you find they work, then you have to suspect some particular quirk in the adobe software -- which would hardly be surprising
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:Milo_Dodds
ID: 22847483
Yes I am thinking that this is a Captivate issue and not really a Javascript issue. I got a hold of some code from another website dedicated to e-learning and I am testing out various examples. It appears that the author's solution uses Captivate in just setting a variable once the button is clicked and the rest is being done via the Javascript sitting in the .html page. What complicates matters is that there are quite a few other Javascript functions written that support the AICC communication back to the learning management system that is used to track completion of the course content...I suspect this code might be making it extra difficult in making my function operate. I was thinking the same approach, start with something easier and then start adding the complexity of other pieces to find where things are breaking. This is the divide/conquer approach to basic troubleshooting 101. I will keep you all posted on when I get this thing figured out. Thanks for the support so far...at least I know what my next step ought to be.
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 22847545
"start with something easier and then start adding the complexity of other pieces to find where things are breaking. This is the divide/conquer approach to basic troubleshooting 101"

Yes, but that is an awful lot of work for you.   I would suggest you contact the people who make this e-learning software and tell them the problem.  Also tell they you don't have time to "discover" all the gotchas and problems in their software -- it could take you months -- tell them to have their lead developer call you and sort it out.  Otherwise you can grow old and gray trying to reverse engineer their debacle !!
0
 

Author Comment

by:Milo_Dodds
ID: 22847655
Ok I figured it out....the code I was using also needs to have the swfObject.js included in a directory called scripts. Once I added this and the calls to it then things work on my simple sample (a simple Captivate file and a single click box). I am sure this is the issue because I was having the same problem with my simple example as I was having with my real code....now I am going to go back to the real code and make the changes. Thanks everyone for your help. I am going to give "Scrathboy" the solution since his was the closest thing to the right answer...but I really appreciate everyone's help and maybe I can return the favor someday....ask me about accessibility support and compliance...I've got more knowledge there.
0
 

Author Closing Comment

by:Milo_Dodds
ID: 31511856
Thank you for the encouragement and helping me down the right troubleshooting path. I finally got my answer by breaking the problem into smaller testable pieces.
0
 

Expert Comment

by:rlcrews
ID: 23167978
Hello,

I ran into a similar issue. I have used the following code which has allowed a button to open a new pop-up window with content without redirecting the parent page

window.open("http://www.msn.com","windowName","menubar=no,address=no,width=1024,height=825,toolbar=no");void(0)

be sure to have the target set to current.

Hope this helps

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question