Access to HTMLB with JavaScript in DynPage class

Hi, in the documentation JavaScript API of SAP HTMLB Guidelines there is an example code in 4 parts.
1.
Form form = (Form)this.getForm();
nputField inf2 = new InputField("currencyDisplay");
inf2.setJsObjectNeeded(true);
inf2.setClientEvent(EventTrigger.ON_CHANGE, "calculateCurrencyToFrom()");
inf2.setBCD("100");
inf2.setWidth("250px");
form.addComponent(inf2);
2.
function calculateCurrencyFromTo() {
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield = eval(func("currencyDisplay"));
if (inputfield)
inputfield.setValue("100.23"); }
3.
InputField inf2 = new InputField("currencyDisplay");
String inputfieldID = pageContext.getParamIdForComponent(inf2);
4.
<script> var inputfield = eval(inputfieldID);</script>
I try to run this code in DynPage class. I put the code part 1 in doBeforeProcess(), then use form.addRawText() to send JavaScript code to client.
<script> var inputfield = eval(inputfieldID);
function calculateCurrencyFromTo(){
var funcName = htmlb_formid+"_getHtmlbElementId";
func = window[funcName];
var inputfield = eval(func("currencyDisplay"));
if (inputfield)
inputfield.setValue("100.23");}
</script>
question:
Where to put the part 3 in order to detect the input field is selected or triger the event? Thank you for help.
Yantong Wang

Hi Raymond,
Try out the following piece of code (the code is tested and is working):
<hbj:textEdit      id="addComments"
                    wrapping="SOFT"
                    text=""
                    rows="2"
                   cols="100" >
     <% addComments.setJsObjectNeeded(true); %>
</hbj:textEdit>
Then through javascript you can access the id of the text edit in the similar fashion.
var txtAdCom= eval(func("addComments"));
var value =txtAdCom.getValue();
var length = txtAdCom.getValue().length;
Please do reward with points if the solution is helpful.
Thanks
Ritushree

Similar Messages

  • Access embedded reader with javascript

    For a project I'm looking for a way to display pdf files within a webbrowser. I have IE8+ with acrobat reader available to me, so i can display any given pdf. But i would like to be able to change pages, jump to bookmarks with javascript functions in my html page.
    So in other words: does acrobat reader have somesort of api through which i can access my document using javascript?

    Post the query in the forum for Acrobat SDK.

  • Accessing Context Data with JavaScript in Adobe Form

    Hi,
    does anybody know, how to access a context element with javascript in an adobe form, because I have to decide which elements will be shown at the form, depending on one context value.
    Thank you for your help!
    Kind regards, Patrick.

    Hi,
    First of all your WD context is mapped to the data view in the form. You can only access via scripting what is mapped to the data view and you get the values that the PDF currently has stored. The WD context and the data values in the context might differ (eg. due to editing).
    Use scripting like xfa.resolveNode("xfa.dataset.data.<path.to.the.node>") to get a reference to the data node.
    Then you can use the "value" property to access the data value.
    Regards
    Juergen Hauser

  • Accessing Meta-Data with JavaScript

    Hi,
    In U3D one can add meta-information to the file.
    Could anyone access this mata-information with JavaScript in Acrobat?
    I could not find any documentation in the API or references on Internet, so far...
    Thank you for every hint!
    Felix

    Felix,<br />   Here's a hunk of code which will cycle through all the nodes, showing they're metadata. If the MD in the header is available, it will also be shown. Otherwise, no access to header info!<br /><br />//=========================================<br />console.println("scene.nodes.count = " + scene.nodes.count);<br />console.println ("----------------------------");<br />for (i=0; i<scene.nodes.count; i++)<br />{<br />   objNode = scene.nodes.getByIndex(i);<br /><br />   if (objNode == undefined)<br />   {<br />      console.println ("   *** node = undefined ***\n\n");<br />   }<br />   else<br />   {<br />      console.println ("Node [" + i + "] metadataString = " + objNode.metadataString );<br />   }<br />}<br />//=========================================

  • How to access web services with Javascript

    I want to create a XUL/Javascript form which uses CRM On Demand web services. At this time I cannot login (no sample code is given for javascript), therefore I generate my JSESSIONID separately, try and put it in the URL I call in my code, but the server answers back with the logon.jsp page.
         function test()
    var xmlToSend = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:con='urn:crmondemand/ws/contact/' xmlns:con1='urn:/crmondemand/xml/contact'>";
         xmlToSend += "<soapenv:Header/>";
         xmlToSend += "<soapenv:Body>";
         xmlToSend += "<con:ContactWS_ContactQueryPage_Input>";
         xmlToSend += "<con1:ListOfContact>";
         xmlToSend += "<con1:Contact>";
         xmlToSend += "<con1:ContactId></con1:ContactId>";
         xmlToSend += "<con1:AccountId></con1:AccountId>";
         xmlToSend += "<con1:ContactEmail>= '[email protected]'</con1:ContactEmail>";
         xmlToSend += "<con1:ContactFirstName></con1:ContactFirstName>";
         xmlToSend += "<con1:ContactFullName></con1:ContactFullName>";
         xmlToSend += "<con1:ContactLastName></con1:ContactLastName>";
         xmlToSend += "<con1:AccountName></con1:AccountName>";
         xmlToSend += "</con1:Contact>";
         xmlToSend += "</con1:ListOfContact>";
         xmlToSend += "</con:ContactWS_ContactQueryPage_Input";
         xmlToSend += "</soapenv:Body>";
         xmlToSend += "</soapenv:Envelope>";
    var xmlhttp;
         xmlhttp = new XMLHttpRequest();
         xmlhttp.overrideMimeType('text/xml');
         xmlhttp.onreadystatechange=DisplayContact;
         xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/", false);
         xmlhttp.setRequestHeader('Man', 'POST /Services/Integration;JSESSIONID=blablabla HTTP/1.1');
         xmlhttp.setRequestHeader('Content-Type', 'text/xml');
         xmlhttp.setRequestHeader('Content-Length', xmlToSend.length);
         xmlhttp.setRequestHeader('SOAPAction', 'document/urn:crmondemand/ws/contact/:ContactQueryPage');
    function DisplayContact()
              if (xmlhttp.readyState==4) {
                   if (xmlhttp.status==200) {
                        var response = xmlhttp.responseXML;
                        var responsetxt = (new XMLSerializer()).serializeToString(response);
                        document.write(responsetxt);
    The result is: responsetxt always contains the HTML code of logon.jsp.
    Anyone could help with a login code, or with the interrogation.
    Jeremy

    Hi,
    A JS Sample....
    You can use this JS in a Web Applet
    _____________________________________________ START OF FILE _____________________________________________
    <html>
    <head>
    <script type="text/javascript">
    var sso_token='%%%SSO Token%%%' // You can use an OCOD Variable in OCOD Web Applet
    sso_token = sso_token.replace(/\+/g, "%2B");//re-Encondig SSO-Token
    alert (sso_token);
    //////////////////////////////////// getInnerText() ////////////////////////////////////////
    function getInnerText(node) {
    if (typeof node.textContent != 'undefined') {
    return node.textContent;
    else if (typeof node.innerText != 'undefined') {
    return node.innerText;
    else if (typeof node.text != 'undefined') {
    return node.text;
    else {
    switch (node.nodeType) {
    case 3:
    case 4:
    return node.nodeValue;
    break;
    case 1:
    case 11:
    var innerText = '';
    for (var i = 0; i < node.childNodes.length; i++) {
    innerText += getInnerText(node.childNodes);
    return innerText;
    break;
    default:
    return '';
    //////////////////////////////////// sso_login() ////////////////////////////////////////
    //https://server/Services/SSOTokenValidate?odSsoToken = "ssotoken value"
    //https://server/Services/Integration?command=ssologin&odSsoToken="ssotoken value"
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function SSO_Login() {     
    //var url = 'https://secure-ausomxdsa.crmondemand.com/Services/SSOTokenValidate?odSsoToken='+sso_token; // Check SSO Token
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=ssologin&odSsoToken='+sso_token;
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.send(null);
    //////////////////////////////////// Login() ////////////////////////////////////////
    var ajax=null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
         ajax = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
         ajax = new XMLHttpRequest();
    function Login() {     
    var url = 'https://secure-ausomxdsa.crmondemand.com/Services/Integration?command=login';
    ajax.open("HEAD", url, true);
    ajax.onreadystatechange = getReponse;
    ajax.setRequestHeader('UserName','GLABADEN-FR13-15/WSUserName');
    ajax.setRequestHeader('Password','OnDemandPassword');
    ajax.send(null);
    //////////////////////////////////// getReponse() ////////////////////////////////////////     
    function getReponse(){
         switch(ajax.readyState){
              case 0:
              case 1:
                   //open com
              break;
              case 2:
                   //send query
              break;
              case 3:
                   //recieving data
              break;
              case 4:
                   //data received
                   //ajax.status contient 200, 404, ...
                   //ajax.statusText contient OK, NOT FOUND, ...
                   var reponseTexte= ajax.responseText;
                   var responseXml= ajax.responseXml;
                   alert(ajax.getResponseHeader("Set-Cookie"));
              break;     
    //////////////////////////////////// Call_WS() ////////////////////////////////////////     
    function Call_WS(){
    var xmlhttp =null;
    var browser = navigator.appName;
    if(browser == "Microsoft Internet Explorer"){
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }else{
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("POST", "https://secure-ausomxdsa.crmondemand.com/Services/Integration",true);
    xmlhttp.onreadystatechange=function() {
    if (xmlhttp.readyState==4) {
    rteNode = xmlhttp.responseXML.getElementsByTagName("ListOfContact").item(0);
    alert(rteNode.childNodes.length);
    for(var i=0; i<rteNode.childNodes.length; i++){
    switch( rteNode.childNodes.item(i).tagName ){
    case 'Contact':
    var ContactId = rteNode.childNodes.item(i).childNodes.item(0).tagName;
    var ContactIdValue = rteNode.childNodes.item(i).childNodes.item(0).text;
    var ContactIdGetValue = getInnerText(rteNode.childNodes.item(i).childNodes.item(0));
    alert(ContactId+" : "+ContactIdValue +" / "+ContactIdGetValue);
    break;
    case 'Other':
    break;
    default:
    break;
    xmlhttp.setRequestHeader("SOAPAction", "\"document/urn:crmondemand/ws/contact/10/2004:ContactQueryPage\"")
    xmlhttp.setRequestHeader("MessageType", "CALL")
    xmlhttp.setRequestHeader("Content-Type", "text/xml")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=UTF-8")
    //xmlhttp.setRequestHeader("Content-Type", "text/xml;charset=ISO-8859-1")
    var miSoap=
    '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="urn:crmondemand/ws/contact/10/2004" xmlns:con="urn:/crmondemand/xml/contact"> \n' +
    '<soapenv:Header/> \n' +
    '<soapenv:Body> \n' +
    '<ns:ContactWS_ContactQueryPage_Input> \n' +
    '<ns:PageSize>10</ns:PageSize> \n' +
    '<con:ListOfContact> \n' +
    '<con:Contact> \n' +
    '<con:ContactId></con:ContactId> \n' +
    '</con:Contact> \n' +
    '</con:ListOfContact> \n' +
    '<ns:StartRowNum>0</ns:StartRowNum> \n' +
    '</ns:ContactWS_ContactQueryPage_Input> \n' +
    '</soapenv:Body> \n' +
    '</soapenv:Envelope> \n' ;
    alert(miSoap);
    xmlhttp.send(miSoap);
    //$(document).ready(function () {
    alert("start");
    $("table").each(function() {
    alert("table");
    var $table = $(this);
    var str_id = $table.id;
    alert(str_id);
    </script>
    <h1>Javascript WS</h1>
    <input type="button" onclick="Login()" value="Login">
    <input type="button" onclick="SSO_Login()" value="SSO_Login">
    <input type="button" onclick="Call_WS()" value="Call_WS">
    </body>
    </html>
    _____________________________________________ END OF FILE _____________________________________________
    Best Regards,
    Gerald

  • Accessing active directory with javascript client object model

    Hello All,
    my requirement is to get user profile "picture" from
    active directory of my org. to my sharepoint 2013 intranet site via
    java script client object model programming.
    I am successful in retrieving user details (including pics) from user profile services using SP.UserProfile.js but it will show only user who are added in SharePoint groups. But, I need all company users (10,000+ user's) data like name, dept, photo etc.
    If the solution is not feasible with JSOM, please provide any alternative.
    Pls. assist.
    Thanks, Chintan

    You can import profile from AD directly to sharepoint and use it
    Check below:
    http://blogs.technet.com/b/harmeetw/archive/2011/09/10/importing-thumbnail-photos-from-ad-active-directory-into-sharepoint-2010.aspx
    Once imported you need to run below:
    Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation
    http://<YourServerName>/my
    The cmdlet was introduced in this fix:
    http://support.microsoft.com/kb/2394320  (14.0.5128.5000)
    http://blogs.technet.com/b/lukeb/archive/2013/01/04/sharepoint-import-a-picture-from-ad-for-the-user-profile.aspx

  • Access of undefined method/property through reference with a static type Class

    I get the following error: (it's not word for word but you get the idea)
    Error: Access of undefined method getStatus through reference with a static type Class.
    Here's what's happening in the code. I'm trying to create a User class that is instantiated at the start of my app. I want the User class to have properties like mainStatus, with helper methods like setStatus etc. Pretty simple.
    so on my HardDisk I have my flash_working folder with all my flash projects. I created my class file/package under the directory com.mypackage
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function User()
                trace("User Created!");
                mainStatus = 0;
            public function setStatus(status:int):void
             mainStatus = status;
        public function getStatus():int
            return mainStatus;
    Ok, so far so good.
    now I created a new .fla file under the root of /flash_working/. The class file is in /com/mypackage/User.as
    in my .fla file I have:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = User.getStatus();
    trace(i);
    That's all the code I have. Could someone please explain why it's giving me that error?
    If I try to access the public var mainStatus through user.mainStatus that gives a similar error saying:
    Error: Access of undefined property mainStatus through reference with a static type Class.
    Thanks for any help!
    jef3189

    the public getStatus() function that you created needs to be referred to through an instance of the class.
    So:
    import com.mypackage.User;
    var myUser:User = new User();
    var i = myUser.getStatus();
    trace(i);
    Also, an aside. You can create a getter/setter for status, to avoid having to do the function as such.
    package com.mypackage
        import flash.display.*;
        public class User extends Sprite
            public var mainStatus:int;
            public function get status():int
                return mainStatus;
            public function set status(value:int):void
                 mainStatus = value as int;
              public function User()
                trace("User Created!");
                mainStatus = 0;
    And then, you can call it as:
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.status);
    EDIT
    I just noticed that you made the variable public as well, which means you can access it without getter/setter or function.
    import com.mypackage.User;
    var myUser:User = new User();
    trace(myUser.mainStatus);

  • Calling ABAP Class with Javascript (Example?)

    Can anyone provide an example of calling an ABAP class with Javascript?  I'm looking to retrieve a variable value from a Web Application
    Thanks

    I need this too.
    I have a Selection Screen in JAVA. And I want to fill the f4-help with a abap-function.
    with kind regards
    Maria Kiltz

  • How to detect JRE with Javascript and without any help of class file

    Please tell me how to detect JRE with using the Applet file. Is it possible to detect only through Javascript

    It is possible to detect the Sun JRE using only Javascript without any class file.
    However, it is rather complicated due to difficulties with Internet Explorer.
    http://forum.java.sun.com/thread.jspa?threadID=5177843&tstart=15
    http://www.pinlady.net/test/PluginDetect.htm

  • What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API

    The question says it all:
    What Are The Minimum Permissions In Order An User To Be Able To Access User Profile Data With JavaScript And REST API.?
    In the User Profile -> Permissions there is only the option for "Full Control".

    Hi Nikolay,
    Thanks for posting your issue, you need to set permissions on User Profiles = Read. Kindly find the below mentioned URLs to get the code and more details on this.
    http://www.vrdmn.com/2013/02/sharepoint-2013-working-with-user.html
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    http://sharepoint.stackexchange.com/questions/61714/sharepoint-2013-call-the-rest-api-from-sharepoint-hosted-app
    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2013/04/09/how-to-query-sharepoint-2013-using-rest-and-javascript.aspx
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • [JS, CS4] TextFrame.extractLabel() cannot work with instances of this class

    I have script, which has been working fine in CS3. In CS4 ( app.version = 6.0.1.532 ) however, I get an error using extractLabel, after reading out a couple of other properties from a textframe:
    frameObject.extractLabel('name')
    Error: TextFrame.extractLabel() cannot work with instances of this class
    Up until reading one of the "normal" properties, such as (frameObject.)contents I can call the frameObject.extractLabel('name') without errors, but after "looking at" (by assigning to a variable in code, or by getting the value in the javascript console), the contents propery (or as it seems any normal property) the extractLabel method results in the error above.
    It seems to work to move all of the frameObject.extractLabel calls to the beginning of the function, but I don't think I should need to do that.
    It might very well be the case that the label read by extractLabel has no contents, and has never been assigned. Is there a change in behaviour from CS3 in that sentence? If so, and if thats the reason for the error, is there then a way to determine whether the label has ever been assigned?
    Is this error familiar to anyone else?
    Best regards,
    Andreas

    Hi Andreas,
    Interesting problem!
    Your problems are caused by some peculiarities of itemByID. itemByID doesn't cast the object type properly. Dirk wrote about some aspects of this some time ago. If the scripting engine was strongly typed, this issue would probably be impossible but that would make scripting a lot more of an elitist activity!
    Your problem is that the object type is PageItem and you are accessing a TextFrame property (content). This seems to throw the object type for a loop.
    Using getElements() causes the scripting engine to rebuild the reference to the object correctly.
    Take a look at this code, which illustrates the issue quite well...
    var myDocument = app.documents.add();
    myDocument = app.activeDocument;
    myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
    myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
    var myTextFrame = myDocument.pages.item(0).textFrames.add({geometricBounds:[72, 72, 144, 288], contents:"test"});
    var myId = myTextFrame.id;
    var pgItm = myDocument.pageItems.itemByID(myId);
    alert(pgItm instanceof PageItem);
    alert(pgItm instanceof TextFrame);
    var thisBounds = pgItm.geometricBounds;
    var x = pgItm.extractLabel('mandatory');
    var pgItm = myDocument.textFrames.itemByID(myId);
    alert(pgItm instanceof PageItem);
    alert(pgItm instanceof TextFrame);
    var thisName = pgItm.extractLabel('name');
    var thisContents = pgItm.contents;
    var x = pgItm.extractLabel('mandatory');
    Harbs

  • Change TextView value with Javascript

    Hello,
    I'm trying to find a way of changing the value of an HTMLB TextView on the client side with javascript.
    Do you know how to do that ? Cannot work it out...
    Many thanks
    Nicolas

    Hi,
    this can be a bit tricky, because you have to know, how to access the element. that means you need an unique id or an absolute position of the TextView-element
    if you can see, how to access the specific element in your client-pagesource, a possible javascript could be:
    document.getElementById("<id of element>").firstChild.nodeValue="My new Text"
    or access by name/count of the element:
    document.getElementsByName("<name of element>")[#position of occurance].firstChild.nodeValue="My new Text"
    kr, achim

  • HTMLB and JavaScript

    Hi,
    I am using HTMLB in my JSP page.Is there any way to hide or show the HTMLB components when the page is loaded, like HTML onLoad() calling javascript.
    expecting some sample code from HTMLB experts.really i stuck wih this problem for 2 days.
    For example.....i have one DropdownList box.Based on the selected dropdown values ,i need to show and hide one InputField and another Dropdown.
    Regds,
    Jeyanth

    Hi,
    You can achive this in two ways.
    1) client side :
    Have the dynamic fields in style sheet.Sho or hide based on the value selected.
    Please find below code:
    In your drop down list box : mention onclientselect = dispaly()
    <SPAN ID=ss Style="Visibility:hidden;
                       Filter:revealTrans(duration=0)">
    <!-- Your field --!>
    </SPAN>
    <-Javascript>
    function display()
    if ( vlaue ==1 )
      ss.style.visibility = "visible";
    else
      ss1.style.visibility = "visible";
      ss.style.visibility = "hidden";
    // ss1 is style sheet 2 where in which ur second field is placed
    the above code may cause some problem in netscape browsers. But it can be resolve by handling stylesheet properly.
    2) Server side:
    in the dropdown mention onselect = display()
    in your dynpage class mention display() method.
    Have two variables in bean for each field.
    set those fields hide or show based on the value.
    Put your field
    <%
    if ( flag == true )
    your field 1
    else
    your field 2

  • How do I redirect a secure zone login form with javascript?

    I would like to redirect what page a user goes to after filling out the secure log in form. I would change the landing page of the secure zone, but I need a log in form to go to a different page of the site. I would also create a seperate secure zone, but I have almost 3000 subscribers and it would be very time consuming to add all those users to this new zone.
    I would like to redirect the user (using the form from a secure zone) to a different page other than the landing page of the log in form. How do I do this with javascript?
    I saw this page: http://kb.worldsecuresystems.com/598/bc_598.html#main_Logging_into_different_Secure_Zones_ according_to_ID_number but couldn't make sense of it for my current situation. (I don't need multiple zones, just the form to redirect to a different page after submission)
    <form action="https://redlakewalleye.worldsecuresystems.com/ZoneProcess.aspx?ZoneID=12369&Referrer={module_siteUrl,true,true}&amp;OID={module_oid}&amp;OTYPE={module_otype}" method="post" onSubmit="return checkWholeForm52938(this)" name="catseczoneform52938">
                <div class="form">
                <div class="item"><label for="SZUsername">Username</label><br />
                <input type="text" maxlength="255" id="SZUsername" name="Username" class="cat_textbox_small" /></div>
                <div class="item"><label for="SZPassword">Password</label><br />
                <input type="password" autocomplete="off" maxlength="255" id="SZPassword" name="Password" class="cat_textbox_small" /></div>
                <div class="item"><input type="checkbox" id="RememberMe" name="RememberMe" /><label for="RememberMe">Remember Me</label></div>
                <div class="item"><input type="submit" value="Log in" class="cat_button" /> <a href="/_System/SystemPages/PasswordRetrieveRequest">Lost password?</a></div>
                </div>
                <script type="text/javascript" src="/CatalystScripts/ValidationFunctions.js"></script>
                <script type="text/javascript">
                    //<![CDATA[
                    function checkWholeForm52938(theForm){
                        var why = "";
                            if (theForm.Username) why += isEmpty(theForm.Username.value, "Username");
                            if (theForm.Password) why += isEmpty(theForm.Password.value, "Password");
                            if (why != ""){alert(why);
                                return false;
                       // Add the redirect code here?
                        theForm.submit();
                        return false;
                    //]]>
                </script>
            </form>

    I've been working on the same thing and have nearly solved it with these tutorials:
    http://www.bcgurus.com/tutorials/re-directing-users-to-the-correct-secure-zone
    http://www.bcgurus.com/tutorials/building-a-better-secure-zone-login-page
    The first tutorial will let a person continue on to the page he/she was attempting to access. For example, if your site offers learning lessons in a secure zone... A visitor could click on a lesson, get prompted to login and then be redirected to that particular lesson instead of the landing page for the secure zone.  The script in the tutorial also accommodates general logging in: "if the person wasn't going somewhere specific then send him/her here (landing page, user account, whatever).
    Might be worth checking out the free BCGurus trial or joining for a month.
    Brian

Maybe you are looking for

  • Open a file from oracle report

    Hi everyone, I need your help, i have a report and there is a field which is the location of a file. the report is generated in pdf and the location of the file is a link and user can click on it. But when the report and files related to the links ar

  • Photoshop Elements Update 9.0.3 problems

    I have attempted several time to process the Photoshop Elements Update 9.0.3 but it always ends with the following message: "Patch cannot be applied. Please Contact Product Support."    I have not had any success searching for this issue under suppor

  • Fit To Box and Determine if Doesn't Fit In Box

    I hope the subject line says it all. First step - how can I determine if the TexFlow that needs to get rendered fits into the target area? Is there a boolean of some sort or do i have to check the overflow length? Once I've done that is there any eas

  • An Acrobat 11 system update was running and did not complete.  What is wrong?

    When I opened a PDF file.  A message indicated an Error: 1 had occurred and to uninstall and re-install Acrobat 11.  I uninstalled, but the reinstall will not complete.  What is wrong?

  • Best setting for night work under lights

    Hello I'm not sure if this the appropriate place to post this. If not can someone advise a good forum. I am shooting with a Canon HFS10. I am shooting nocturnal animals feeding in the wild using tungsten balanced lights. My question: Which is the bes