Reload Page using Javascript
I developed a Captivate 8.01 project and I'm using Moodle as LMS.
I need to "Reload" the main web browser page when I Exit the project, so I tried using this JavaScript code: "location.reload(true);" but is not working.
Should I use the Captivate Common JS interface to run this code, and if true, how do I do that (how do I implement it)? Thank you.
I tried both but it didn't work. Wondering if changes to the Captivate html file are correct.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright [2012] Adobe Systems Incorporated. All rights reserved -->
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="captivate.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FRA 218 - Engineering</title>
<!-- Include external JS files -->
<script language="JavaScript1.2" src="standard.js" ></script>
<script language="JavaScript1.2" src="scormdriver.js" ></script>
<script language="JavaScript1.2" src="SCORM_utilities.js" ></script>
<script language="JavaScript1.2" src="Utilities.js" ></script>
<script language="JavaScript1.2">
//Register event handlers
window.onkeypress = CheckForDebugCommand;
window.onload = OnloadActivities;
window.onbeforeunload = DoFinish;
window.onunload = DoFinish;
blnDebug = false ;
</script>
</head>
<body bgcolor="#f5f4f1" onUnload="window.opener.location.reload();">
OR
<body bgcolor="#f5f4f1" onUnload="window.opener.location.href = window.opener.location.href;">
<div id = "CaptivateContent">
<noscript>
This course requires JavaScript to be enabled in your browser.
Please enable JavaScript, then relaunch the course.
</noscript>
</div>
</body>
</html>
Similar Messages
-
How to show modal window without popup in a web page using javascript
Hi,
How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
pls help me.....Thanx for ur reply,
Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page... -
Controlling shockwave content (dcr) from a web page using javascript
Hi,
Is it possible to control shockwave content (dcr; object="application/x-director") from a web page using javascript?
I believe this is possible using 'FSCommand' in Flash...
I'd like to use HTML to do something like:
- html_object[1].go(10);
to send playback to frame 10.
Thanks.
MarkSean,
Thanks - this is exactly what I was looking for.
'Shockingly' difficult ( pun intended :-)
Someone really put in some effort on this.
Very creative solution, putting a flash ( swf ) component in a director project and communicating indirectly through the flash element.
Apparently, Javascript can communicate with the SWF file & the SWF file can communicate with the DCR file, but it is not possible to have Javascript communicate directly with the DCR. Too bad.
After looking over this example I think I'll rethink my project.
Thanks again.
Mark -
How to Redirect to another page Using JavaScript in ADF Faces?
Hi Guys,
I have a UI user case that has a af:menu which contains mutiple af:goMenuItem. When user click on the menu, the menu slides down and shows up the af:goMenuItem. As we know, you could define the page destinations in af:goMenuItem to go to another page when user clicked, but af:menu itself cannot be redirected to another page. Well, the user case wants the menu itself could be redirected if user click on it.
So I am thinking using JavaScript to do this: when the af:menu gets clicked, redirect to another page. BUT, I looked over the ADF Faces Javascript API and was not able to find that piece of code to do this. Any help???
Another work around for the user case scenario is to use HTML marks + CSS/JavaScript instead of af:menu and af:goMenuItem but this changes the scope of technology although it's not hard to do
Any other idea to accomplish the user case other than what I could think of ?
Thanks Guys!
JayHi,
1 - you can have a hidden command item to do the navigation based on a control flow case. In this case, you access the command component from JavaScript create a new ActionEvent and queue it
2 - JavaScript can use an af:serverListener to call into a server side managed bean method to perform the navigation
there is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event driven framework and we don't support developers fighting the framework.
Frank -
I am using windows authentication in my web application.
My requirement is to implement a sign out button which will sign out the user without having him to close the browser and application should not ask him to login again.
I tried following two options:
1. Redirecting the user to default signout.aspx page " /_layouts/15/SignOut.aspx "
2. Using "Sign In as a different user" URL " /_layouts/15/closeConnection.aspx?loginasanotheruser=true "
In first case, user is redirected to default sign out page but he can press "Go Back to Site" link to revisit the site. Another major issue is that the user has to close the browser to sign out from the application completely, which is not desirable
in my project requirement.
In second case, the the current user is signed out of the application but if the user has saved the password in browser, he gets signed in automatically to the application.
I also came across the solution where we replace the default sign out page with a custom sign out page, but I am not sure whether it can be implemented using JavaScript Client Object Model of SharePoint.Hi
I'm basically looking for the exact answer for the query.
Meanwhile you need to go through the link mentioned below in order to understand how to do it.
Debugging and Logging Capabilities in SharePoint 2010
Indul Hassan
Microsoft Community Contributor
http://www.indulhassan.com
You Snooze.. You Lose !! -
Modifying a pdf page using Javascript
Hi all,
- I am having an html report that consists of many html pages.
- Each page of these html pages contains a table or more, in addition to some buttons that hides/display specific rows in these tables. And these buttons are programmed using Javascript.
I would like to convert these html files to a single pdf file.
My question is: If I converted the report to html, will my buttons work. I mean will my Javascript buttons hide/display table rows in the pdf pages ?
Thank you,
MoustafaEven though there is some common objects, properties, and methods between Web JS and Acrobat JS, Acrobat uses some very unique objects, properties, and methods so there is no straight forward conversion possible. You would need to rewrite much of the JS and make form fields that could be manipulated. Also Acrobat makes static forms, so no dynamic re flowing of content would be possible.
-
To know the Status code of a HTML page using Javascript
To know the Status code of a HTML page using Javascript
Hello,
I am not sure to understand, which status are you talking about? The HTTP Status?
If your javscript is executed it is more or less sure that the HTTP Status is 200 since the request is back to the browser.
or are you talking about this is in the context of a XMLHTTPRequest call ?
Regards
Tugdual Grall -
HOW TO KEEP TEXT AT BOTTOM OF PAGE USING JAVASCRIPT-ANSWERED
UPDATE 5/12/2006: MORE COMPATIBLE CODE:
Was using OnRequestEnd.cfm to load copyright info at bottom
of each page but page size varied and copyright info would appear
at different points on different pages. Didn't look good. Could not
use tables to align the text for output reasons. Coded a way using
CSS and JavaScript to keep text at bottom of each page. Be careful
with CFFORM, us have to set the attribute 'wMode=transparent' in
CFFORM so text is above form. Tested in IE and Netscape. Put at end
of individual templates or inside OnRequestEnd.cfm - Enjoy!
(css goes in your external css file or between local style
tags)
.copyright{background-color:#d8d8d8;color:Black;font-size:10px;font-family:Arial;width:10 0%;text-align:center;}
body {border-bottom-width:0px;}
(following goes at end of page or in OnRequestEnd.cfm)
<span id="x" class="copyright">
my copyright
</span>
<!--- *** KEEPS COPYRIGHT LINE AT ABSOLUTE BOTTOM OF EACH
PAGE --->
<script>
if(document.body.scrollHeight <
document.body.clientHeight){
var s = 0;
document.getElementById('x').style.cssText='position:absolute;bottom:'+s+';';
else {
var s = document.body.scrollHeight;
document.getElementById('x').style.cssText='position:absolute;top:'+s+';';
</script>To change it for a given text frame, the frame must be selected when you execute the menu command.
AlyMcF1 wrote:
…how can I apply this to the majority (400+) of my text frames at once?
To change the setting of existing frames throughout your document, use Edit > Find/Change.
Choose the Object tab.
Set the Search: field to Document.
Set the Type: field to Text Frames.
If there is a formatting attribute common to all the text frames you want to target and change, click the glass/frame icon next to the Find Object Format field to access the Find Object Format Options dialog and set that common attribute.
Click the glass/frame icon next to the Change Object Format field to access the Change Object Format Options dialog and set the Align: field to Justify under Basic Attributes > Text Frame General Options > Vertical Justification.
Step through the Find Next/Change sequence to selectively apply the change, or click the Change All button if you're certain you want all the found frames changed. -
Can I make an Imageboard in a HTML page (using JavaScript)?
Hello all.
Just like to say that this is my first post on the Adobe forums!
Anyways, I've started a website project in Dreamweaver CS6 (full version) and will probably be using Photoshop (CS6) for some parts of the site too. It's gonna be pretty basic but I want to make an imageboard (with JavaScript? I'm not sure...) where users who have logged in can post an image on the feed with a comment/caption to go with it.
How can I do this? Can anyone point me to a good tutorial on how to make this? Do I do it with JavaScript on the HTML page? (P.S. I am mildly experienced with HTML).
Thanks in advance!Unfortunately, there isn't anything in DW that can do this type of thing for you, although if you were to learn php and mySQL you definitely could use DW to create a site with those types of features.
There's actually quite a bit that goes into that kind of thing, more than just basic code, you need to think about security especially if you plan to allow someone to upload files, potentially infected with viruses, to your server.
If you're talking about creating a basic forum (being able to start topics, post pics and comments), there are a lot of free and paid solutions available online. Certain hosting companies even give you basic forums you can add to your site by following the instructions on their pages.
Unless you have a lot of time on your hands to learn all the ins and outs of PHP and the security necessary to keep your site and server safe, I'd suggest going that route. -
Inserting a library item on a page using Javascript
Hello,
I have a library with 6 different layouts in it. I need to be able to place these on the page from an external program. I have all my code in place to send commands to Indesign, but I'm not sure how to reference the Library items. Can I reference them by name? As well, I would like my external custom app to be able to list all the library items so that the user can select which one to insert. I'm at a total loss as to how to do this.
I need help with these two things:
1) obtain an array or list of all the items in a particular Library, which is already open.
2) Once I have the list of library items I need to be able to place one or multiple on the page keeping track them so I can place images and text in the appropriate boxes.
Any help with this would be greatly appreciated. I'm using Indesign CS3 and my external app is coded in Objective-C on a Mac. I prefer Javascript as I'm very familiar with it as opposed to Applescript.
Thanks for any help provided.
Dave WilliamsAssuming you have access to the equivalent of doScript, when that is used to run a JavaScript, the final value of the script is returned (coerced to a string? I'm not sure).
Of course, you can always pass information from one place to another by using keyed labels. In my work (I spend most of my time writing scripts for Typefi Publish wherein the same script might get executed at the end of every page as the Typefi Engine composes the document), I often will add a keyed label to the document that passes information from one run of the script to the next. Here's an example (that includes reading the script itself to extract version information from the second line) -- while slightly inefficient, it has the benefit of putting the version info in a defined, easy to find place:
function registerFirstCall(aDoc, interactive) {
var scriptFile = getScriptPath();
var scriptName = scriptFile.name;
if (aDoc.extractLabel(scriptName) == "" || interactive) {
scriptFile.open("r");
var firstLine = scriptFile.readln();
var secondLine = scriptFile.readln();
scriptFile.close();
if (secondLine.indexOf("//VERSION: ") == 0) {
var msg = secondLine.split("//VERSION: ")[1].split("\n")[0];
} else {
var msg = "unknown";
aDoc.insertLabel(scriptName, "Registered");
TPSlog(scriptName + " version: " + msg, interactive);
}// end registerFirstCall
Ah, I see it uses the getScriptPath function, so for completeness, here it is:
function getScriptPath() {
// This function returns the path to the active script, even when running ESTK
try {
return app.activeScript;
} catch(e) {
return File(e.fileName);
} // end try
} // end getScriptPath
The TPSlog function either pops up an alert (when working interactively -- usually means during debugging) or adds a log message for the session (that also is managed with a document keyed label). The keyed label in this case is performing the trivial task of recording that the script has previously been run against this document, in which case, it doesn't need to log a message identifying its version info.
Hope this helps.
Dave -
Conditionally Hide Dashboard Pages using Javascript.
Hi, I would like to share a small logic i developed to Conditionally show or hide Dashboard Pages based on a Repository Variable.
In the last few weeks we noticed that the ETL jobs scheduled everyday were failing due to various obvious reasons. As a result, Our Dashboard are greeting the users with "No Data to Display Messages". Most of our Sales Dashboards are defaulted to show business health as of yesterday (Sysdate -1). If ETL scheduled everyday at 3 am failes, then the Dashboards show no data. Emails from Users, etc. etc........
For a few days we were manually trying to post some messages on Dashboard something like "Please come again, Our Data for yesterday is not yet loaded........".
I thought it would be nice to hide the Dashhboard Pages automatically, rather than manually posting a message whenever data outage or etl job failure occures.
To do this, I
1. Identified the table that the ETL folks update at the end of every job. This table has a column to say the status of the load (Successful, UnSuccessful) and also a date column to show the most updated load date and timings.
2. Created an Initialization block that would go fetch the most recent loaded date and status of the load values. I set this block to fire every 5 minutes.
3. Created a report with a Date Column and a bogus columns with FX set as the Repository Variable for Load Status. Added filter on the Date as = the repository variable for Load Date.
4. In the Narrative View of this Report, I added the following JavaScript.
In Prefix section:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
var curTable = document.getElementsByTagName("table");
In Narrative Section:
var cFlag = "@2";
In Postfix Section:
if (cFlag == "UnSuccessful"){
for (var i = 0; i < curTable.length; i++) {
if (curTable.className == "PageTable") {
curTable[i].style.display = 'none';
/*var curBody = document.getElementsByTagName("body")[0];
var newTable = document.createElement("table");
var newTBody = document.createElement("tbody");
var newRow = document.createElement("tr");
var newCol = document.createElement("td");
var curMessage = document.createTextNode("Data for this dashboard is currently unavailable due to the daily load process." + '\n' + "Sorry for the inconvenience.");
newCol.appendChild(curMessage);
newRow.appendChild(newCol);
newTBody.appendChild(newRow);
newTable.appendChild(newTBody);
curBody.appendChild(newTable); */
alert("Data for this dashboard is currently unavailable due to the daily load process. Please check back shortly." + '\n' + "Sorry for the inconvenience.");
</script>
</head>
<body>
</body>
</html>
Note: I originally wanted to post the message on the Dashboard, but there are some issues with IE 7, with appendChild method. But it works fine with FireFox. So I did not wasted any time on Javascript Errors, rather just had an alert message, that basically does the job i need. I mean tell the users about the ETL Status.
5. Finally I added this report in the Dashboard. Key point here is the above report should be added in the Lower Column. I mean if there are six Dashboard COlumns aligned as 2 Columns X 3 Rows, I added the Narrative Report on the 5th or 6th Columns.
When the load status is unsuccesful, the narrative report will hide the Dashboard Sections and shows a message to the users.
Thanks
Sai
Edited by: Sai Kumar Reddiboyina on Sep 23, 2009 5:51 PM
Edited by: Sai Kumar Reddiboyina on Sep 23, 2009 5:51 PMHi Turribeach, the reason i set it as "Answered" because, I have found the answer by myself and wanted to share with others.
Also,
Guided Navigaion is very expensive in terms of performance and I am talking about at least 8 to 10 answer requests per page here.
Thanks
Sai -
Using cfselect onBlur to reload page using a Flash form
I am having trouble trying to get <cfselect onBlur=""> to work inside of a <cfform format="flash"> using Flash. As soon as I put any value into the quotation marks, the Flash form no longer displays.
The current code I have using your syntax is the following:
<cfset thisPage = "http://#cgi.server_name#">
<cfif len(trim(cgi.server_port))>
<cfset thisPage ="#thisPage#:#cgi.server_port##cgi.script_name#?#cgi.query_string#">
<cfelse>
<cfset thispage ="#thisPage##cgi.script_name#?#cgi.query_string#">
</cfif>
<cfform name="fQuiz" preloader="false" format="flash" height="750" preservedata="yes">
<cfselect query="qDescriptionsByInteraction" name="description" id="s3" display="MEDIABITNAME" value="MEDIABITID" width="200" label="Description (video):" onChange="getURL('#thispage#')"></cfselect>
</cfform> -
Indesign grep search on page by page using javascript
Hi,
Is it possible to grep search a word page by page instead of searching in whole document..
If it is possible, please suggest how to do this.
Thanks,
GopalHi Gopal,
You can't search directly in page. Instead you can search by pages[n].textFrames[x].texts[0].findGrep().
Regards,
Ramkumar .P -
Hi all,
can anyone give me an idea on how to reload page in java?hi 7stud,
thanks for your reply.
i know html, css, servlet and JSP.
and i did a reloading page used that language.What does "i did a reloading" mean? Servlets respond to client requests. What did the user do that caused a request to be sent to the server? What did your servlet do in response?
there is a pop-up msg asking to retry sending the
information.When, what, where?
after click OK then it loaded the new
scheme.
i just want it reload the page without asking for
sending the information.
may be it is because the javascript..(i think)
function refresh(){
parent.frames['top'].location.reload();
alert("Personalisation changed successfully.");
6) javascript
Javascript functions don't do anything unless they are called, so that js code does nothing. -
How to redirect from list edit form to another page using jquery in sharepoint 2013
hi friends i have been trying to find a way to redirect from list edit form to another page using javascript and jquery
i found lot of codes online but non of them are working for me.
what i need is i have to save the data in the form and after that it has to redirect to another page. it has to get the url from hyperlink field of the item.
please help me in this regardsNot sure if you have gone through below links:
http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPRedirectWithID
http://blogs.askcts.com/2013/02/18/using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/
Please ensure that you mark a question as Answered once you receive a satisfactory response.
Maybe you are looking for
-
How do i use my account if i don't have a credit card
i live in a location where credit cards are almost not used except for super rich people and corporations and i need to update my stuff. how is that going to work???
-
I've had this ipod for almost a year now and a few months ago my autoplay suddenly stopped working on both my laptop and my desktop. Laptop runs Vista (and is where my ipod is synced) and the desktop is Windoes 7. Since it still syncs fine I've been
-
Question about Portege 2000 boot with Linux
Hi everyone, My Portege 2000 PIII 750MHz, 512 RAM, 20GB is simply driving me mad. I would like to try to install Linux, and have downloaded some distros to try it. The point is I am using an external CD/DVD reader, with a 16 bit pc card connector cab
-
I purchased a song on my iphone,, how do i set it as my ringtone?
i purchased a song on my iphone as i want it as my ringtone,,, does anybody know how to do this?
-
Differences between VMware and Oracle VM
Hi guys, I am sure that some people have used VMware and moving to OVM or vice versa. I am curious to get some feedback resulting from comparing both products -VMware and OVM- (pros and cons). I am preparing some documentation so I thought of getting