Coldfusion with javascript

I have checkbox in coldfusion without a form and doing
calucation. I would like to get the checkbox value and pass to next
page. How can I do that. Again I don't have form. Just checkobxes..
by itself.
Thankx

without a form, you can't pass it to the next page via CF.
you'll need JS. use an onclick event in the checkbox to
modify whatever process brings up the "next page" by appending a
value to the URL.
i can be more specific if you can be a bit more descriptive.
how does the user get to the "next page"?

Similar Messages

  • Coldfusion with javascript alert problem with apostrophe

    Hi
    I have alert ("thanks for sing up #fname# - #lname# ")
    but fname='Charles's
    lanme ='Charles's'
    so javascript is not interpret with apostrophe . how can i
    resolve it thanks

    JSStringFormat()
    http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=ColdFusion_Documentation&file=00000543.htm

  • Open and Close Popup With Javascript

    Using Apex 3.2
    I have probably done this loads of times in my old job, but do not have access to the code and today I just can't get it to work properly.
    I have opened a pop up window with javascript
    Now I need to close it and refresh the calling page, but only if it passes the validation on the popup.
    I have a hidden item on my pop up called P7_FLAG.
    I have a page process after validation that sets P7_FLAG to (only set to 1, if passes validation).
    I also have a SUBMIT button.
    So once I click my SUBMIT button the page should look at the validations, if ok, set P7_FLAG to 1, then close the popup and refresh the calling page.
    My current javascript look like this
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>On my button
    javascript:saveChanges();The problem is that I need to click the SUBMIT button twice.
    First time it sets P7_FLAG
    Second time it closes page and refreshes.
    I have probably made some basic error, but today I cannot see it.
    Cheers
    Gus
    Edited by: Gus C on May 10, 2012 12:48 AM

    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    var test = $x('P7_FLAG').value;
    if(test == '1')
    window.close();
    window.opener.doSubmit('REFRESH');
    </script>javascript does not wait for the current action to complete and then perform the next line.
    means in your function call
    doSubmit('SUBMIT');is triggered and it carry on's to next line that is
    $x('P7_FLAG').value;this will not be set because you are setting the value of P7_FLAG to 1 in plsql and trying to check in javascript, which will not work.
    what you need to do is amend your js function like below
    <script type="text/javascript">
    function saveChanges(){
    doSubmit('SUBMIT');
    </script>create a page branch to procedure and make it conditional to when P7_FLAG = 1
    and set the branch source to below
    htp.p('window.close();');
    htp.p('window.opener.doSubmit(''REFRESH'');');

  • Links that open a new window with javascript:void(null); do not work in 3.1

    I've been noticing that any site I go to that opens content in a new window with "javascript:void(null);" will be ignored by Safari 3.1. The links work in Firefox and used to work in Safari as well. Any suggestions?

    General rule of thumb in the Mac universe...
    When Safari is updated most if not all third party add-ons break. That's because most don't play by the rules. The developer thinks they know how to do it better than Apple so they just do it their way. So the first rule of survival is to KNOW what you have installed on your machine at all times. Use something like textedit to create a document listing all of the third party stuff you have installed and religiously update the list. Second rule is to wait a few days before applying an update. Third rule is to visit your third party developers' sites and make sure their little gadget is compatible with the new Safari update.
    Being aware of things will make life much easier for you in the long run.

  • How to get real value from selectOneChoice with javascript?

    Hi,
    How to get real value from selectOneChoice with javascript? The event.getNewValue() only gets me the index of the selected item, not the value/title.
    JSF page:
    <af:resource type="javascript">
    function parseAddress(event)
    alert("new value: " + event.getNewValue());
    </af:resource>
    <af:selectOneChoice label="Location:" value="" id="soc4">
    <af:clientListener type="valueChange" method="parseAddress" />
    <f:selectItems value="#{Person.locations}" id="si7"/>
    </af:selectOneChoice>
    HTML :
    <option title="225 Broadway, New York, NY-10007" selected="" value="0">225 Broadway (Central Office)</option>
    <option title="90 Mark St., New York, NY-10007" value="1">90 Mark St. (Central Office)</option>
    Thanks a lot.

    Something I was missing ,
    You need to add valuePassThru="true" in your <af:selectOneChoice component. I have personally tested it and got the actual value in alert box. I hope this time you got the real solution. You can also test the following code by your end.
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1">
    <af:form id="f1">
    <af:panelBox text="PanelBox1" id="pb1">
    <af:selectOneChoice label="Set Log Level" id="soc1"
    value="#{SelectManagedBean.loggerDefault}"
    valuePassThru="true">
    <af:selectItem label="select one" value="First" id="s6"/>
    <af:selectItem label="select two" value="Second" id="s56"/>
    <af:clientListener method="setLogLevel" type="valueChange"/>
    </af:selectOneChoice>
    <af:resource type="javascript">
    function setLogLevel(evt) {
    var selectOneChoice = evt.getSource();
    var logLevel = selectOneChoice.getSubmittedValue();
    // var logLevelObject = AdfLogger.NONE;
    alert("new value is : " + logLevel);
    //alert(evt.getSelection);
    //alert(logLevelObject);
    evt.cancel();
    </af:resource>
    </af:panelBox>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • Problem with Javascript and opening a new page

    Hi,
    I'm developping a website with Java Server Faces.
    I've a problem with JavaScript.
    I have a table, and each row of that table, has a button, to display more information about that specific row. I want to display this information in a new window. For this I want to use JavaScript.
    The new window, of course, needs some information of the other window, to show the right data.
    The first time I click the 'more-information-button', it works perfectly, but from than on, he keeps showing the same information...
    Here is my jsp-page of the first page (the one with the table):
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
        <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
             <f:loadBundle basename="languages.MessageBundle" var="bundle"/>
            <html>
                <head>
                    <meta content="no-cache" http-equiv="Cache-Control"/>
                    <meta content="no-cache" http-equiv="Pragma"/>
                    <title>- UCV-Period -</title>
                    <link href="resources/stylesheet.css" rel="stylesheet" type="text/css"/>
                </head>
                <body style="-rave-layout: grid">
                        <h:dataTable binding="#{UcvPeriod.dataTable1}" headerClass="list-header" id="dataTable1" rowClasses="list-row-even,list-row-odd" rows="5"
                            style="left: 24px; top: 168px; position: absolute" value="#{UcvPeriod.dataTable1Model}" var="currentRow">
                            <h:column binding="#{UcvPeriod.column1}" id="column1">
                                <h:outputText binding="#{UcvPeriod.outputUcvPeriod}" id="outputUcvPeriod" value="#{currentRow['UCVPERIOD']}"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText2}" id="outputText2" value="#{bundle.ucvPeriod_columnHeader_ucvPeriod}"/>
                                </f:facet>
                            </h:column>
                            <h:column binding="#{UcvPeriod.column11}" id="column11">
                                <h:commandButton action="#{UcvPeriod.btnDetails_action}" binding="#{UcvPeriod.btnDetails}" id="btnDetails" value="+" onclick="window.open('Details.jsp')"/>
                                <f:facet name="header">
                                    <h:outputText binding="#{UcvPeriod.outputText21}" id="outputText21" value=""/>
                                </f:facet>
                            </h:column>
                        </h:dataTable>
                    </h:form>
                </body>
            </html>
        </f:view>
    </jsp:root>Here is my action, when someone clicks on the 'more-information-button':
    public String bthnDetails_action() {
       Object s = outputUcvPeriod.getValue();
       BigDecimal ucvPeriod = (BigDecimal)outputUcvPeriod.getValue();
       this.getSessionBean().setUcvPeriod(new Integer(ucvPeriod.intValue());
       return "detail_ucvperiod";
    }Here is my constructor of the Detailspage.
        public Details() {
             this.txtUcvPeriod.setValue(this.getSessionBean().getUcvPeriod());
        }Here is the navigation part for this part of my faces-config.xml .
    <navigation-rule>
       <from-view-id>/UcvPeriod.jsp</from-view-id>
       <navigation-case>
           <from-outcome>detail_ucvperiod</from-outcome>
           <to-view-id>/UcvPeriod.jsp</to-view-id>
       </navigation-case>
    </navigation-rule>Thx a lot....
    Anneke

    See the tutorial "Sharing Data Between Two Pages" at http://devservices.sun.com/premium/jscreator/standard/learning/tutorials/data_sharing_twopages.html and the FAQ "How can I pass data between pages without creating SessionBean variables in Creator?" at http://devservices.sun.com/premium/jscreator/standard/reference/faqs/technical/javasource/passing_data.html. Since you can open a new window when your button is clicked, the tutorial and FAQ will explain ways to pass your data to the new window.

  • Problem with JavaScript in URL iView

    Hi,
    I am facing a problem with javascript when i am trying to access my application through URL iView. In the javascript window.top is used to access the frames in the window. But the EP is not recognizing it as valid. what exctly the problem and please suggest me a solution.
    Ashok.

    Hi,,
    thanks for the quick reply. But what i asked was different. I will put it in different way. I have deployed a application in Web Application Server and trying to access it through URL iView. My application is pure J2EE application with html,jsp and JS files. In javascript we used window.top property of the java script which is working fine MS IE. The problem is window.top is a IE specific property which is not having any equallent open standerd so EP is throwing a java script error. As I know the only possible solution for this problem is inherating IE rendaring capabilities to iView(i.e iFrame). is there any way to do that?
    Ashok.

  • Problem with JavaScript in DPS

    Hello,
    i have little problem with one HTML page in DPS. We've created HTML form, which is formatting output with JavaScript and then passing to local mail client via mailto. It works nicely in Safari on desktop, it works in Safari on iPad BUT it don't work in DPS, when we use it as HTML content (frame on page where form is loaded). Unfortunately, there is no way how to learn what's wrong - on iPad it works, it's not working just in DPS (and it's not working in Viewer on desktop too).
    Anyone have any idea what to do?
    Script is fairly simple, it's my compilation of other works, because i'm not JS programmer, just i'm skilled with google-copy-paste... So there can be some VERY trivial error, but i don't know correct syntax...
    very simple version of this form, which is not working in DPS (but everywhere else), is here
    http://dl.optio.cz/mailtoExample.html
    Thanks for any help!

    Hello,
    when used in DPS browser, it's working (as part of HTMLresources.zip). I don't know if this will help, but here is small game, which works correctly in DPS in web overlay. when you move any red circle, it will let you send results via email. But this is too complicated for my minimal skills.
    http://dl.optio.cz/Hra_en/
    Anyway, thanks for help
    Martin

  • Web.show_document() with javascript

    Hi Guys,
    I'v been searched this forum about web.show_document() with javascript.
    I saw some threads said
    I can do like
    WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');
    and someone said it worked, but it doesn't work in my machine.
    also some one said the javascript engine is not included in Form 10.1.2, so I can not use WEB.SHOW_DOCUMENT function like above.
    My form builder is 10.1.2.0.2 (Production), os is xp sq2 ,ie 6.(ie6 has some tighter security)
    I want to get clarification about this function, can i use the javascript on it or not ? I really want the pop up window without toolbar and customize size. I need do some configuration in formweb.cfg also?
    Thanks in advance. I appreciated every response.
    Appcat

    Hi Jan,
    Thanks for your reply. I check the metalink about it.
    The first solution is
    1. Make forms Developer URL a trusted site in IE to allow script executions.
    For that open Internet Explorer->Internet Option-> Security.
    Select the "Trusted Sites" Option.
    Click on the Sites Button.
    Add the Developer Suite URL in that.
    for example
    http://<Yourmachinename>:8889/
    It doesn't work in my machine ,still can not activate the javascript.
    The second solution is
    2. Place the script invocation code in a html file in Oracle_home/forms/server directory and call it.
    For example :
    Create a simple form.
    In Forms Trigger :
    web.show_document('http://<Yourmachinename>:8889/file.html');
    In the file.html you may enter the code, for example:
    <HTML>
    <HEAD>Heading</HEAD>
    <BODY>
    <SCRIPT LANGUAGE="Javascript">
    window.open("http://www.yahoo.com","_self");
    </SCRIPT>
    </BODY>
    </HTML>
    It also doesn't work in my machine, the problem is http://<Yourmachinename>:8889/file.html can not be found, even i put it under the Oracle_home/forms/server folder, but i click it directly ,the javascript works. that means the URL http://<Yourmachinename>:8889/file.html is incorrect or I should put the html file into other directory. And I also checked the default.env,FORMS_PATH=D:\DevSuiteHome\forms.
    anything wrong with my env?
    Do you have any idea about it?
    Thanks,
    Appcat
    Message was edited by:
    user577805
    Message was edited by:
    user577805

  • Printing different URL with javascript

    I am trying to print a URL using javascript but i do not want to print the current page. I have searched google, this forum and a javascript book and can not seem to figure it out. To exlplain in it generic terms i want to be on one page and tell it to print another. Reason being, I am looking at an overview page and want to print a report made in Oracle reports, (Yes I could load the report and print it but i want to print multiple reports from one button)(The reports do work and are valid) Here is a rundown of what I am doing.
    From a button i am calling a 'url' with the following code:
    javascript:V_PRINT('P50_CUSTOMER_ID','P50_YEAR');
    And then in the html header i have the code: (printing same page twice, just an example)
    <script language="JavaScript" type="text/javascript">
    function V_PRINT (formItem1,formItem2) {
    var formVal1 = document.getElementById(formItem1).value;
    var formVal2 = document.getElementById(formItem2).value;
    var url1;
    var url2;
    url1 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url2 = 'http://www.google.com/search?hl=en&q=' + formVal1 + '+' + formVal2;
    url1 = print();
    url2 = print();
    </script>
    This code just prints the current page. I know I am calling print incorrectly and thats where i need the help. Of course I might just be approaching it all wrong. Either way I hope someone with javascript knowledge can help.
    Thanks

    Hello,
    To print a page it has to be open in the browser since all it does it call the browsers print dialog.
    Here is one solution http://www.irt.org/script/508.htm and you can also try a iframe instead of a regular frame.
    If it's crossdomain request like your example here that might cause problems as well. There might be additional problems.
    Carl

  • The combination of report with javascript

    Hi guys,
    I want to use report combined with javascript as follows:
    <APPLET NAME="ASMGridAppAssembly" ...
    PARAM NAME="QueryTemplate" VALUE="..../Reports/PTSD/AsmNCMFRXQuery">
    <PARAM NAME="DisplayTemplate" VALUE=".../Reports/AsmGrid">
    <param name="Param.1" value=>
    <param name="Param.2" value=>
    </APPLET>
    document.ASMGridAppAssembly.getQueryObject().setParam(3,Param3);
    document.ASMGridAppAssembly.getQueryObject().setParam(4,Param4);
    Can I achieve this?
    Thanks,
    Tony.
    Edited by: Tony Hu on Aug 8, 2008 7:07 PM

    Mike - Huh?  If javascript is called to an active applet on the page that received Param.1 and Param.2 through param overrides in the html (like shown in Tony's post) they will absolutely override any static ones that are in the query template itself.
    Tony - you need to instruct the applet to run the query with your 2 new parameters, so add this line after setting param 3 and 4:
    document.ASMGridAppAssembly.updateGrid(true);
    Regards,
    Jeremy

  • XML IDOC post to R/3 Via WAS - want to see error content with JavaScript

    Hi,
    I am posting XML IDOCs to our R/3 system via a webpage that I have built with JavaScript.  I am posting to the WAS, which is configured to read the XML IDOC with SAP's standard class handler CL_HTTP_IDOC_XML_REQUEST.  We are on basis 620 support pack SAPKB62041.
    In my webpage, I have the JavaScript code set to read the status and statusText so I can see the response from WAS when I post my XML IDOC.  However, I am getting back very generic information when I encounter a 409 error.  THe statusText is always "input_not_found".  So I debugged the class handler code and found that SAP is returning back the more descriptive error info in HTML format.
    I ran a packet sniffer to see what WAS returns and the info looks like this:
    <html><head><title>IDoc-XML-inbound not ok</title><h1>IDoc-XML-inbound not ok</h1></head><body>
    E:Table Lookup Error:300 Cannot map value for field MESCOD in table ZFI_IF_IDOCORG using values
    SNDSAD = |TE|  and RCVLAD = |GL|  and MESTYP = |ACC_DOCUMENT|</body></html>
    I want to know how I can get my webpage to read this HTML info and store that into an alert so I can read this text that I'm returning back to the HTTP post.
    This is how my script looks.  I'm using IE6.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
         <title>Test XML</title>
    <SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
    <!--
    function XMLHTTPButton_onclick(DataToSend) {
         var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
         xmlhttp.Open("POST","http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN",false);
         xmlhttp.setRequestHeader("Content-Type", "text/xml");
         xmlhttp.send(DataToSend);
            alert(xmlhttp.Status);
            alert(xmlhttp.statusText);
         alert(xmlhttp.responseXML.xml);
    //-->
    </SCRIPT>
    </head>
    <body>
    <BR>
    This page posts to
    <BR>
    http://some_server:1089/sap/bc/zxml_idoc?sap-client=200&sap-language=EN
    <FORM name=xmlform method=post >
    <P><TEXTAREA style="WIDTH: 623px; HEIGHT: 369px" name=xmlData rows=23 cols=77>
    </TEXTAREA>
    <P>
    <INPUT type="button" value="Submit XMLHTTP" id=XMLHTTPButton name=XMLHTTPButton
    LANGUAGE=javascript onclick="return XMLHTTPButton_onclick(document.xmlform.xmlData.value)">
    </form>
    Previously with this class handler, SAP returned the detailed info back to the "alert(xmlhttp.statusText)" and I had no problem seeing the return info.  But now they have decided to format it in HTML and I don't know how to view this text since it has no ID on it to pull this into an alert box.
    If anyone has any ideas, please let me know.
    Thanks,
    Andrea

    Ok!
    I have solve the problem. So, I was trying to connect via SSO within an user that was not registered in R/3 and I forgot it.
    Sorry for the inconvenience.

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • Pages not loading completely with JavaScript enabled

    This just started in the last day or so. I have Safari extensions disabled.
    When I go to the ThinkProgress.org site/blog, I'm getting an incomplete page unless I disable JavaScript. With JavaScript, I'll get the first post on the blog, but nothing else. With JavaScript off I get the site looking pretty much normal.
    I get a similar problem if I go to Economist.com and click to read one of the stories. In that case, I get the story's headline, but it cuts off before the text of the article, right after a link to Tweet the story. Again, disabling JavaScript allows the page to load correctly.
    I suspect some third-party service is providing a script, which broke in the last day or so, but nobody's paying attention because of the Holidays.
    The problem doesn't appear to effect Chrome. Safari was upgraded to 5.0.3 in November, but this problem is more recent than that.
    Has anyone else seen this?

    Hi Jonathan,
    Go to the Economist.com site.
    From your Safari menu bar click Safari / Preferences then select the Advanced tab. Select the box next to: Show Develop menu in menu bar.
    Now click Develop / Disable Runaway JavaScript Timer.
    See if that makes a difference.
    Otherwise, check Safari / Preferences - Extensions or try disabling Safari plugins, Safari / Preferences - Security.
    And delete the cookies associated with those url's in Safari / Preferences - Security. Show Cookies
    Carolyn

  • Change page attribute with JavaScript

    Hi,
    hope someone can help.
    Is it possible to change a BSP page attribute with JavaScript??
    I have a JavaScript array with some serialnumbers. After push a save button, i want to save the array data into a page attribute.
    Some ideas?
    Regards Anton

    Hi,
    The only way of passing vars from JS to page attributes is submitting them via (hidden) values in a form or via params in an URL.
    Alternatively, you can try to let JS store things in a client cookie and let the BSP read that cookie.
    I didn't try that out yet though.
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

Maybe you are looking for

  • Unable to install Edge Animate via AAM - Windows 8

    Hi there, I am trying to install Edge Animate via Adobe Application Manager... I get an error saying another installer is already running and to wait and try again. Ive checked and does not look like any other installer is running. Ive also restarted

  • Adobe After Effects Startup Error!

    I just recently installed After Effects on my new PC and when I open the program it says: After Effects error: Crash in progress. Last logged message was: <1204> <GPUManager> <2> Sniffer Result Code: 1 What is going on and how can I fix this?

  • Displaying employee photo during runtime

    I form for employee master and i want to store all employee photo in file and have them displayed during runtime from the file directory. That is when i query for an emp_no the records along with the picture in the file directory should also come up?

  • How can I run this java program? Please help.

    I have jmf installed, sunone running , the file may be in the wrong directory. It is in some directory nowhere near the java lang dir. When I try to compile or build i cant. I'm off on a basic thing. here is the code. import     javax.sound.midi.Inva

  • Account Payables

    Dear SAP consultants, I have a prepayment to vendor Please tell me Transaction to input this document. How to map it to invoice when I payment it