Is array-referencing syntax allowable when using javascript?
Is the array-referencing syntax notation allowable when using javascript as the calculation language? My hierachy looks like the following:<br /><br /> . form1<br /> . Area[0]<br /> . numHeight<br /> . numWidth<br /> . numDepth<br /> . Area[1]<br /> . numHeight<br /> . numWidth<br /> . numDepth<br /> . <etc><br /><br />Without getting into too many details, my need is for fields in the "Area[2]" container to access fields in the "Area[0]" container. E.g. "this.rawValue = form1.Area[0].numHeight.rawValue;". With this syntax, I received the following report:<br /><br />Generating PDF Document...<br />Script failed (language is javascript; context is xfa[0].form[0].form1[0].Area[2].numHeight[0])<br />script=this.rawValue = form1.Area[0].numHeight.rawValue;<br /> Error: Invalid property get operation; subform doesn't have property '0'<br />PDF generated successfully.<br /><br />1 warnings/errors reported.
You can use resolveNode on basically anything, so yes you can access the record nodes within the xml data source. The function assist does not have anything when you do record but the nodes are created under record to match the nodes in your XML data source.
I am not sure of what you are trying to do with your example - if you want to return a list of nodes match some expression, then there is another version of resolveNode method which does just that called resolveNodes()
For example if you want to find all conditions_item nodes you would have:
xfa.resolveNodes("xfa.record.conditions.conditions_item[*]")
This returns a collection of Nodes and you can then use .length to see how many are returned. Make sure conditions is a child node of the root element. I am not sure, I think you do not specify the root node when accessing the record nodes.
Similar Messages
-
Character encoding problems when using javascript client-sdk for remoting
Hi,
I have recently downloaded LCDS to try. I was interested in using Javascript for remoting. I have a Java-based web application on the server side, and use HTML + Javascript (dataservices-client.js) to send/receive messages asynchronously in AMF format.
I can both send and receive data (not only simple types, but objects with several attributes), however when I receive data from the server side that contains special chars (e.g. á, ï), I get some gibberish in my javascript objects. This is not same when I send content to the server: All special characters are received (printed) correctly in Java (server side).
I inspired my coding with the simple example shown in https://blogs.adobe.com/LiveCycleHelp/2012/07/creating-web-applications-using-html5javascr ipt-remoting-client-sdk-with-livecycle-data-services.html
Is there any bug on the serialization?
My software version is Adobe LiveCycle es_data_services_JEE_4_7_all_win
Java container is WebLogic 11g.
Thanks
=======
Edited Apr 11 2014
In my attempts, I tried using AMFX serialization so that I could see the message in a more comprehensible format inside my browser (eg using firebug). After configuring an HTTP channel and destination in the server side, and adjusting accordingly in the client side code, the Javascript API still sends binary!
Sadly, I concluded that client-SDK isn't mature enough...
By the way, if you send an String like "á" from the server, in the client you get "á"... instead of the raw "á" ... they forgot escaping.hey,
I had a similar experience. I was interfacing between 4.6 (RFC), PI and ECC 6.0 (ABAP Proxy). When data was passed from ECC to 4.6, RFC received them incorrectly. So i had to send trimmed strings from ECC and receive them as strings in RFC (esp for CURR and QUAN fields). Also the receiver communication channel in PI (between PI and RFC) had to be set as Non unicode. This helped a bit. But still I am getting 2 issues, truncation of values and some additional digits !! But the above changes resolved unwanted characters problem like "<" and "#". You can find a related post in my id. Hope this info helps.. -
Syntax Error when using SQL Expression
Morning all,
When I try to type any SQL Expression within Crystal I am getting syntax errors, even when I type only SELECT {field name} FROM {table name}.
Here is the query I did which gave me the following error:
Query
SELECT order_progress . date_created
FROM order_progress
WHERE order_progress . order_no = order_header . order_no
AND order_progress . order_status =77
ORDER BY order_progress . date_created DESC
Error
Error in compiliing SQL Expression
Database connector Error: 'HY000[Informix] [Informix ODBC Driver]General Error. Syntax Error[Database Vendor Code-11060]'.
Now this means, 1: I am getting a connection error with my db, for no apperent reason. 2: my syntax is not approved?!
Can someone explain why is this happening and how to resolve this?
many thanks
Kind Regards
JehanzebMorning Kyle,
Thanks for the informative answer, I have found out the formula which counts number of days however, I am not sure what you meant by the following:
>
Kyle McAdam wrote:
> create a formula that does the datediff....this will be a group.
Done this, it counts the working days as in weekdays and takes bank holidays out as well
here is the formula:
WhileReadingRecords;
//{order_progress.order_status}= 77;
//{order_header.order_status}>=77;
Local DateVar Start := {order_header.date_entered}; // Starting Date
Local DateVar End := {order_header.act_despatch}; // Ending Date
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
DateVar Array Holidays;
Weeks:= (Truncate (End - dayofWeek(End) + 1
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
(if DayOfWeek(Start) = 1 then -1 else 0) +
(if DayOfWeek(End) = 7 then -1 else 0);
Local NumberVar i;
For i := 1 to Count (Holidays)
do (if DayOfWeek ( Holidays<i>) in 2 to 6 and
Holidays<i> in start to end then Hol:=Hol+1 );
Weeks + Days - Hol;
You will then have a formula field that is evaluated to 1, if the status is 77.
you mean second formula? How I used,
If Order_header.Order_Status=77 then
1
else
2;
however this doesn't seem to be working.
> Now, sum that formula in each group footer. Suppress the detail lines...
which formula to sum up?
> **Don't use a cross tab with this solution. For a cross tab, you would have to calculate the totals in a different manner.
so far I used Cross tab and it is showing the right days, however not showing the correct jobs per day.
You might be right there that it calculates the totals differently, additionally how am I suppose to get the right Percentage if using the Cross tab. The percentage should be, count of number of jobs % Total jobs.
hence:
{#NumofJobs} % {#Total_Jobs}
however, when I create this formula it does not let me add that into the cross tab.
I also need to put a subreport in my report, can I use Crosstab to contain a link to my subreport?
Many thanks
Kind Regards
Jehanzeb -
Problems when using javascript in jsp
hello, i am implementing a program to upload files.
a user can upload either a pdf or a latex file.
so for example if the user uploads a pdf file the form action should be
"uploadPDF.jsp" and if it is a latex file the action is "uploadlatex.jsp"
currently when the user uploads the pdf file IT WORKS and does the action correctly but it does not do it for the other file (latex file) gives
some long jasper exceptions pls help
*************here is the code*******************
<SCRIPT LANGUAGE="JavaScript">
var extArray = new Array(".pdf", ".tex", ".txt");
function LimitAttach(form, file) {
allowSubmit = false;
if (!file) return;
while (file.indexOf("\\") != -1)
file = file.slice(file.indexOf("\\") + 1);
ext = file.slice(file.indexOf(".")).toLowerCase();
for (var i = 0; i < extArray.length; i++) {
if (ext = "pdf"){
document.forms[0].action.value = "uploadPDF.jsp";
allowSubmit = true;
break;
if (allowSubmit) form.submit();
else
alert("Please only upload files that end in types: "
+ (extArray.join(" ")) + "\nPlease select a new "
+ "file to upload and submit again.");
</script>
</HEAD>
and below is the form
<form action="" name="upform"enctype="multipart/form-data">
<input type="file" name="PDFfilename" size="50"><br>
<input type="hidden" name="todo" value="upload">
<input type="submit" name="Submit" value="Upload" onclick="LimitAttach(this.form, this.form.PDFfilename.value)">
</form>
thanks,
mohwhen uploading this latex file in a different jsp file and form it works fine
however in the above form it does not...........here is the exception errors:
org.apache.jasper.JasperException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
javax.servlet.ServletException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.uploadPDF_jsp._jspService(uploadPDF_jsp.java:209)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
root cause
com.adobe.acrobat.pdfobjstore.CantRebuildXRefException: This file appears to be damaged and cannot be repaired. This may not actually be a PDF file.
com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.buildTrailerDict(XRefTableRebuilder.java:141)
com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.rebuildXRefTable(XRefTableRebuilder.java:121)
com.adobe.acrobat.pdfobjstore.XRefTableRebuilder.<init>(XRefTableRebuilder.java:46)
com.adobe.acrobat.pdfobjstore.XRefTable.<init>(XRefTable.java:44)
com.adobe.acrobat.pdfobjstore.XRefTable.<init>(XRefTable.java:64)
com.adobe.acrobat.pdfobjstore.PDFObjMap.compute(PDFObjMap.java:122)
com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
com.adobe.acrobat.pdfobjstore.PDFObjMap.getTrailerDictRef(PDFObjMap.java:49)
com.adobe.acrobat.pdfobjstore.VTrailerDict.computeReference(PDFObjStore.java:552)
com.adobe.acrobat.pdfobjstore.VPDFReference.compute(VPDFReference.java:150)
com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
com.adobe.acrobat.pdfobjstore.VPDFReference.pdfReferenceValue(VPDFReference.java:161)
com.adobe.acrobat.pdfobjstore.security.VEncryptionMethod.computeString(SecurityHandler.java:208)
com.adobe.pe.vtypes.VString.compute(VString.java:55)
com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
com.adobe.pe.vtypes.VString.stringValue(VString.java:126)
com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.computePDFObjStorePerms(VPDFObjStorePerms.java:41)
com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.compute(VPDFObjStorePerms.java:54)
com.adobe.pe.notify.VValue.handleRequest(VValue.java:172)
com.adobe.acrobat.pdfobjstore.security.VPDFObjStorePerms.peObjStorePermsValue(VPDFObjStorePerms.java:32)
com.adobe.acrobat.gui.AcroViewContext.setByteArraySource(AcroViewContext.java:587)
com.adobe.acrobat.Viewer$3.buildChanges(Viewer.java:907)
com.adobe.pe.notify.Transactor.commit(Transactor.java:70)
com.adobe.acrobat.Viewer.setByteArraySource(Viewer.java:911)
com.adobe.acrobat.Viewer.setDocumentByteArray(Viewer.java:948)
com.adobe.acrobat.Viewer.setDocumentInputStream(Viewer.java:971)
org.apache.jsp.uploadPDF_jsp._jspService(uploadPDF_jsp.java:106)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
on the first line it says that the file may be corrupted but it is fine and works, thanks
moh -
Cannot enable insert panel when using javascript files
I have been using DW CS5 for a few years now and pretty much did everything in code view manually. I knew that there were tools available to speed up coding but just got used to doing it all manually. I am a big jquery fan and just recently thought it might be useful to switch to using some kind of toolkit to allow me to insert common JQ components quickly.
I came across JQ Utilities toolset which looked promising, so downloaded and installed it. However, although it installed fine and I could use it to insert JQ components into .PHP and .HTML files, I found I couldn't use it when editing my .js files (which of course is where I generally hold all my js code!) because the insert panel was dimmed out. I wasn't sure if the toolset had messed it up [thinking malware] (because I never really used the panels much), so I did some research.
I've found a few related threads, the most obvious being:
2925110: How to make insert panel enable?
5438857: Can't switch on jquery utilities toolset in C5
However, neither of these or anything close were actually answered.
The general response seems to be that the insert panel is disabled in anything but PHP and HTML files and that's the way it's designed.
Can anyone please confirm that there's no way around this, so that I can just forget the idea and move on. Or if there is a way around it, please let me know how ! Perhaps there's a better JQ friendly editor that might be worth me investing some effort migrating to?
Thank you
TonyI don't have CS5, but could you essentially lie to DW and put a .php extension on the file while you're working and change it to .js when you're ready for testing?
It may be a cruddy work around, but short of an update to DWCS5 (which won't be coming), I don't see a way to fix it if it's a known issue. -
Doctype Syntax Error when using AJAX Form Submission
I have a simple email signup form that is submitted using AJAX. When I submit the webform it throws a Syntax Error that says "<!DOCTYPE html>
Here is the AJAX Code:
function jqsub() {
var $f = $('#email-form');
var $m = $('#success-message');
$.ajax({
type: 'POST',
url: $f.attr('action') + '&JSON=1',
data: $f.serialize(),
success: function(msg) {
var formResponse = eval(msg);
if (formResponse.FormProcessV2Response.success) {
$f.fadeOut();
$m.fadeIn().html('<p>Thank you for joining our mailing list.</p>');
error: function(msg) {
alert('error'+msg);
return false;
Why am I seeing this error and how do I solve it?
Note: The site is not public yet and I cannot post it on a public forum. If needed I can PM you the link.
Thanks for the help!
LyndaI am not sure I follow. I am using the HTML 5 Doctype: <!doctype html> on the page and I have the form code copied into the page. As far as I know any page on my site, including all layouts, are HTML 5 Doctype.
Is there some area I should look to change a setting?
Thanks Liam! -
Error when using Javascript to scroll page in iFrame
Hi again!
I'm using a small Javascript to control the scrolling of a page loaded in an iFrame:
<script type="text/javascript">
var timer_id;
function scroll_iframe(frm,inc,dir) {
if (timer_id) clearTimeout(timer_id);
if (window.frames[frm]) {
if (dir == "v") frames[frm].scrollBy(0, inc);
else window.frames[frm].scrollBy(inc, 0);
timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);
function stopScroll() { if (timer_id) clearTimeout(timer_id); }
</script>
<a href="javascript:;" onmouseover="scroll_iframe('menu', -4, 'v'); return true" onmouseout="stopScroll(); return true">Up</a>
<a href="javascript:;" onmouseover="scroll_iframe('menu', 4, 'v'); return true" onmouseout="stopScroll(); return true">Down</a>
Running this results the error: "Adobe AIR runtime security violation for JavaScript code in the application security sandbox (window.setTimeOut)".
I've read the page about "Avoiding security-related JavaScript errors" but I don't know how to implement the changes proposed in my script.
Could anyone be so kind and help me with this?
Thanks!Just wanted to say that I solved the problem...
After long testing I came up with two functions (one for up and one for down) that have the following code at the end:
timer_id = setTimeout(function(){scroll_iframe('up')}, 20); //move up
timer_id = setTimeout(function(){scroll_iframe('down')}, 20); //move down
I also stumbled on to another problem: if I set the scroll property from the iFrame to "no", so that the scroll bar is hidden, I'm not able to use the "scrollBy(x, y)" method.
So what I did was use "frames['iframe'].document.getElementById('menu_content_div').style.top" to change the position of the content div inside the menu page. I had to put some restrictions so that the user isn't able to scroll the menu endlessly up or down, but then it worked like a charm!
If anyone whants to do something similar, this is the code I ended up with:
var timer_id;
var position = 0;
function scroll_iframe(direction) {
if (timer_id) clearTimeout(timer_id);
if (window.frames['iframe']) {
if (direction == "up" && position<0) {
position += 8;
frames['iframe'].document.getElementById('menu_content_div').style.top = position+"px";
timer_id = setTimeout(function(){scroll_iframe('up')}, 40);
menuContentDiv = frames['iframe'].document.getElementById('menu_content_div')
heightPx = document.defaultView.getComputedStyle(menuContentDiv,null).getPropertyValue('height');
heightValue = heightPx.slice(0,(heightPx.length-2)); //removes the "px at the end of heightPx
height = (heightValue-387)-2*(heightValue-387); //sets how much the menu can scroll up until it gets to its end - depends on the iframe height
if (dir == "down" && position>height) {
position -= 8;
frames['iframe'].document.getElementById('menu_content_div').style.top = position+"px";
timer_id = setTimeout(function(){scroll_iframe('down')}, 40);
function stopScroll() {
if (timer_id) clearTimeout(timer_id);
Scroll down: onMouseDown="scroll_iframe('down'); return true" onMouseUp="stopScroll(); return true"
Scroll up: onMouseDown="scroll_iframe('up'); return true" onMouseUp="stopScroll(); return true" -
Syntax error when using jsp:include...
@ all
I get a syntax error at the jsp:include line, character "";
Can anybody help me with that issue?
Jürgenselect coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by joined_col,col5You cannot use a column alias like this directly inside the group-by clause. You will have to rewrite this to:
select coalesce(col1,col2) joined_col, col3, sum(col4), col5 from data group by coalesce(col1,col2),col5Furthermore I assume that the 'col5' in the group by should be 'col3', not?
Or vice-verse the 'col3' inside the select-list should be 'col5'... -
Truncate not allowed when using ruleframe?
Hi all,
I am using the ruleframe transaction management and in proc I use:
execute immediate ('truncate table <table name>');
I will get the following error:
Error QMS-00100: Unhandled Exception ORA-02091: transaction rolled back
ORA-02290: check constraint (HST65.QMS_NEED_TO_CLOSE_TRANSACTION) violated in PL/SQL Program Unit ...
When I start the proc without the ruleframe transaction management, everething just works fine.
Cheers,
Joep HendrixYou are correct in your analysis.
As soon as a RuleFrame transaction is opened, RuleFrame (i.e. the QMS_TRANSACTION_MGT pacakge) deliberately violates a deferred check constraint by inserting a row into the table QMS_TRANSACTIONS.
Under normal circumstances, you would explicitly close a RuleFrame Transaction by calling QMS_TRANSACTION_MGT.close_transaction. When that procedure is done with all validations, it will remove the row from QMS_TRANSACTIONS. After this, a commit can be successfully performed.
However, if a commit is executed either explicitly or implicitly (e.g. through a table truncate or DDL operation) without explicitly closing the RuleFrame transaction, the Deferred Check Constraint that was violated is still violated and is now enforced as part of the implicit commit. That is the problem you are running into.
Conclusion: truncate table (nor DDL operations) can be performed inside a RuleFrame transaction.
best regards,
Lucas Jellema
AMIS Services BV -
This is MS info path question, I could not find specific forum for Info-Path So asking my question here
I am creating Info-Path form from schema. In the schema, the filename has restriction that it can only have extension .pdf or .PDF. But while filling out the form even if I type filename with extension ".pdf", I still see error "only
specific pattern allowed".
Below is my schema I used to create form
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Document">
<xs:complexType>
<xs:sequence>
<xs:element name="FileName" type="FileNameType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name ="FileNameType">
<xs:restriction base="xs:string">
<xs:pattern value="^.*\.(pdf|PDF)$"/>
<xs:minLength value="1" />
<xs:maxLength value="128" />
</xs:restriction>
</xs:simpleType>
</xs:schema>Hi
This is the forum to discuss questions about Microsoft Office development. For your question, I recommend you post the question to the Answers forum for Infopath
Microsoft Community for InfoPath
By the way, you can get support from here. Support for Microsoft InfoPath
Thank you for your understanding.
Best Regards
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Always getting syntax error when using RANK formula. Please help!!
i am desperate! tried EVERYTHING. so as a last try, I tested the very same Example that Apple gives to elaborate how the "RANK" formula works...and you guessed it....NOT WORKING.
not even a reconstruction 1 to 1 of the apple example worked, giving me a syntax error.
thus i am assuming that i am doing something wrong on a very basic level i would have never thought of (maybe a setting i have wrong?, maybe if you have blue as background formulas don't work?).
i would be sooooo grateful for any help!!!Thank you very much for answering this quickly.
but unfortunately it doesnt work
i made some screenshots, maybe this way someone sees a maybe obvious mistake i am making
and
Message was edited by: Apolloss -
Catch error in javascript when using SAP script
All,
I have a issue when using Javascript to control the SAP GUI in that I get a "syntax Error" raised by Internet Explorer if I attempt to get the SAPGUI runtime object from the runtime object table if SAP is not already running.
For example:
I have a javascript function embedded in a web page as follows:
<script type="text/javascript">
function displaymessage()
var sapgui;
var application;
var connection;
if (typeof(application) == "undefined")
sapgui = GetObject("SAPGUI");
application = sapgui.GetScriptingEngine();
if (typeof(connection) == "undefined")
connection = application.children(0);
if (typeof(session) == "undefined")
session = connection.children(0);
if (typeof(WScript) != "undefined")
WScript.connectObject(session, "on");
WScript.connectObject(application, "on");
session.findById("wnd[0]/tbar[0]/okcd").text = "fb50";
session.findById("wnd[0]").sendVKey(0);
session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").text = "0001";
session.findById("wnd[1]/usr/ctxtBKPF-BUKRS").caretPosition = 4;
session.findById("wnd[1]").sendVKey(0);
</script>
I have a simple HTML page with a button on it that calls the function.
If I have already launched SAP GUI and logged in the code works fine and atuomatically navigates me to FB50.
If SAP is not active and logged in then I get a syntax error! The error is raised by IE when the GetObject("SAPGUI") is executed.
Can anyone please help by either:
a) explaining how I can catch this error in javascript
b) suggesting a different way to call the GetObject
c) suggesting a way that I can auto launch SAP to log people in if it is not already active.
Note - Using VB is not an option as I need to embed the working Javascript code in a Siebel thin client application which only uses Javascript.
All help welcome. ThanksHey Gunter,
Thanks much, that did work.
The other error I spoke of was fixed with the new database, so apparently the two errors I spoke of weren't related.
You seem to be a good help to this forum, thank you for that.... fixing my problem relieved me from much stress.
Cheers,
Derek Miller
Dreamweaver Enthusiast -
Javascript error when using ExternalInterface.addCallback with crossdomain swf file
how can i use ExternalInterface.addCallback when using
javascript access from Server A (html) to Server B (swf) ? coz it
showing error?
Server A
192.168.0.10/XXX/example.html
===========
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="MGSInsurances1" width="960" height="600"
codebase="
http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="
http://192.168.0.22/MGS/flex/MGSInsurances1.swf"
/>
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="always" />
<embed src="
http://192.168.0.22/MGS/flex/MGSInsurances1.swf"
quality="high" bgcolor="#869ca7"
width="960" height="600" name="MGSInsurances1"
align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="always"
type="application/x-shockwave-flash"
pluginspage="
http://www.adobe.com/go/getflashplayer">
</embed>
</object>
<script language="javascript">
window.MGSInsurances1 =
document.getElementById('MGSInsurances1');
</script>
Server B
192.168.0.22/MGS/flex/MGSInsurances1.swf
==================
Security.allowDomain("*");
if(ExternalInterface.available)
ExternalInterface.addCallback("onchange",onchange);
ExternalInterface.addCallback("datachange",datachange);
but javascript Error is showing "Unknown name", how can i fix
it? urgent! somebody know this?i solved it! because i havent restart my server again! No
Error again ! sorry for bothering everybody. -
Using Javascript in a report region
I have a text box that I need to populate with an amount for billing. There is also a field that shows the amount due. If the amount due is equal to the amount being paid, I want my user to click on the amount due, and it automatically populates the amount being paid. I am using the javascript:setValue('destination','origination'); command, but the problem is that I am unable to choose the text field in the javascript. I have tried using #value# aliasing, and htmldb_application.g_f0x and just f0x... nothing seems to properly alias the text box within the tabular form. Any ideas?
Thanks,
ScottScott,
I know a way to do this, but it is not an easy implementation and it is quite hard to explain. Carl is an Oracle guy so he may know of a better solution, but here is what I came up with on my own:
First let's be familiar with the htmldb_item syntax (found in the html db documentation):
HTMLDB_ITEM.TEXT(
p_idx IN NUMBER, -- unique id
p_value IN VARCHAR2 DEFAULT NULL, -- value of item
p_size IN NUMBER DEFAULT NULL, -- HTML tag attributes
p_maxlength IN NUMBER DEFAULT NULL, -- max length
p_attributes IN VARCHAR2 DEFAULT NULL, -- HTML elements including where you incorporate the javascript for this item
p_item_id IN VARCHAR2 DEFAULT NULL, -- id you can specify
p_item_label IN VARCHAR2 DEFAULT NULL) -- labe you can specify
I would create your report region using the following sql statement:
select order_number "Order Number",
name "Name",
amount_due "Amount Due",
lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Row Num",
htmldb_item.text(7,amount_paid,null,null,null,'f07_'||lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Amount Paid"
from tbl_orders
where....
order by order_number
--i had to use an order by to get the ROW_NUMBER() to work
This will create on every row an item that is specific to the row number. For example:
Row # Amount Paid text box item ID
1 f07_0001
2 f07_0002
500 f07_0500
etc.
This will allow you to reference items based on what row they are when using javascript.
Next you need to create a link out of the the amount_due column. Go to the Report Region, then the Report Attributes tab. Click on the edit link for the amount_due column. Go to the Column Link section.
Make link_text = to the value of amount_due column(#amount_due# probably)
Make the Target = URL
Make URL = javascript: setValues('#AMOUNT_DUE#','#ROW_NUM#');
This will send the value of amount due and the row number.
Here's the javascript you would put in your HTML Header on you Page Attributes:
<script language="JavaScript1.1" type="text/javascript">
function setValues(due, rownum){
document.getElementById('f07_'+rownum).value = due;
</script>
Give that a shot. I just created a page and got that to work.
Chris -
Getting "Origin is not allowed" When Trying to Invoke RESTful Service from Another Domain
I am having problems trying to invoke my RESTful web service from a different domain. I'm well aware of the normal restrictions of cross-site / cross-domain scripting but in Oracle documentation it says that all origins are allowed by default when creating a RESTful service without using authentication.
I have created a very simple service and am trying to invoke it using jQuery.Ajax calls from a different domain and I am getting XMLHttpRequest cannot load http://address_to_my_web_service. Origin http://calling_from_address is not allowed by Access-Control-Allow-Origin.
I understand that using JSONP instead of JSON is actually the best practice around cross-site scripting but it appears as though APEX does not support JSONP because with JSONP, there are URI parameters added to the base request (callback).
I am stuck and would greatly appreciate any help.
I'm starting to wonder if this could be a bug because Oracle documentation says all origins should be allowed when using a service that does not require authentication. I also tried to force the origin to be allowed by typing it in and also using the wildcard '*' and it still did not work.
Thanks,
Mark Williamson
EDIT: It is now working after adding a URI prefix to my web service module.The SSL handshake works differently to a browser as it is making the connections automatically.
The browser asks every time if you want to trust an expired certificate, and it also recommends not to. Its impractical to manually check every service call to say do you trust the certificate so the functionality doesn't exist. I doubt any integration product does this. Therefore there isn't a option to ignore the certificate if it has expired.
This makes sence as the certificate is untrustworthy. The whole idea around SSL is trusting the site you are communicating with, all parties need to be trusted. This stops hackers from replicating their site and intercepting data.
If the administrator of the remote site is not willing to renew the certificate, are they really interested in SSL. I suggest they expose a non SSL service.
cheers
James
Maybe you are looking for
-
Generated Crystal Report PDFs are different on Windows server
Post Author: present CA Forum: .NET Hi, I created Crystal Report template (with two columns on one page) inside VS 2005 on my Windows XP Professional machine. But there are formating problems on both XP and Windows Server machines: 1) On Windows XP m
-
Apex Websheets. Will such thing be possible there...
Hello Apex-Team! We are moving now our ERP-application to the Apex environment very intensively, many old Excel reports and tables are also moved to the Apex application thanks to the outstanding Interactive Reports feature. But I'm receiving more an
-
I want to import short clips from home movies. How do I do this?
I am wanting to import short clips from old family movies which are on DVD. What is the best program for this? I don't want to import the full DVD just several short clips and then be able to use these clips in imovie.
-
Microsoft JScript runtime error '0x800A138F' Enterprise 10
Post Author: kgreeley CA Forum: Deployment I get the following error when trying to ge to the 'Instance Manager' or 'Schedule Manger' from the Crystal Enterprise Admin Launchpad. Microsoft JScript runtime error '0x800A138F' Object expected line: 752I
-
I cant call or hear people on my iphone 4. Can you help please
When people call I cant't hear them and they can't hear me but it states it is calling and rings. I have restore it to factory settings but still does not work.