Using !-- javascript code -- in an XSL file?
Hello folks,
Here is what I am trying to do:
I have an XML file and an XSL file.
I pass theese to the Oracle's XSL/XML
processor and get an HTML file which
contains a javascript code and CSS code
in the comment tag
<!-- code goes here -->.
OK, but when I use the &;lt; it gets
converted into &;#60; thus preventing
the javascript and css (in the resulting
html file) to work?! It is viewed properly
but when I open the page source the
corresponding character is not < but
&;#60;
My question: Is there any workaround to this
problem? Do I always have to use the &;lt; for < char.? Some other chars also
get converted (as single quot. - ' .
Is there any other way to do this? Could you
send me some example xsl file demonstrating
a solution to this problem? Thank you so much
in advance!
Georgi
Feel free to download the PDF Options Editor : http://abracadabrapdf.net/download/PDFoptions-editor.pdf.zip
It allows to edit options for placed PDF into InDesign layouts.
Similar Messages
-
Troubles using Javascript popoup inside a PHP file
I am trying something simple: to open a popup window trough a
javascript code inside my PHP file and nothing happens: here is the
code:
$openwindow =
"MM_openBrWindow('view.html','','width=300,height=300')";
echo "<td><a href='#'><img
src='images/button_blue.jpg' alt='Map' width='97' height='13'
border='0' onclick=" . $openwindow . "/></a></td>";
Also I am declaring such Javascript function at the beginning
of the file... Please help me as soon as you can... it is driving
me crazy... thanx in advance !.oO(David Powers)
>Michael Fesser wrote:
>> print "<a
href='foo?id=$something'>bar</a>";
>>
>> Not a single escape character and very readable in
an editor with proper
>> syntax highlighting.
>
>I agree with Steve that this is a trivial example that
doesn't really
>prove anything.
OK. At least it shows that escaping is not always necessary
In a more complex example with more variables I would've used
printf().
>If $something is the only variable in a long section of
>HTML, it's much more efficient to do this:
>
><a href="foo?id=<?php echo $something;
?>">bar</a>
I don't think efficieny is really an issue here.
>Every time that the PHP engine encounters double quotes
inside a PHP
>block, the engine has to parse the content to find if any
variables are
>interpolated. In your example, there is a variable, so
the effort isn't
>wasted, but many developers use double quotes all the
time, even if no
>variable are included in strings. Although the difference
in processing
>time is only microseconds, it's an inefficient way of
writing PHP.
Did you ever encounter any performance issues just because of
using
"unneccesary" double quotes? Or by using string concatenation
instead of
the slightly faster
echo $foo, $bar, $somethingElse ?
I didn't, and I doubt I ever will. It may be not the best
style and
usually I use single quotes where possible, but I don't care
too much,
because other things are much more important.
In fact I consider that all rather esoterical. If someone
tries to
"optimize" his code by avoiding double quoted strings where
possible
then IMHO he doesn't really have understood optimization at
all. The
real bottlenecks are not some syntactical sugar provided by
PHP, but the
algorithms and I/O operations. That's where optimization has
to start.
>However, I've seen a lot of inexperienced people post
questions about
>PHP problems, usually caused by the incorrect mixture of
single and
>double quotes.
Agreed, me too. But often it's not just some lack of
knowledge, but also
the usage of the wrong tool. Many errors I've seen in
beginner's code
(especially the mentioned quoting problems) could've been
easily spotted
with proper syntax highlighting.
>When you ask why they have coded it in such a convoluted
>way, the answer is invariably "because it's a PHP page".
Hmm, quite possible.
>PHP is designed
>to be embedded in HTML.
True, but just because PHP is designed for this and that,
doesn't mean
that I always have to use it in that way. Remember
register_globals and
magic quotes - they were a fundamental part of PHP's design a
while ago.
>You can also include HTML in PHP functions.
Now it gets really nasty. That's even more ugly than heredoc
syntax. ;)
With HTML embedded in PHP functions I always had the problem
how to
indent the code - either the source code looked bad or the
final HTML.
I never did it again.
>If the HTML block contains a lot of variables or other
dynamic code, I
>agree that using print or echo is probably more efficient
and easier to
>read. However, when HTML is predominant, embed the
dynamic stuff.
As said - I consider it just personal preference. There are
valid
reasons for both ways.
Micha -
How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?
Hi hasvi,
Need Template(.indt), textframes etc for the following script:
var myFolderInd = Folder.selectDialog();
var myFile = myFolderInd.getFiles("*indt");
app.open(myFile)
var myDoc = app.activeDocument;
var myDocName = myDoc.name;
var mySaveFile = app.activeDocument.save(myFolderInd.fsName + "/" + myDocName.split(".indt").join(".indd"));
var myFolderDoc = Folder.selectDialog();
var myFile1 = myFolderDoc.getFiles("*doc");
mySaveFile.pages[0].textFrames[0].place(File(myFile1))
//~ mySaveFile.place(File(myFile1))
app.activeDocument.textPreferences.smartTextReflow = true;
var myPDFFile = new File(mySaveFile.filePath + "/" + mySaveFile.name.split(".indd").join(".pdf"))
myDoc.exportFile(ExportFormat.PDF_TYPE, File("~/Desktop/abc.pdf"));
alert("Process Completed")
Regards
Siraj -
Javascript code for setting output file name of emailed form in Livecycle
I was given a task of creating a new form with livecycle. I have no knowledge of javascripting so I am struggling with one of the things I am trying to get this form to do. The overview of this form is people around my company fill out this form then hit a button to email the completed form to me. I was able to accomplish part of this task by using the following code within an up mouse event script on a button.
oDoc = event.target;
oDoc.mailDoc({
cTo: ********@******.com,
cSubject: "IB Update Request - Instance" + IBInstance.rawValue,
This takes the form and emails it to me with the data from the field called "IBinstance" in the subject line which is what I want but the file name attached to the email is garbage. presently is says "newupdateform.pdf - Adobe Acrobat Pro.pdf"
What I would like is some javascript code that I can take the data from the field called "IBinstance" and use it as the name of the file being sent in. Is there a simple code that i can put in this event to allow me to do this?
Thank youHi Joerg,
I have been trying to solve this as well, but gave up. I also could not get the workaround you found to work with EFM files.
If you do find a solution, please update your message to share?
Thanks
Julie -
Read-Only Text Field Using JavaScript Code
I'd like to make a text field read-only by using JavaScript and also having IF & ELSE statements.
I want it to be like this:
if the answer from the dropdown menu is YES, then the text field is read only but if the answer is NO then the text field is fillable.
Thanks in advanceUse this code as the custom validation script of the drop-down in question:
this.getField("Text1").readonly = (event.value=="Yes"); -
How to use javascript code in a plugin ?
Hi,
I'd like to use javascript in my plugin but after reading the JS API reference, i still don't understand where the code should be placed, and to call it from my plugin.
I'm quite new in Acrobat SDK and developping applications in Acrobat using Javascript, so I hope it's not a dumb question...>is there a way i can call javascript without security checking?
It wouldn't be security if you could just bypass it. Did you read all
the security notes? You might be able to do something with trusted
functions, but I'm not sure how that would integrate with a plug-in.
Aandi Inston -
How can I use Javascript code to affect the display of textField?
Hi All,
I created a web application using JSF.
And Placed two controls: one Text Field and one Label.
On the Javascript onclick event of Label, I wrote the following javascript:
document.getElementById("form1:textField1").value="test123";
I run the web application, and click on the label, However, the text of the Text Field does not change.
But the following code shows text of the Text Field has been changed. it works.
alert(ocument.getElementById("form1:textField1").value);
So, why the display of the Text Field does not change? How to update the display of the Text Field?
Any suggestion will be helpful!
Thank you.here is a full and correct example, enjoy
1. <html>
2. <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
3. <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
4. <f:view>
5. <head>
6. <title>
7. <h:outputText value="#{msgs.windowTitle}"/>
8. </title>
9. </head>
10. <body>
11. <h:form id="registerForm">
12. <table>
13. <tr>
14. <td>
15. <h:outputText value="#{msgs.namePrompt}"/>
16. </td>
17. <td>
18. <h:inputText/>
19. </td>
20. </tr>
21. <tr>
22. <td>
23. <h:outputText value="#{msgs.passwordPrompt}"/>
24. </td>
25. <td>
26. <h:inputSecret id="password"/>
27. </td>
28. </tr>
29. <tr>
30. <td>
31. <h:outputText value="#{msgs.confirmPasswordPrompt}"/>
32. </td>
33. <td>
34. <h:inputSecret id="passwordConfirm"/>
35. </td>
36. </tr>
37. </table>
38. <h:commandButton type="button" value="Submit Form"
39. onclick="checkPassword(this.form)"/>
40. </h:form>
41. </body>
42. <script type="text/javascript">
43. <!--
44. function checkPassword(form) {
45. var password = form["registerForm:password"].value;
46. var passwordConfirm = form["registerForm:passwordConfirm"].value;
47.
48. if(password == passwordConfirm)
49. form.submit();
50. else
51. alert("Password and password confirm fields don't match");
52. }
53. -->
54. </script>
55. </f:view>
56. </html> -
Use PHP code coloring in HTML files
In Dreamweaver CS3, what changes do I need to make to get PHP
code coloring show up in .html files?robot88888888,
First, copy this file from the app config folder:
C:\Program Files\Adobe\Adobe Dreamweaver
CS3\configuration\CodeColoring\PHP.xml
To the user config folder:
C:\Documents and Settings\[username]\Application
Data\Adobe\Dreamweaver
9\Configuration\CodeColoring\
Then open PHP.xml in your favorite editor. You need to add
HTML to all
of the doctype lists Change every occurrence of this:
doctypes="PHP_MySQL"
to be:
doctypes="PHP_MySQL,HTML"
Save and close. If DW is running, close it. Now restart DW.
HTH,
Randy
> In Dreamweaver CS3, what changes do I need to make to
get PHP code coloring show up in .html files? -
How can I delete all javascript code from a file
We need to delete all the javascript code from our illustrator files. Right now I need to click on each element and check my SVG interactivity window for any javascript code, then trash it from that window. Very time intensive. Any ways to make a complete elimination of javascript code?
sudo -u _cyrus /usr/bin/cyrus/bin/ipurge -d 0 -f user/mailboxname
HTH,
Alex -
Using ftp in core java code to transferring a file to other sys
My mail id:[email protected]
hi to all
I am actually using this code for transforing a file from my system to side system of mine.but the code is compiling and when runing this code i am getting an error:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.sshtools.j2ssh.net.SocketTransportProvider.<init>(Unknown Source)
at com.sshtools.j2ssh.net.TransportProviderFactory.connectTransportProvider(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
at ftpsample1.main(ftpsample1.java:36)
I am getting this error.
friend is saying some proxy should should be installed in that other system.
Plase help me..
my code is:
import java.io.File;
import java.util.List;
import java.io.*;
import com.sshtools.j2ssh.SftpClient;
import com.sshtools.j2ssh.SshClient;
import com.sshtools.j2ssh.authentication.AuthenticationProtocolState;
import com.sshtools.j2ssh.authentication.PasswordAuthenticationClient;
import com.sshtools.j2ssh.sftp.SftpFile;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
class ftpsample1
public static void main(String[] args) {
String username="administrator";
String password="thota1976";
try{
// Make a client connection
System.out.println("Before SSHCLIENT......");
SshClient ssh = new SshClient();
System.out.println("After SSHCLIETNT ......");
// Connect to the host
System.out.println("Connecting ......");
System.out.println("ssh.connect ->9.182.54.70*************************......");
ssh.connect("9.182.54.70");
System.out.println("Connected***");
// Create a password authentication instance
PasswordAuthenticationClient pwd = new PasswordAuthenticationClient();
// Get the users name
pwd.setUsername(username);
// Get the password
pwd.setPassword(password);
// Try the authentication
int result = ssh.authenticate(pwd);
System.out.println("ssh.authenticate(pwd):::" +result);
System.out.println("AuthenticationProtocolState.COMPLETE:::***:" +AuthenticationProtocolState.COMPLETE);
System.out.println("Beforet he AuthenticationProtocolState.COMPLETE ::");
if (result == AuthenticationProtocolState.COMPLETE) {
System.out.println("BOTH ARE SAME RESULT AND .COMPLETED*--------------");
// The connection is authenticated we can now do some real work!
SftpClient sftp = ssh.openSftpClient();
sftp.put("c:/temp/Balaji.jpg");
System.out.println("after he AuthenticationProtocolState.COMPLETE ::");
}catch(Exception e)
e.printStackTrace();
System.out.println("*****");
e.getMessage();You could use only Java classes without and 3rd party classes (com.sshtools.j2ssh) for doing this:
* Upload a file to a FTP server. A FTP URL is generated with the following syntax:
* <code>ftp://user:password@host:port/filePath;type=i</code>.
* @param ftpServer FTP server address (incl. optional port ':portNumber').
* @param user Optional user name to login.
* @param pwd Optional password for <i>user</i>.
* @param fileName Destination file name on FTP server (with optional preceeding relative path, e.g. "one/two/three.txt").
* @param source Source file to upload.
* @throws MalformedURLException, IOException on error.
public void upload(String ftpServer, String user, String pwd, String fileName, File source) throws MalformedURLException, IOException {
if (ftpServer != null && fileName != null && source != null) {
StringBuffer sb = new StringBuffer("ftp://");
if (user != null && pwd != null) { //need authentication?
sb.append(user);
sb.append(':');
sb.append(pwd);
sb.append('@');
}//else: anonymous access
sb.append(ftpServer);
sb.append('/');
sb.append(fileName);
sb.append(";type=i"); //a=ASCII mode, i=image (binary) mode, d= file directory listing
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
URL url = new URL(sb.toString());
URLConnection urlc = url.openConnection();
bos = new BufferedOutputStream(urlc.getOutputStream());
bis = new BufferedInputStream(new FileInputStream(source.getName()));
int i;
while ((i = bis.read()) != -1) { //read next byte until end of stream
bos.write(i);
}//next byte
} finally {
if (bis != null) try { bis.close(); } catch (IOException ioe) { /* ignore*/ }
if (bos != null) try { bos.close(); } catch (IOException ioe) { /* ignore*/ }
}//else: input unavailable
}//upload() -
Using javascript to read bex variables in WAD
Hello,
I'm using BI 7.0.
In Query Designer I defined a variable of type customer exit. The variable is called "TESTVAR". How can I access to the value of this variable in WAD by using javascript? I know I can use the Web Item "Script" or I can include the javascript code in an external file. But can you can give me some example code how I can access the variable "TESTVAR"?
thanks
bertlTry using the following
Suppose <b>TESTVAR</b> is having the value <b>A</b>
If TESTVAR is single value
var_name_1=TESTVAR
VAR_VALUE_EXT_1 = A
if TESTVAR is range
var_name_1=TESTVAR
VAR_VALUE_LOW_EXT_1 = A
VAR_VALUE_HIGH_EXT_1 = A -
Javascript Code Assist Delay Time
How can I increase the delay time before code assist pops up when editing javascript in a .cfm file?
Under Preferences:Coldfusion:Editor Profiles:Editor:Code Assist
there is a setting "Delay before showing Code Assist" but changing this setting does NOT alter the javascript pop up delay.
Under Preferences:HTML:Editors:JavaScript:Code Assist
there is no similar setting.
So maybe I can edit this setting in a config file or something? I'm using coldfusion builder 1.0.0.271911 on snow leopard 10.6.3
thanks.do I download Aptana plugin?
OMG please NO! Aptana is a bloated pig, and is what made CFBuilder 2 so slow.
I would suggest putting your JavaScript code in a separate file from your ColdFusion page, and using the <script> tag to load it in. If you need to pass ColdFusion variables into JavaScript, put a small <script> block on the CFML page wrapped in <cfoutput> just to create and populate the JavaScript variables, then add a second <script> tag to load your external JavaScript file.
By keeping your JavaScript separate from CFML code you achieve multiple benefits:
The built-in JavaScript parser/syntax highlighter will actually work, as those CF Builder features are somewhat dependent on recognizing the file extension to know which parser to use.
Maintenance of your application will be easier, because you don't have a mixture of CFML and JS code in the same file, and thus the files will be smaller and more targeted.
You can run your JavaScript file through "linters" to validate syntax.
You can minify your external JavaScript code files for better performance.
If you use build tools such as Grunt or Gulp, you can automate 3 and 4 without potentially breaking any CFML code in the process.
Probably additional benefits I'm not thinking of at the moment (someone will chime in I'm sure).
HTH,
-Carl V. -
How can I call a web service using JAVAscript in LCD
hi guys,
I know it can call a WSDL in LCD, but I have not any WSDL web service , and I have a REST web service ,how can I call this REST web service in LCD? I checked some documents and found nothing...if it's possible that it can call a REST web service using JAVAScript code, I mean I can program some code to call this web service ?
thanks,
JesseHi Jesse,
You can do GET, PUT and POST using FormCalc, so you should be able to access a REST web service.
There is a example of accessing a RSS feed in this thread, http://forums.adobe.com/message/5695433#5695433
Regards
Bruce -
ConfigPlan.xml | How to change datasource values in .bpel and .xsl files
Hi',
We have used sql queries inside Transform (XSL) files and also using them in Assign activity,
Now when moving from Development environment to Test Environment, how can we change the
JDBC values by using the ant script, in the configplan.xml file I dont see any place where I can change these
values, is it at all possible, if Yes then how.
Please advice,
Thanks
YatanHi,
You can go thru below link to make changes in .bpel file.
http://eelzinga.wordpress.com/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
thanks -
How to set a page parameter using javascript ?
Hi:
i'd like to set page parameter with a value taken from a textbox when clicking a button using javascript code.
i mean, i have a textbox and a button using javascript and i want to take the value from the textbox and when onClick event happens set that value to the page parameter. How can i do this????
Thanks.
Best regards. Urko.Hi,
Can you please elaborate your requirement. May be some better ways can be suggested. Also please mention which component you are using.
Thanks,
Sharmila
Maybe you are looking for
-
1st Generation Mac Pro 2.66 dual Core(4 cores total) 5gigs of RAM
I'm still on Logic 8/Tiger. All running very well. Typical projects run about 30 tracks. Use lots of Vi's Omnisphere, Trillian, and RMX included. Wanting to move to 10.6.2/Logic 9.1. Is my first generation Mac Pro up for the upgrade? Will I still hav
-
Selection of a line Item for printing
Hi, I am fetching three records in an ALV grid display with a check box option, i am not getting how to use the check box option to select the particular selected line, i want to use that selected line to be printed in a smart form. Also is there a
-
Compressor 4.1.2 BluRay Encoded File is too big - Help!
I just encode a 4 hours of HD footage using compressor's Bluray output (H.264 Video & AC3 Audio). It took near 10 hours of seemingly wasted time. I am working with 25g blurry discs and the H.264 File Size is 27.71 gigs. So now I need to re-encode.
-
How to know if a r3 filed is mapped in BW or not
Hi guys, Where can you see if a particular R/3 field is mapped in BW or not. Basically, I am looking for Field Milestone for a customer (FPLT-MLBEZ) to calculate progressive billing.
-
Seperate playlist/side playlist
Hello, I was just wondering if there is (or anyone knows of) something similiar to a playlist editor for winamp for itunes. Party shuffle works pretty well, but it misses a feature which I would really like to have. for instance: you find a cool song