5 Star Rating option using Ajax and javascript

Hi all,
I have an an issue regarding an 5 Star Rating option by the apex user and track the ranking in the backend in oracle database..
Hope the experts will reply...
Thanks and Regards,
Suri

Hey sapan thanks for responding, but can you please explain on this how to save the data in the oracle backend, i have got an link its generates stars and all its working fine but saving is now a big problem can you put some thoughts on this it will be really great
and what are this custom service.
th url is http://www.reignwaterdesigns.com/ad/tidbits/rateme/
Thanks,
Suri

Similar Messages

  • Using CSS and Javascript to display a div with flash in it, mozilla reloads the flash file!

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

    I am using CSS and Javascript to display a div with an
    embedded flash object in it. Mozilla Firefox reloads the flash file
    when the div is displayed! (I dont want this to happen, as it's
    unexpected functionality, my expectation would be that the flash
    file would not change it's state at all, and would remain in
    whatever state it was left in.)
    I was wondering if anyone has come across this issue and is
    there something I can do to prevent this from occurring?
    To be more specific, I have a single HTML page with 8 flash
    files embedded in it (yeah I know, it's a bit much). I am then
    using CSS and Javascript to display (via a numbered link (with an
    id)) an equivalent numbered div tag containing the flash file.
    Mozilla Firefox reloads the flash object that is in the div.
    Internet Explorer will not do this and will instead, load the flash
    object only upon initial view of the flash object. All subsequent
    links (in IE) will NOT reload the flash object on the page. I'm
    guessing this is some kind of difference in the flash player as an
    Active X object and the plugin, or is it just IE being clever? Or
    am I way off?
    Anyway, here is the code...

  • Uploading a file to server using ajax and struts

    My problem is i wrote a program to upload a file to the server using Ajax.
    Here iam used Struts and Ajax.
    The problem is when iam uploaded a file from my PC the file is uploading to the server in the upload folder located in the server my system.
    Iam using Tomcat server 5.0
    But when iam trying to access it through other system it is not doing so
    Giving an internal server error i,e 500.
    Iam putting the necessary documents for ur reference.
    Plz help me soon .
    My exact requirement is i have to upload a file to the upload folder located in the server.
    And i have to get the path of that file and display the file path exactly below the browse button from where iam uploaded a file.
    That should be done without page refresh and submit thats y iam used Ajax
    Any help would greatly appreciated
    Thanks and Regards
    Meerasaaheb.
    The action class is FilePathAction
    package actions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.*;
    public class FilePathAction extends Action{
    public ActionForward execute(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    String contextPath1 = "";
    String uploadDirName="";
    String filepath="";
    System.out.println(contextPath1 );
    String inputfile = request.getParameter("filepath");
    uploadDirName = getServlet().getServletContext().getRealPath("/upload");
    File f=new File(inputfile);
    FileInputStream fis=null;
    FileOutputStream fo=null;
    File f1=new File(uploadDirName+"/"+f.getName());
    fis=new FileInputStream(f);
    fo=new FileOutputStream(f1);
    try
    byte buf[] = new byte[1024*8]; /* declare a 8kB buffer */
    int len = -1;
    while((len = fis.read(buf)) != -1)
    fo.write(buf, 0, len);
    catch(Exception e)
    e.printStackTrace();
    filepath=f1.getAbsolutePath();
    request.setAttribute("filepath", filepath);
    return mapping.findForward("filepath");
    the input jsp is
    filename.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <script type="text/javascript">
    alertflag = false;
    var xmlHttp;
    function startRequest()
    if(alertflag)
    alert("meera");
    xmlHttp=createXmlHttpRequest();
    var inputfile=document.getElementById("filepath").value;
    xmlHttp.open("POST","FilePathAction.do",true);
    xmlHttp.onreadystatechange=handleStateChange;
    xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttp.send("filepath="+inputfile);
    function createXmlHttpRequest()
    //For IE
    if(window.ActiveXObject)
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    //otherthan IE
    else if(window.XMLHttpRequest)
    xmlHttp=new XMLHttpRequest();
    return xmlHttp;
    //Next is the function that sets up the communication with the server.
    //This function also registers the callback handler, which is handleStateChange. Next is the code for the handler.
    function handleStateChange()
    var message=" ";
    if(xmlHttp.readyState==4)
    if(alertflag)
    alert(xmlHttp.status);
    if(xmlHttp.status==200)
    if(alertflag)
    alert("here");
    document.getElementById("div1").style.visibility = "visible";
    var results=xmlHttp.responseText;
    document.getElementById('div1').innerHTML = results;
    else
    alert("Error loading page"+xmlHttp.status+":"+xmlHttp.statusText);
    </script></head><body><form name="thumbs" enctype="multipart/form-data" method="post" action="">
    <input type="file" name="filepath" id="filepath" onchange="startRequest();"/>
    </form>
    <div id="div1" style="visibility:hidden;">
    </div></body></html>
    The ajax response is catching in a dummy.jsp
    <%=(String)request.getAttribute("filepath")%>
    corresponding action mapping
    <action path="/FilePathAction" type="actions.FilePathAction">
    <forward name="filepath" path="/dummy.jsp"/>
    </action>
    So plz help me to upload a file to the server from any PC.
    Iam searched alot but didnt get any solution.

    Plz help me soon if it possible so
    Iam in great need.
    I have worked alot but not worked out.
    Any help greatly appreciated

  • Using facelets and javascript in dynamic regions

    Hello
    I'm using JDeveloper 11g 11.1.1.4.0.
    In the JDeveloper's documentation I found that there is the best parctice to use facelets.
    Now, I have next problem.
    I use dynamic region iside xhtml (facelets) page. Inside that dynamic region there is a view (jsff).
    The problem is that I can't use any custom JavaScript in that jsff.
    I tried next thing:
                <trh:script id="trhs1">
                    <af:resource type="javascript">
                      testm = function (event) {
                      alert('qqq');
                    </af:resource>
               </trh:script>
    <af:clientListener method="testm" type="dblClick"/>If that task-flow is placed inside jspx (not facelets) page, then all works.
    If that task-flow is placed inside xhtm (facelets) page, I have an error from browser that javascript's 'testm' method is not defined.
    I checked source code of the result html-page, and my javascript code really doesn't exists there.
    I can fix it by moving javascript code from the taskflow's jsff to surrounding xhtml page or using jspx page, but, maybe, there is another solution?
    Anatolii
    Edited by: Anatolii. on 11/4/2011 0:32

    Thank for replay, Shay
    I found that in Web User Interface Developer's Guide for Oracle ADF, 2 Getting Started with ADF Faces, Section 2.4, "Creating a View Page":
    Best Practice: Use Facelets to take advantage of the following:
    The Facelets layer was created specifically for JSF, which results in reduced overhead and improved performance during tag compilation and execution.
    Facelets is considered the primary view definition technology in JSF 2.0.
    Some future performance enhancements will only be available with Facelets
    Now I have facelets page with dynamic region, it works.
    I've decided to use facelets because of the forthcoming JDeveloper with JSF 2.0 and for performance improvements described above.
    Do you think it's better to use jspx?
    I have not found any limitations for facelets in Web User Interface Developer's Guide for Oracle ADF and Fusion Developer's Guide for Oracle ADF
    Anatolii

  • Error using java and javascript

    I have a jsp page that links to a bean and is working fine (getting data from the database).
    On a html form I have a button with a picture that fires off javascript when clicked:
    <BUTTON TYPE=reset onclick=showinfo('<%=index%>')>
    <IMG SRC="http://localhost:8080/Portal/Images/q2.bmp" ALT="Info">
    </BUTTON>
    The javascript function just opens a new window and displays the text sent in:
    <Script Language=JavaScript>
    function showinfo(arrayindex)
    InfoWin=window.open("","InfoWin","width=345,height=220");
    InfoWin.document.write(arrayindex);
    return false;
    </Script>
    Well in the above example index is a number (pulled from the database using a java bean and javascript converts it into a string then the function displays it correctly. If I replace <%=index%> with regular text it works fine as well(because java isn't used to pull data)! The problem occurs when I retrieve text data from the database and send it to the function. The web page gives errors about a nonterminating string. But I can move the code to somewhere else on the form(as long as I don't send it to java script) and it will print the text to the screen. I can also view the source of the web page and the html shows the text from the data base as if I hard coded the text into the javascript!!!!!!!!!!!!!!!!!
    This must be a bug between java and javascript!
    -can pass numbers(from a database) between the two
    -can't pass text (from a database)between the two
    Any info would help!

    Found the problem myself!
    I am using an odbc connection to msaccess and the spaces in the text was messing things up!
    After taking out the spaces it worked again.

  • I need to pass multiple select options using submit and reutrn

    dear all,
    my requirement is i need to pass multiple values for work center like(biw01,biw02,biw03    etc) for this iam giving as biwl* and biot* for the tcode zpp_hmm ,using this i am going to get total working hours of perticular equiment.
    for this iam using submit and return query but iam unable to pass multiple work centers as input.
    my code is
    DATA : z_budat TYPE  RANGE OF budat,
           wa_budat LIKE LINE OF z_budat.
    wa_budat-low = '20111001'.
    wa_budat-sign = 'I'.
    wa_budat-option = 'BT'.
    wa_budat-high = '20111031'.
    APPEND wa_budat TO z_budat.
    CLEAR wa_budat.
    *wa_budat-High = '20111031'.
    *wa_budat-sign = 'I'.
    *wa_budat-option = 'BT'.
    *append wa_budat to z_budat.
    DATA : z_arbpl TYPE  RANGE OF arbpl,
           wa_arbpl LIKE LINE OF z_arbpl.
    wa_arbpl-low = 'BIWL*'.
    wa_arbpl-sign = 'I'.
    wa_arbpl-option = 'EQ'.
    APPEND wa_arbpl TO z_arbpl.
    CLEAR wa_arbpl.
    wa_arbpl-high = 'BIOT'.
    *wa_arbpl-sign = 'I'.
    *wa_arbpl-option = 'BT'.
    *APPEND wa_arbpl TO z_arbpl.
    SUBMIT   zpp_rep_hemm_perf WITH s_bukrs = '1004'  WITH s_budat IN z_budat WITH      s_werks = 'SMJT'
                   with   S_ARBPL IN Z_ARBPL USING SELECTION-SCREEN '1000' AND RETURN.
    but my doubt is whether it is corect or wrong what ever i am passing inputs for arbpl.
    thanks in advance.

    You can pass all parameter (rsparams-kind = 'P') and select-options (rsparams-kind = 'S') as a single internal table of type RSPARAMS. Go on appending the field names and values as rows and pass using SELECTION-TABLE parameter of SUBMIT command.
    I gave appending one set of selection values for s_budat field but you can go on appending more values for s_budat and other fields.
    DATA: lt_rsparams TYPE TABLE OF rsparams,
          ls_rsparams TYPE rsparams.
    CLEAR ls_rsparams.
    ls_rsparams-selname  = 'S_BUDAT'.
    ls_rsparams-kind = 'S'.
    ls_rsparams-sign = 'I'.
    ls_rsparams-option = 'BT'.
    ls_rsparams-low =  '20111001'.
    ls_rsparams-high = '20111031'.
    APPEND ls_rsparams TO lt_rsparams.
    SUBMIT zpp_rep_hemm_perf WITH SELECTION-TABLE lt_rsparams
                      USING SELECTION-SCREEN '1000'
                      AND RETURN.

  • Using Ajax and Siebel CRM OnDemand Web Services

    Hello,
    Is anyone using Ajax to access Siebel CRM OnDemand Web Services from a web page? If so do you perhaps have a code sample?
    thank you.

    Hi Zohaib,
    your problem is that you need to obtain and import the SSL security certificate from your CRMOD server into the certificate store of your client application.
    for example:
    C:\Oracle\Middleware11113\jdk160_18\bin\keytool -importcert -trustcacerts -keystore C:\Oracle\Middleware11113\jdk160_18\jre\lib\security\cacerts -storepass changeit -noprompt -file C:\Users\Mick\Documents\Projects\SCB\DER\DER.cer -alias crmodnew
    To be sure you are using that trust store you can then explicitly set the path to it thus:
    System.setProperty("javax.net.ssl.trustStore", "/Oracle/Middleware11113/wlserver_10.3/server/lib/cacerts");
    This should get you going in accessing CRMOD from your Java code (ie running the java class directly in jdev) i nJDeveloepr 11.1.1.4, however be aware that there is an issue in the embedded WebLogic Server 10.3.4.0 that prevents successfully calling a CRMOD ws (you can login but not invoke a QueryPage for instance). To work around this until it is fixed I suggest you use JDeveloper 11.1.1.3 as the embedded WLS in this does work when accessing CRMOD web services, however you need to undertake the extra steps of enabling JSSE in your embedded WLS as well as importing the above cert into the WLS cert store, ie:
    C:\Oracle\Middleware11113\jdk160_18\bin\keytool -importcert -trustcacerts -keystore C:\Oracle\Middleware11113\wlserver_10.3\server\lib\DemoTrust.jks -storepass DemoTrustKeyStorePassPhrase -noprompt -file C:\Users\Mick\Documents\Projects\SCB\DER\DER.cer -alias crmodnew
    C:\Oracle\Middleware11113\jdk160_18\bin\keytool -importcert -trustcacerts -keystore C:\Oracle\Middleware11113\wlserver_10.3\server\lib\DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -noprompt -file C:\Users\Mick\Documents\Projects\SCB\DER\DER.cer -alias crmodnew
    Cheers,
    Mick.

  • How to upload a file to the server using ajax and struts

    With the following code iam able to upload a file ato the server.
    But my problem is It is working fine if iam doing in my system nd when iam trying to
    access theis application from someother system in our office which are connected through lan
    iam getting an error called 500 i,e internal server error.
    Why it is so???????
    Plz help me????????
    It is required in my project.
    I want the code to access from every system.
    My exact requirement is i have to upload a file to the server and retrive its path and show it in the same page from which we
    have uploaded a file.
    Here the file has to be uploaded to the upload folder which is present in the server.Iam using Tomcat server.
    Any help highly appreciated.
    Thanks in Advance
    This is my input jsp
    filename.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    <script type="text/javascript">
    alertflag = true;
    var xmlHttp;
    function startRequest(file1)
         if(alertflag)
         alert("file1");
         alert(file1);
    xmlHttp=createXmlHttpRequest();
    var video=document.getElementById("filepath").value;
    xmlHttp.open("POST","FilePathAction.do",true);
    xmlHttp.onreadystatechange=handleStateChange;
    xmlHttp.setRequestHeader('Content-Type', application/x-www-form-urlencoded');
    xmlHttp.send("filepath="+file1);
    function createXmlHttpRequest()
         //For IE
    if(window.ActiveXObject)
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
         //otherthan IE
    else if(window.XMLHttpRequest)
    xmlHttp=new XMLHttpRequest();
    return xmlHttp;
    //Next is the function that sets up the communication with the server.
    //This function also registers the callback handler, which is handleStateChange. Next is the code for the handler.
    function handleStateChange()
    var message=" ";
    if(xmlHttp.readyState==4)
         if(alertflag)
              alert(xmlHttp.status);
    if(xmlHttp.status==200)
    if(alertflag)
                                       alert("here");
                                       document.getElementById("div1").style.visibility = "visible";     
    var results=xmlHttp.responseText;
              document.getElementById('div1').innerHTML = results;
    else
    alert("Error loading page"+xmlHttp.status+":"+xmlHttp.statusText);
    </script></head><body><form >
    <input type="file" name="filepath" id="filepath" onchange="startRequest(this.value);"/>
    </form>
    <div id="div1" style="visibility:hidden;">
    </div></body></html>
    The corresponding action class is FIlePathAction
    package actions;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.*;
    public class FilePathAction extends Action{
         public ActionForward execute(ActionMapping mapping, ActionForm form,
                   HttpServletRequest request, HttpServletResponse response)
                   throws IOException, ServletException
              String contextPath1 = "";
              String uploadDirName="";
              String filepath="";
                        System.out.println(contextPath1 );
                        String inputfile = request.getParameter("filepath");
                        uploadDirName = getServlet().getServletContext().getRealPath("/upload");
                        File f=new File(inputfile);
    FileInputStream fis=null;
    FileOutputStream fo=null;
    File f1=new File(uploadDirName+"/"+f.getName());
    fis=new FileInputStream(f);
         fo=new FileOutputStream(f1);
                        try
         byte buf[] = new byte[1024*8]; /* declare a 8kB buffer */
         int len = -1;
         while((len = fis.read(buf)) != -1)
         fo.write(buf, 0, len);
                        catch(Exception e)
                                  e.printStackTrace();
                        filepath=f1.getAbsolutePath();
                        request.setAttribute("filepath", filepath);
                        return mapping.findForward("filepath");
    Action-mappings in struts-config.xml
    <action path="/FilePathAction"
                   type="actions.FilePathAction">
                   <forward name="filepath" path="/dummy.jsp"></forward>
              </action>
    and the dummy.jsp code is
    <%=request.getAttribute("filepath")%>

    MESSAGE FROM THE FORUMS ADMINISTRATORS and COMMUNITY
    This thread will be deleted within 24 business hours. You have posted an off-topic question in an area clearly designated for discussions
    about Distributed Real-time Java. Community members looking to help you with your question won't be able to find it in this category.
    Please use the "Search Forums" element on the left panel to locate a forum based on your topic. A more appropriate forum for this post
    could be one of:
    Enterprise Technologies http://forums.sun.com/category.jspa?categoryID=19
    David Holmes

  • Use ajax and validation at the same time

    Hi everyone,
    I've been trying Spry for a little while. It's quite cool to
    me! The validation widget is good and ajax, but I'm not sure how to
    use both of them in a form.
    I have a contact form which needs the name, email and message
    required validation. I don't use the onblur or onchange validation
    but onsubmit (by default). I want that when user clicks the submit
    button, it will call ajax to send the email to me without
    refreshing the page. So in the onsubmit event I put this
    onSubmit="return Spry.Utils.submitForm(this, updateResponseDiv);"
    like in the sample. But in fact it calls ajax directly and skips
    the validation.
    Are there any ways to make it not to execute the ajax call
    when validation is not passed?
    Thanks a lot!

    check out this:
    http://labs.adobe.com/technologies/spry/samples/form_submission/Submit_and_Validate_Form.p hp.html

  • Using cookies and JavaScript to create a page to page timer.

    I have long wanted to be able to measure the time it takes to get from one page to another.  While reading in my JavaScript reference the other day, I came across cookies.  I've long known about cookies but have never used them.  The thing that looked attractive was that you can access cookies from both JavaScript and CF.
    So I put together the procedures to store the "start time" (startTimeP8D) for the transition and activated it on the onUnload event of a 1stpage.  After a few rewrites I got it working.   Here is the JavaScript to do that: it consists of two functions: doTimer which is the input section and setCookie, which writes to the cookie.  Not the two numbered alert statements.
    doTimer - results for "start" from the doTimer function called from page 1 when it unloads. (See doTimer below)
         Please note that the two startTime8D values are the same immediately after they are stored.
    On the 2nd page in the sequence, I run the corresponding code to determine the "end time", compute the delta and write it out to the page.  It didn't all run on the first try, but it now seems to be running without a crash, which can be misleading.
          second set of outputs from page 2:    
         Please not that while the endTimeP8D match, the startTimeP8D value no longer matches the previously stored value. 
    There is one major hitch in the get along which has me stymied:  As you can see, when you compare the startTimeP8 in the setCookie – results above and the "startTimeP8" in the doTimer results below the startTimeP8 is not the value that I wrote to the cookie @ unload of page 1.  I have checked and checked and do now see anywhere that the startTimeP8D value is being overwritten.  Based upon my limited experience with JavaScript cookies, it seems to me that you get an entry for each time you set the cookie.  So I would expect to see to startTimeP8D entry for each setCookie event, not a different value.
         The result of the failed computation is shown on the bottom of the page.  As you can see, the Total Elapsed Time is negative, which is never a good sign.  The other time shown, Page build time, is the run time from the server.  The whole purpose is to be able to show folks that the reason the code might be show is because of their overloaded network and not our code.  We had one client whose had users running on 56k modems.  It was so slow their VPN software was timing out!!!  Still the had the never to blame us!!!
    I am using SQLServer 2005, CF8, IE8 on W7. 
    I'm not married to this way of doing this so if anyone has a better/easier way of doing a "page to page timer", I'm up for it.  I'd prefer to fix this one since I've been working on it for the past 3 days.
    Thanks in advcance for your help.
    Len, PHRED SE

    Here it is with no JQuery or console logging calls using cookie utility functions found here:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
           "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
         <title>Test JavaScript Page Load Timer</title>
         <script>
              window.onload = function(){
                   var previousPageUnload = getCookie('unloadTime');
                   if(previousPageUnload){
                        var d = new Date();
                        var loadTime = d.getTime() - previousPageUnload;
                        alert(loadTime + 'ms');
              window.onunload = function(){
                   var d = new Date();
                     setCookie('unloadTime',d.getTime());
              function setCookie(c_name,value,expiredays) {
                   var exdate=new Date();
                   exdate.setDate(exdate.getDate()+expiredays);
                   document.cookie=c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
              function getCookie(c_name) {
                   if (document.cookie.length>0) {
                     c_start=document.cookie.indexOf(c_name + "=");
                     if (c_start!=-1)
                       c_start=c_start + c_name.length+1;
                       c_end=document.cookie.indexOf(";",c_start);
                       if (c_end==-1) c_end=document.cookie.length;
                       return unescape(document.cookie.substring(c_start,c_end));
                   return null;
         </script>
    </head>
    <body>
         <h1>Test JavaScript Page Load Timer</h1>
    </body>
    </html>
    Note that overwriting global window events like this is not a good idea, which is why I used JQuery in my earlier example. I strongly suggest you look at JQuery or one of the other JS libraries (YUI, etc.) to help with event handling. I'll leave it at that as this is getting into JavaScript development, not really on topic for a ColdFusion forum.

  • Is my picture data (tags, star rating) transferred using Windows Easy Transfer

    Hi,
      I bought a new computer and want to make sure that the tags and star ratings from my pictures are transferred to my new computer when I use Photoshop Organzier.  Will this be done simply by copying it using Windows Easy Transfer, or is there something special I must do?
    Thank You:>

    No. Use back-up and restore within Elements.
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html

  • AJAX and javascript document.write

    I have a region template on my page which uses javascript to generate part of the template depending on item values using document.write
    I am using the htmldb_get function to refresh this region (the whole template). I am able to retrieve and display everything apart from the javascript document.writes these do not seem to be retrieved by the htmldb_get.
    (i'm guesssing that the htmldb_get only retrieves what you would see if you did a view > source from your browser menu?? any javascript changes to the html are not visible in the source and so are not retrieved..)
    any body got any ideas as to how i would retrieve the region with the javascript document.write changes included??

    Hello,
    It's not going to work all you can do is pull and insert the content.
    Carl

  • Remember Login using cookies and javascript

    Hello all,
    This is an urgent request. Pls reply asap.
    I have two jsps one in English and other in french. I need to implement a functionality to remember the username in both these jsps. I have a function written in javascript to check if the "remember me" checkbox is enabled and then remember the user name. But it is not working as expected. It remembers in one jsp and if i go to french jsp all the info is lost.
    Can you pls help me? Sample code would help.
    I guess the cookie works only for the jsps under certain folder path say en/jsp/.. and fr/jsp/..

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Login Form</title>
    </head>
    <body>
    <form name="login" method="post" action="Home.jsp">
    Email : <input type="text" name="email" /><br />
    Password : <input type="password" name="password"/><br />
    <input type="checkbox" name="rememberChk" value="on" />Remember Me <br/>
    <input type="hidden" name="remember" value="0"/>
    <input type="button" value="Sumbit" onClick="submitForm()"/>
    </form>
    </body>
    <script>
         <%
         String email="";
         String password="";
         Cookie cookies [] = request.getCookies ();//Get All Cookies from Client Device
         if (cookies != null){//Check cookies are available
              for (int i = 0; i < cookies.length; i++){
                   if (cookies .getName().equals("password")){
                        password=cookies[i].getValue();//Password which is saved on cookie
                        break;
              for (int i = 0; i < cookies.length; i++){
                   if (cookies [i].getName().equals ("email")){
                        email=cookies[i].getValue();//Email which is saved on cookie
                        break;
         }%>
         function submitForm()//Submit function with checkbox determined value
              if(document.login.rememberChk.checked)
                   document.login.remember.value = 1;
              else
                   document.login.remember.value = 0;
              document.login.submit();
         document.login.email.value="<%=email%>";
         document.login.password.value="<%=password%>";
    </script>
    </html>
    login.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Home Page</title>
    </head>
    <body>
    <a href="logout.jsp">Logout</a><br />
    <%
         String email;
         String password;
         String remember;
         email = request.getParameter("email".toString());
         password = request.getParameter("password".toString());
         remember = request.getParameter("remember");
          *if Remember Checkbox is Checked
          *then Save Email and passwod into Cookie
          *and Add Cookies into response/Client Device
         if(remember.equals("1")){
              Cookie pass = new Cookie("password",password);
              Cookie emailAdd = new Cookie("email",email);
              //Setting maximum Expiry Date Of Cookies
              pass.setMaxAge(365);
              emailAdd.setMaxAge(365);
              //Make Persistent Cookie onto Client Device
              response.addCookie(pass);
              response.addCookie(emailAdd);
    %>
    <h4>Welcome - <%=email%> </h4>
    Your password is : <%=password%> <br />
    </body>
    </html>
    Home.jsp
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <html>
    <%
    Cookie cookies [] = request.getCookies ();//Get All Cookies from Client Device
    if (cookies != null){//Check cookies are available
         for (int i = 0; i < cookies.length; i++){
              if (cookies .getName().equals("password")){
                   Cookie cookie = cookies[i];
                   cookie.setMaxAge(0);
                   response.addCookie(cookie);
                   break;
         for (int i = 0; i < cookies.length; i++){
              if (cookies [i].getName().equals ("email")){
                   Cookie cookie = cookies[i];
                   cookie.setMaxAge(0);
                   response.addCookie(cookie);
                   break;
    response.sendRedirect("login.jsp");
    %>
    </html>
    logout.jsp

  • Keynote export options using Quicktime and iDVD

    I am not happy with the output of HD Keynotes exported to iDVD...they work well with triggering the events with a click but the fonts look blocky. There is no way to upgrade the export settings to improve the quality.
    I'm trying to squeeze as much out of Keynote as possible... and it seems I'm hitting a few problems.
    Exporting the same Keynote to QT gets the clarity I want...because I can select the higher settings...and I can even "click" to trigger the events in QT Pro on my MBP... but as soon as I burn it in iDVD the clicks fail.
    I am hoping to combine the clickability of the export to iDVD movie with the quality of the export to QT movie.
    And I am soooo close.... I have discovered that the "clickability" seems to be controlled by a layer in the file called a Presentation Pause Track (found when I look at the movie properties).
    Have you come across this before?
    My plan was to extract the track and then add it to the hi res QT movie!!! I burnt the resulting QT to iDVD and the clicks were there!!! But the were all out of sync!
    I discovered the Presentation Pause Track is a different length than the QT export... and even when I've subsequently added the PPtrack using "add to selection and scale" it is still out of whack!
    Your help, guidance, commiserations would be appreciated...
    Surely there is a way to have my HD Quicktime cake and eat it too!

    Cheers Brian
    I'm green with envy re the 8 core Mac Pro!
    To add to the info: I'm trying to find out how you can export to QT and iDVD and get a 2 movies of the same length... which should allow me to copy the pause track over and not lose sync with the clicks.
    My latest test involves a 2 page Keynote (HD res) and the resulting QT export gave me a movie of 43 seconds while the iDVD export came out 57 seconds...
    That's with the default settings for slide and build duration of 5 and 2 sec. (could that represent 2 pages of 5 + 2 sec?)
    iDVD lets you alter these settings but to a minimum of 1 sec for each... QT export doesn't let you change these except for a self playing movie... so I'm now testing a self paced QT set at 1 and 1 sec and an iDVD set to 1 and 1 and see what happens...
    Do you think I'm on the right track or am I wasting my time?
    At least 8 cores might help reach theat conclusion a little faster!!

  • Make a read-only text field open by using button and javascript

    Hello
    I have a form with text fields that I will pre-populate with data. The text fields will be read-only by default. I want to make it so that when a user wants to make edits, he will need to click on a button and in turn, the text field's background will turn gray and he can make edits to the text field. I can already make the background turn gray but I cannot make the text field open.
    This is the code that will run after the button is clicked:
    color.ltGray = new Array("G", 0.75);
    this.getField('TestField').fillColor = color.ltGray;
    this.getField('TestField').access = "open";
    The text field's background turns gray but it is still read-only. Any ideas?
    Thanks in advance!

    Here's the online version of the Acrobat JavaSript documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/wwhel p.htm?href=JavaScript_SectionPage.70.1.html&accessible=true
    It's also available as a PDF in the Acrobat SDK.
    Regarding your other question about adding a PDF to another, do you want to add it as an attachment, or add the pages from one PDF to another?

Maybe you are looking for