Link to home
Start Free TrialLog in
Avatar of saleemkhan
saleemkhan

asked on

Passing dynamic(firstname of the ) username and password

hai experts,

i have a html file.when i passthru html its working fine but with static username and password.

Now instead of the static i want who ever enters his username and password has to pass in the html file.
This is the html file

<html>
<body>
<form  name="TestTicker" action="http://www.abc.com/test/cf/Login.cfm?Action=Login" method=post>
<input type=hidden name="uid" value="user">
<input type=hidden name="testpassword" value="password">
<input type=hidden name="lotus" value="lotus">
       
</form>
<script language="javascript">
     document.TestTicker.submit();
     
</script>

</body>
</html>
 its working fine.

to pass dynamic username and password i done like this.
created a form
</FORM>
<form  name="TestTicker" action="http://abc.com/test/cf/Login.cfm?Action=Login" method=post>


uid:  here i put a text box for computed when composed(formula as username)


password:  here i put a text box for computed when composed(formula as username)


<input type=hidden name="lotus" value="lotus">
</form>
<script language="javascript">
     document.TestTicker.submit();
     
</script>
 


now my problem is if give the formula as username i think its passing the firstname and lastname in the html.

so i want to pass only the first name means what ever he type in login page.


how can we do it.
waiting for reply.
Avatar of HemanthaKumar
HemanthaKumar

Let me repeat what you have said.

From your last line of statement "what ever he type in login page", it infers that,

You have another form which is calling this login form and you want to inherit the values of that previous form into this form, Right !

For that you can use the Form property, "Formulas inherit values from selected document"

~Hemanth

In your computed uid field, why not put @Left(User;" "). If the value of User is the first and last name of the person, then putting the @Left will return just the first name.
Avatar of saleemkhan

ASKER

hai experts,
For the computed field if i gave @username its displaying
saleem khan.
  as per hemanth comment i already tried formulas inherit values from selected document.

As per ur comment @left(user,"").its displaying blank.
  where i am wrong.
any suggestion?


waiting for reply.
saleem.
If you have set inheritance to the login form , then you should specify the value of the username field to that in the host form, not @username.

As of extracting the first part of the user name use this
@Word("Saleem Khan";" ";1)



Hello saleem,

first of all "ComputedWhenComposed" is wrong setting for HTML forms. Better is "Editable". Even when you set for this form "TestTicker" the option "GenerateHtmlForAllFields" it would not work absolutely correct...

Simple erase this JavaScript "document.TestTicker.submit()" and test around untill you see all html source code in your web browser.

By the way: you @Left formula has not contained the blank for separator. Also @Trim your name to avoid leading blanks.

Good luck,
zvonko
ASKER CERTIFIED SOLUTION
Avatar of Jean Marie Geeraerts
Jean Marie Geeraerts
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As per your comment that @left(user,"") is displaying blank, it's because you need to include the space in between the quotes. So it should look just like this:
@Left(user, " ")
Thanks jerrith for ur comment,



  i need the same help in future.