Live Chat Software by Hybrid Solutions
Knowledgebase
VertexFX Web Trader Custom Login Page
Posted by Mohammad Rahhal on 05 December 2012 11:48 AM

 

VertexFX Web trader has its own stand alone login page, that is used to login to your trading account. What if you want to have your own login page, with your unique design, and may be to be within your website main page, instead of being stand alone page.

However, we provide VertexFX Web Trader login page template, that you can improve as you want in your website.

Basically, to use a login Web template you should change urlStr and urlDefaultPageStr variables in the sample below to the corresponding server host.

You should call Login method to be authenticated before enter to web Trader. The below sample illustrates how you can develop custom login page


Sample

 

<!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>

    <title>Login Page </title>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script  type="text/javascript" >


         $(document).ready(function () {

        // change urlStr  and  urlDefaultPageStr according to host server 

             var urlStr = "http://74.54.46.178/vertexweb10/WebService.svc" ;
             var urlDefaultPageStr = "http://74.54.46.178/vertexweb10/Default.aspx";

             $.support.cors = true;
             function onSuccessResult(response) {
                 try {

                     response = eval('(' + response + ')')
                     if (response.UserId == -1 || response.UserId == -207) {
                         $("#resultData").html("Invalid username or password".fontcolor("red"));
                     }

                     else if (response.UserId == -231) {
                         $("#resultData").html("You must have at least one account".fontcolor("red"));
                     }

                     else if (response == null || response == "" || response.UserId < 0) {
                         $("#resultData").html("Error while login.Please try later".fontcolor("red"));
                     }

                     else if (response.UserId > 0) {
                         window.location = urlDefaultPageStr;
                     }

                     else {
                         $("#resultData").html("Invalid username or password".fontcolor("red"));
                     }

                 }

                 catch (exception) { }


             }

             function onErrorResult(result) {
                 alert('Service call faild : ' + result.status + ' ' + result.statusText);

             }

             $("#btnLogin").click(function () {
                 $.ajax({
                     type: "GET",
                     url: urlStr + "/Login",
                     dataType: "jsonp",
                     data: { "username": $("#txtusername").val(), "password": $("#txtpassword").val() },
                     success: onSuccessResult,
                     error: onErrorResult
                 });
             });


         });

</script>


</head>
<body>


<center><table cellpadding='2' cellspacing='0' border='0' id='ap_table' style="width:200px" >
<tr><td bgcolor="blue"><table cellpadding='0' cellspacing='0' border='0' width='180px'><tr><td bgcolor="blue" align=center style="padding:2;padding-bottom:4"><b><font size=-1 color="white" face="verdana,arial"><b>Enter your login and password</b></font></th></tr>
<tr><td bgcolor="white" style="padding:5"><br>
<center><table>
<tr><td><font face="Tahoma" size=-1>Login:</td><td><input  type="text" id="txtusername"  style="width:150px"></td></tr>
<tr><td><font face="Tahoma" size=-1>Password:</td><td><input type="password" id="txtpassword" style="width:150px"></td></tr>
<tr><td><font face="Tahoma" size=-1>&nbsp;</td><td><font face="Tahoma" size=-1><input style="width:80px" id="btnLogin" type="submit" value="Enter"></td></tr>
<tr><td colspan=2><font face="Tahoma,arial" size=-1><div id="resultData"> </div></td></tr>
 

</table></center>

</td></tr></table></td></tr></table>

</body>
</html>

 



Related Topics

Back to VertexFX Help Index


Back to Home Index


To have the full ISV Development API KIT, register as ISV first.

(4 vote(s))
Helpful
Not helpful

Comments (2)
Sultan Saleem
13 May 2013 07:26 AM
I need username and password for a demo account.
Yousef Ibrahim
13 May 2013 08:00 AM
Hello Sultan,

You may open a demo account by downloading and installing the demo version of VertexFX 10. To download it, visit http://www.hybrid-solutions.com/vertexfx.exe

To learn about how to open a demo account using the platform, visit http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1262/0/how-to-open-a-demo-account-in-vertexfx-client-platform

Good luck.
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions