Javascript Error Handler:
I have developed a javascript(.js) for illustrator. I need to know how to handle the error handler in javascript for illustrator. Kindly advice me.
Did you look in the reference file? It contains detailed explanations with examples.
After doing so, if something is still not clear, reply here and be more specific about what it is exactly you want to achieve.
Similar Messages
-
Configuring the ADF Javascript error handler
I've noticed that ADF has a default Javascript error handler which seems to swallow all Javascript errors. Now this is a problem since all errors disappear into this logger system.
How can I get this logger to write error messages to the Firebug console?Hi,
please read page 23 onwards of: http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
Frank -
Help with Javascript error in event handler slowing animation down.
Hi all--
I did an animated book cover for my publisher, Baen Books, but an error keeps coming up in my animation. The actual animating can be viewed here:
http://baen.com/310x204/A_CallToDuty.html
As you can see, when the error pops up, the animation grinds to a halt, an it has to recover. I am not well enough versed in javascript to know what is going on. The error code below repeats over and over again as it plays.
6Javascript error in event handler! Event Type = timeline edge.3.0.0.min.js:171
3
<error> VM26:184
Javascript error in event handler! Event Type = timeline edge.3.0.0.min.js:1714Javascript error in event handler! Event Type = timeline edge.3.0.0.min.js:1713
<error>
If anyone has an idea what is causing this, I would be extremely grateful for any help.
David MattinglyHi Hemanth--
I put it in a dropbox folder for you here:
Dropbox - EdgeAnimation
This contains 2 versions--a small one for the preview, and then a larger one when people click on the cover preview. Thanks in advance for your help.\
David Mattingly -
Site
Hello everyone. I get an error in my chrome cosole, what can I do about this?
I dont have this problem in all browsers, just in chrome, and in some versions of Firefox.
The problem occurs when I click any label in the iframe (see website, speaks for itself).
line 5838 window.console.log("Javascript error in event handler! Event Type = " + eventType);
does anyone know how to fix this?
And why do I only have this problem in some browsers?I basically want the labels in the Iframe to make the parent page animate to a specific anchor tag.
ps. This is what I posted on the jquery forum as well:
I tried to do this by letting the iframe .trigger a .click to a button on the .parent page.
I did this in two ways.
one: the click is triggerd in (/by) the iframe
two: the click is triggerd by a script in the parent window, that script is launched by the iframe
Here's the thing:
this is what one of the <a>'s that the iframe will click looks like:
<a class="nonblock nontext anim_swing" id="u185" href="index.html#contact"><!-- simple frame --></a>
The code is generated by adobe muse which has a function to smoothly scroll to a location on the page, and I am guessing the "anim_swing" class takes care of that.
I would like the colorful labels in the iframe to do the same thing as the <a> above.
and it works in some browsers on some computers but somehow not on all of them (with method two the adblocker doesn't seem to be an issue ).
I also tried to let the parent page scroll directly with the jquery .scrollto function. That did not work either (see the jquery forum). -
Javascript error in event handler event type = timeline
Hi,
I have a small EdgeAnimate projekt with version 1.5.0 and the local export works fine... I must include the package at a CMS and I update all paths to absolute paths and all files are loading...
but I the animation dont play - I see at the javascript console the follow output
javascript error in event handler event type = timeline edge.1.5.0.min.js:143
Springender Punkt: Rettungswagen - Der springende Punkt
I dont found any solution... :-((Hi Scott,
I have gone through your shared composition created in older verion of Edge.
If you open the older composition html page in browser, there already have some of the error messages in the console as you mentioned above like
Javascript error in event handler! Event Type = timeline.
And as you said with the latest Edge, when you upgrade the old composition, some new error messages gets added to the existing ones.
As in the latest Edge, the whole of runtime has been shake-up, some of the attributes has been removed and are added in different way.
Example: To access timelines of a symbol:
Old way: sym.timelines['Default Timeline']
New way: sym.data[sym.name].timeline
You need to make some modifications in index_edgeActions.js file like:
1. Search & Replace "timelines['Default Timeline']" with "data[sym.name].timeline"
2. And in the code taken from EdgeCommons.js, replace "getVariable("symbolSelector")" with "_variables["symbolSelector"]".
Hope, these changes will remove the new JS issues you mentioned.
hth,
Vivekuma -
I'm doing a little edge project (now in beta version) for my girlfriend (she hates the code), with examples of the animate() method and other functions like setInteval(), but when I run I get the following error in Chrome console:
Javascript error in event handler! Event Type = element [edge.2.0.0.min.js:162]
But this library is global for all projects, how is possible that trigger an error?
Example here:
https://app.box.com/s/m7nof4al6597gfn47jlu
Thanks.you dont need to import java ease !!
it's already included in edge animate, remove that yepnope completely your problem will gone
Zaxist -
Unterminated String constant javascript error while handling textarea in ja
hi,
my code is -->
<textarea class = "ipfield" rows="2" cols="80" name = "ruleDesc" id = "ruleDesc" onchange="setIsEdited()"><c:out value="${ruleDesc}" escapeXml="false"/></textarea>
on click of cancel it should be reseated to previously present in ModelAnd View(MAV) object
code is document.getElementById('ruleDesc').value = '<c:out value="${ruleDesc}" escapeXml="false"/>';
but m getting javascript error while setting tht one
i view tht source in IE.
that is because of
it looks like ->
document.getElementById('ruleDesc').value = 'this is the data from database
ok ?'
if there is \n in database it will go to next line because of that *'* after document.getElementById('ruleDesc').value is not completed
can u please help me about that problem.
thanx in advance.Actually seeing as we are talking javascript at this point, the correct escape would be to escape the \n character. ie produce it as the characters \ and n.
I would recommend using [StringUtils.escapeJavascriptString|http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringEscapeUtils.html#escapeJavaScript(java.lang.String)] from the [apache commons|http://commons.apache.org/lang/]
Cheers,
evnafets -
Javascript error while invoking applet method
Hi All,
I am using some javascript to handle the applet in an irpt file. When I invoke the method getRowCount() on an applet(document.appletname.getRowCount()) I am getting the below error. But this error comes only when my network bandwidth is low. When my network bandwidht is high I am not getting this error. Does anyone know how to handle this error .
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Wed, 6 Jul 2011 03:31:28 UTC
Message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Line: 192
Char: 2
Code: 0
Thanks in advance
ShajiHi,
Below is my code where I am using an ICommand Applet to execute a query in the database and fetch the records. When I try to find the total number of records returns by the query in the IRPT page using document.SearchData.getRowCount() I am getting the below error. When I run thru citrix everything is working fine. But when I run thru Lan I am getting this error
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Wed, 6 Jul 2011 03:31:28 UTC
Message: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
Line: 192
Char: 2
Code: 0
Applet code in IRPT file
<APPLET NAME="SearchData" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" MAYSCRIPT>
<PARAM NAME = "QueryTemplate" VALUE="XXXXX_ProcessMessages/XX_Integration/XXXXX/Receiver/GUI_IN/GUIQuery_IN">
<PARAM NAME = "DisplayTemplate" VALUE="XXXX_ProcessMessages/XX_Integration/XXXXX/Receiver/GUI_IN/GUI_IN_iCommand">
<PARAM NAME="InitialUpdate" VALUE="false">
<PARAM NAME="UpdateEvent" VALUE="displayResults">
</APPLET>
Regards
Shaji
Edited by: Shajikc on Jul 6, 2011 4:35 PM -
What are the reasons for following Javascript error in Report Viewer
Post Author: dhuka
CA Forum: Crystal Reports
Hello Everybody!
I am using Crystal Reports 10 in my web application. But unfortunately I am surrounded with strange problem related to it because of which I have been unable to deploy is on client-side. In my application the error given below is displayed as javascript error in Report Viewer and report is not displayed. But more frustrating part is that I am getting the same error due to different problem with reporting and I am stuck with it as I am unable to figure out what's causing the error now. Earlier this error appeared due to problem with parameter passing to stored procedure which I resolved it and error vanished but once again it has shown up. Moreover this error now appears less frequently and randomly therefore it is even difficult to trace the cause.
Problem with this Web page might prevent it from being displayed properly or functioning properly. In the future, you can display this message by double-clicking the warning icon displayed in the status bar.
Line: 40Char: 12Error: Expected ')'Code: 0URL: http://myServer/myApp/myForms/myReports/ReportViewer.aspx
So can anybody tell me what factors might be causing this errors as the error text is very vague in nature and gives no idea about the actual error.
Guys, I hope for your kind co-operation.
Regards,Post Author: dhuka
CA Forum: Crystal Reports
Thanks for you reply Krishna.
But this syntax error is the one that is creating problem for me as I cannot trace it. The form ReportViewer.aspx contains only a report viewer object which remains un-binded to any ReportDocument even at runtime.
At code behind ReportViewer.aspx I have code below that associates SQL Stored Procedure Parameter and Report Filter along with report name. Once all above is associated with ReportDocument, I export ReportDocument to PDF file format and display the report. Here I dont' even bind ReportDocument with my ReportViewer. Moreover, as I mentioned previously this error is encountered randomly (with no reasonable explanation so far) on client PC (while browsing through application).
I hope below code give you good idea of the way I am implementing my reporting.
Looking forward to you solution. Please note that I am only passing the ReportFileName and Parameter and Filter Criteria to this form while dataTable by itself using the connection information.
<<<<<<<<<<<<<<<<<CODE BEHIND of REPORTVIEWER.ASPX>>>>>>>>>>>
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strKeys() As String
Dim strReportFilter As String
Dim strReportName As String
Dim strError As structError
Try
ReDim strKeys(0)
If strReportName = "" Then
strReportName = Context.Session("ReportName").ToString()
If Not Session("ReportParameters") = Nothing Then
Dim char_Delimiter() As Char = ";".ToCharArray()
strKeys = Session("ReportParameters").ToString().Split(char_Delimiter)
End If
If Not Session("ReportFilter") = Nothing Then
strReportFilter = Session("ReportFilter").ToString()
End If
Else
Session("DataTable") = Nothing
End If
If Not ViewParameterReport(strReportName, strKeys, strReportFilter, strError) Then
ASPNET_DisplayErrorMessageBox(strError.strMsg, Me)
Exit Sub
End If
Catch ex As Exception
strError.strMsg = Err.Description
ASPNET_DisplayErrorMessageBox(strError.strMsg, Me)
Finally
End Try
End Sub
Private Function ViewParameterReport(ByVal str_ReportName As String, ByVal str_ReportParameters() As String, ByVal strReportFilter As String, ByRef strError As structError) As Boolean
Dim str_ReportPath As String = CStr(ConfigurationSettings.AppSettings.Get("ReportPath"))
Dim crLogInfo As TableLogOnInfo
Dim crConnectionInfo As ConnectionInfo
Try
str_ReportPath = CStr(ConfigurationSettings.AppSettings.Get("ReportPath"))
o_Rpt = New CrystalDecisions.CrystalReports.Engine.ReportDocument
o_Rpt.Load(str_ReportPath & "\rpts\" & str_ReportName)
If Context.Session("DataTable") = "" Then
crLogInfo = New TableLogOnInfo()
crConnectionInfo = New ConnectionInfo()
crLogInfo = o_Rpt.Database.Tables(0).LogOnInfo
crConnectionInfo = o_Rpt.Database.Tables(0).LogOnInfo.ConnectionInfo
clsDbCnn.SetDBProperties()
crConnectionInfo.ServerName = clsDbCnn.Server
crConnectionInfo.DatabaseName = clsDbCnn.Database
crConnectionInfo.UserID = clsDbCnn.UserID
crConnectionInfo.Password = clsDbCnn.Password
crLogInfo.ConnectionInfo = crConnectionInfo
o_Rpt.Database.Tables(0).ApplyLogOnInfo(crLogInfo)
Else
ds_MISReports = New DataSet()
ds_MISReports = CType(Session("DataTable"), DataSet)
o_Rpt.SetDataSource(ds_MISReports)
End If
If Not IsPostBack Then
Dim param_Fields As CrystalDecisions.Shared.ParameterFields = New ParameterFields()
Dim iCount As Integer
If str_ReportParameters.GetUpperBound(0) <> 0 Then
For iCount = 0 To str_ReportParameters.Length - 1 Step 2
o_Rpt.SetParameterValue(CStr(str_ReportParameters(iCount).ToString()), CStr(str_ReportParameters(iCount + 1).ToString()))
Next
o_Rpt.RecordSelectionFormula = strReportFilter
End If
End If
'crViewer.DisplayGroupTree = False
'crViewer.ReportSource = o_Rpt
SetDBLogonForReport(crConnectionInfo, o_Rpt)
Dim TargetFileName As String
Dim fs As System.IO.FileStream
Dim FileSize As Long
Dim GenDS As DataSet
'Dim oRD As New ReportDocument()
Dim crReportObject As CrystalDecisions.CrystalReports.Engine.ReportObject()
Dim oExO As ExportOptions
Dim oExDo As New DiskFileDestinationOptions()
'Build Target Filename
TargetFileName = str_ReportPath & "\Pdfs\" & Session.SessionID & ".pdf"
'Export to PDF
oExDo.DiskFileName = TargetFileName
oExO = o_Rpt.ExportOptions
oExO.ExportDestinationType = ExportDestinationType.DiskFile
oExO.ExportFormatType = ExportFormatType.PortableDocFormat
oExO.DestinationOptions = oExDo
o_Rpt.Export()
o_Rpt.Close()
'Send the file to the user that made the request
Response.Clear()
Response.Buffer = True
Response.AddHeader("Content-Type", "application/pdf")
Response.AddHeader("Content-Disposition", "attachment;filename=MyReport.pdf;")
fs = New System.IO.FileStream(TargetFileName, IO.FileMode.Open)
FileSize = fs.Length
Dim bBuffer(CInt(FileSize)) As Byte
fs.Read(bBuffer, 0, CInt(FileSize))
fs.Close()
Response.BinaryWrite(bBuffer)
Response.Flush()
Response.Close()
o_Rpt = Nothing
Return True
Catch ex As Exception
strError.strMsg = Err.Description
Return False
Finally
crConnectionInfo = Nothing
crLogInfo = Nothing
End Try
End Function
Private Sub SetDBLogonForReport(ByVal myConnectionInfo As ConnectionInfo, _
ByVal myReportDocument As ReportDocument)
Dim myTables As Tables = myReportDocument.Database.Tables
Dim count As Integer
For count = 0 To myTables.Count - 1
Dim myTableLogonInfo As TableLogOnInfo = myTables(count).LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTables(count).ApplyLogOnInfo(myTableLogonInfo)
myTables(count).Location = myConnectionInfo.DatabaseName & ".dbo." & myTables(count).Location.Substring(myTables(count).Location.LastIndexOf(".") + 1)
myTables(count).LogOnInfo.ConnectionInfo.ServerName = myConnectionInfo.ServerName()
Next
End Sub -
Urgent: Javascript Error in Portal Navigation
Hi,
We are using EP 6.0 SP 13.
We are facing an issue of Java script error in the portal.
The areas in which the portal is affected are as follows:
1. When we open the Login page of the portal, the Font Type, Size and
formatting and the style of "Log in" button is not normal.
2. After we login, Any component that uses javascript is not working
3. Whenever we execute any BW report we are getting alert box with
message:
"Session Manager will not work!"
4. When we try to log out, again we get scripting error.
5. We are also not able to navigate in User Mangement and Content Management.
Please help as soon as possible.
Regards,
PrasadHello Prasad,
As we are talking about JavaScript errors, it is interesting to know which browser and OS you are using?
INTERNET EXPLORER 5.5 WINDOWS SERVER 2000/IA32 32BIT
Not Released
31.03.2004
INTERNET EXPLORER 6.0 WIN XP 2002 PROF. 32-BIT Released 31.03.2004
INTERNET EXPLORER 6.0 WINDOWS SERVER 2000/IA32 32BIT Released 31.03.2004
INTERNET EXPLORER 6.0 WINDOWS SERVER 2003/IA32 32BIT Released 27.06.2005
INTERNET EXPLORER 7.0 WIN XP 2002 HOME 32-BIT Released 11.12.2006
INTERNET EXPLORER 7.0 WIN XP 2002 PROF. 32-BIT Released 11.12.2006
See the for supported browsers:<a href="https://websmp205.sap-ag.de/~form/handler?_APP=00200682500000001303&_EVENT=RELEASE&00200682500000002804=01200314690900000192&00200682500000003818=WBRPFM&00200682500000003853=Enterprise%20Portal">NW2004_Browsers</a>
Greetings,
Praveen Gudapati
p.s Points are always welcome for helpful answers -
Error handling in Portal standard forms
I have a customer who needs to validate input on a Form Based on a Table (standard component). They have tried code, as shown below, as a PLSQL handler on a Save button. This example can obviously be solved with JavaScript validation on the client, but they have similar requirements for validation on DB level.
If procedure call 1) in the if statement is used, nothing happens. If procedure call 2) is used, it is executed in a new page as a standard error Oracle Portal error message.
declare
v_sender VARCHAR2(1000);
v_sender_id NUMBER;
begin
v_sender := p_session.get_value_as_VARCHAR2(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_SENDER');
v_sender_id := p_session.get_value_as_NUMBER(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_SENDER_ID');
insert into hd (number, text) values (hd_seq.nextval,
'step 3 v_sender = ' || v_sender ||
' v_sender_id = ' || v_sender_id);
if v_sender_id >= 100 then
1) Custom error handling, does not display:
show_error('Error message');
2) Error handling is displayed, but as a standard error:
raise_application_error(-20000, 'SenderID must be smaller than 100.');
else
doInsert;
end if;
end;
The customer has two questions:
Why does the custom procedure in 1) "show_error" not execute, and if it does, why does it not display? show_error works and the if statement is entered.
Is it possible to take control of Portals error handling on standard components (forms etc.), to show custom error messages with the style used on the component/page instead of the standard Error: ORA- ....etc. as Portal displays it?
Customer needs reply asap. Please reply directly. Any help will be much appreciated!
Kind regards
Jakob LundJacob,
Try following:
declare
v_sender VARCHAR2(1000);
v_sender_id NUMBER;
begin
v_sender := p_session.get_value_as_VARCHAR2(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_SENDER');
v_sender_id := p_session.get_value_as_NUMBER(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_SENDER_ID');
insert into hd (number, text) values (hd_seq.nextval,
'step 3 v_sender = ' || v_sender ||
' v_sender_id = ' || v_sender_id);
if v_sender_id >= 100 then
p_session.set_value(
p_block_name => "_block",
p_attribute_name => '_STATUS',
p_value => 'Sender ID must be less than 100!');
-- return to your form with status message set
-- and all fields filled with recent values
return;
end if;
end;
-- This point is reached only if validation is OK
doInsert;
Regards,
Henn -
CSS issues....get Javascript error on click event
Trying to finish up this navbar. Got it where my navigation works pretty much great. However, the code I expected to work when I fire a click event on the logo (represnted currently by a gray circle) causes a 'Javascript error in event handler! Event Type = element' error instead. Not sure why. I know I had an issue with one of my button references (spelling issue) but beyond that, everything seems to be in order.
This is the code I'm using. The first five lines work right. The second series does not.
sym.getSymbol("btnVision").$("back").css({opacity: 0})
sym.getSymbol("btnIndustires").$("back").css({opacity: 1})
sym.getSymbol("btnResp").$("back").css({opacity: 1})
sym.getSymbol("btnCommunity").$("back").css({opacity: 1})
sym.getSymbol("btnDiscovery").$("back").css({opacity: 1})
var stage = sym.getComposition().getStage()
stage.$("navVision").css({top: 65});
stage.$("navIndustries").css({top: 65});
stage.$("navResp").css({top: 65});
stage.$("navCommunity").css({top: 65});
stage.$("navDiscovery").css({top: 65});
I should mentioned I tried sym.getSymbol for the bottom entries but that simply produced the same exact error. Sign.
Anyone know what might be causing this? It doesn't seem to make sense to me. Here's the files.
https://www.dropbox.com/s/xo90u6hvj65ix78/nav.zipHi ladobeugm,
The error message is rather cryptic, but this occurs when trying to access something not defined, as you already experienced with your misspelling.
You should use Firebug to localize the error via step by step execution. There is a Scripts tab. In its menu, select <youProject>Actions.js. Then, define a breakpoint by clicking in the line number of statement var stage= etc. In the Spies area, you can look for the offending statement by monitoring variable values.
Gil -
I am not very good at error handling in APEX. Currently I have a problem where, if a user tries to insert a row in a table and there is already a row with the same primary key, they get an APEX error message with a little OK button. When they press the OK, it loops right back to the same error message. The only way out of this is to use the browser back button drop down and go back two pages. Note: the page that generates the error is a page that automatically submits itself via a simple Javascript. So, how do I check to see if there is going to be a primary key constraint error, display a message and go back to the page where the user choose the data that caused the duplicate key error? The error is generated out of the Automatic Row Processing process when the page is submitted.
Edited by: DaleB on Feb 17, 2009 6:33 AMHi,
I think it would depend on the sequence of events that are gone through to create the record. I have done something similar where the user makes one or more selections on page items, then clicks on a Day Link in a calendar - this passes values (through a URL rather than a Submit) to a second page which automatically submits the page to create a new record to show in the calendar.
I assume that your user does something on, say, Page 1, which is submitted and transfers to, say, Page 2, which automatically submits to create record? Or is this passed by a URL as in my case?
If you submit Page 1 first, you could perform validation on Page 1. If you pass the items using a URL, you could have a conditional branch on Page 2 that is in the "Before Header" branch point that branches to a page that shows an error message and provides a button to return to Page 1 - the insert, therefore, never takes place as the page is never loaded.
Andy -
I always get a Javascript error, why?
Everytime I shutdown my computer after I use Adobe Bridge 2.1 I get this error message:
Javascript error (Event handler: 2976) undefined is not an object. Any who have any ideas on how to resolve this?
Thanks,
MerylDid you ever have the CS3 beta installed? Did you uninstall it according to the instructions?
Here's the correct sequence to uninstall the CS3 beta and install the final, shipping version of CS3:
1. DEACTIVATE the Photoshop CS3 beta;
2. Run the Adobe Uninstaller currently residing in your ./ Applications / Utilities /Adobe folder to uninstall the Photoshop CS3 beta;
3. Run the 'CS3Clean' script that has been posted to remove the bits and pieces that the uninstaller misses.
NOTE that you cannot just drag the CS3 beta folder to the Trash like you normally do with other Mac applications.
To install CS3:
1. Repair Permissions.
2. Install CS3 according to the instructions.
3. Repair Permissions AGAIN.
4. Activate the software. -
The following code is being executed three times in the
following sequence:
1) On initialization of my Flex application, initCallback()
is called
2) When I broadcast a 'getUserPreferencesFromCookie' event,
handleGetUserPreferenceCookie() is called.
3) When I broadcast a 'writeUserPreferencesCookie' event,
handleWriteUserPreferenceCookie() is called.
// Callback when flash is initialized
var initCallback = function()
// Add all event listeners
FABridge.flash.root().getPreferences().addEventListener(
"getUserPreferencesFromCookie",
handleGetUserPreferenceCookie);
FABridge.flash.root().getPreferences().addEventListener(
"writeUserPreferencesCookie",
handleWriteUserPreferenceCookie);
FABridge.flash.root().getPreferences().faBridgeInitialized();
// Listen for flash initialization (i.e. the Main application
is created)
FABridge.addInitializationCallback("flash", initCallback);
// Event handler for Get User Preferences Cookie Events
events
var handleGetUserPreferenceCookie = function(readEvent)
alert("Getting Cookie for user: " +
readEvent.getUsername());
if (readEvent.getUsername())
var theCookie = readCookie(readEvent.getUsername());
alert("Returned from readCookie: '" + theCookie + "'");
var preference = FABridge.flash.root().getPreferences();
if (preference)
if (preference.setPreferenceCookie)
preference.setPreferenceCookie(theCookie);
else
FABridge.flash.root().getPreferences().setPreferenceCookie(null);
// Event handler for Write User Preferences Cookie Events
events
var handleWriteUserPreferenceCookie = function(writeEvent)
alert("Creating Cookie for User");
if (writeEvent)
alert("Write event is defined");
var username = writeEvent.getUsername();
if (username)
// Create a cookie given the username and the XML
createCookie(writeEvent.getUsername(),
writeEvent.getData());
alert("Returned from creating cookie");
else
alert("Write event is undefined");
alert("Write cookie method completed");
Here is the problem:
handleGetUserPreferences() completes as expected (i.e. the
cookie string is set into my preferences object). The readEvent is
a custom event that extends flash.events.Event. However, when
writeUserPreferenceCookie is called, the line
writeEvent.getUsername() fails. writeEvent is the same type of
event as readEvent. And when I say 'fails' I mean that the method
goes no further. I never see the 'Write cookie method completed'
alert. There are no errors in the Javascript Error Console.
I've checked the writeEvent on the action script side. The
username has been set into the event the same way that it was set
into the readEvent. I cannot see why I can get data out of the
readEvent but not the writeEvent.
ANY help would be much appreciated.
-JulieJust because the forums are a little slow on a weekend...
JavaScript functions should be declared in the HEAD of an HTML page. I wasn't aware that a function declared in the BODY writes to a new document, so I've also learned something out of this.
Take this and work on it to place the output where you want it:<html><head><script type="text/javascript"><!--
function clickfunction()
//if (registration.purpose[0].checked==true)
document.getElementById("stuffHere").innerHTML = "Name of School/ College: <input type=text name=sname><br>Grade / Year:<input type=text name=grade>";
!--></script></head>
<body>
<table>
<tr>
<td><font size = "" color="purple">Age:</font></td>
<td><input type = "text" name = "age" size = "10" maxlength = "3"></td>
</tr>
<tr>
<td><font size = "" color = "purple">Select the best reason
<br>to use the Library:</font></td>
<td><input type = "radio" name = "purpose" value = "school" onClick = "clickfunction()">
<font size = "" color = "purple" >School / College</font><br>
<input type = "radio" name = "purpose" value="work">
<font size = "" color = "purple">Work</font><br>
<input type = "radio" name="purpose" value="personal">
<font size = "" color = "purple">Personal</font>
</td>
<!--// SET AN ID ON THE ELEMENT! //-->
<td id="stuffHere"></td>
</tr>
</table><br>
<form>
<input type="Submit" name="register" value="Register" align="MIDDLE">
<input type="reset" name="clear" value="Clear Form" align="MIDDLE">
</form>
</body></html>db
-- next time, no JavaScript questions, please!
edit What you wanted to do was<div id="div1" style = 'display:none;'>and in the functiondocument.getElementById("div1").style.display = "block";Edited by: Darryl.Burke
Maybe you are looking for
-
How to use import script with FDM using adapter ERPI?
Hi, I use FDM and ERPI 11.1.2 to load data from EBS R12 to Planning 11.1.2 Data loaded from eBS are YTD data. I have seen that I could use an import script to calculate manually the amount with the periodic_net_cr and periodic_net_dr fields. But how
-
How to use javascript functions in struts jsp page
hi iam using struts jsp pages. here iam calling one javascript function. but iam not able to access the form in javascript. wat i have to give as form name to get the elements of the form. please reply me soon it is urgent vamsi
-
Sound Problems after converting
I converted all my video files from Quicktime to MPEG-4 so that the videos would play on my iPod. The videos now play, but there is no sound. How can i get sound to play?
-
HT4137 how do i unlock an ipod but i dont know the passcode
how do i unlock an ipod but i dont know the passcode
-
ABAP Web service - Virtual Interface Not Found
Hi, I have created a ABAP web service based on RFC. I changed the authentication to "Basic username/password" from SOAMANAGER. Also tested the web service from WSNAVIGATOR (of different portal) using WSDL url. Web service successfully returned respon