• Rosy09
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

Hi...

My requirement is i have two objects class and student which are in MDR.

 

object 1 - class - Fields- class name.

object 2 -  student -Fields- student name, class(MDR), status(attending,dropping)

 

My requirement is  a student can attend multiple classes and at the same time only one record has to be

created with that student name where..mulitple classes can be included in tat record.

 

Plz suggest me how to work on it.

 

Thanks in advance.

 

 

 

  • October 25, 2013
  • Like
  • 0

Hi..

 

Am trying for password validation using javascript in apex class.But i dont know where i went wrong .Can anyone please go through the below  code and let me know my mistake.

 

Thanks in advance.

 

<apex:page controller="pwdvaldcon">
<script>
function validate(){

var myTextField = document.getElementById('pp');
if(myTextField.value != "")
alert("You entered: " + myTextField.value)
else
alert("Would you please enter some text?")
}
</script>

<apex:form id="frm">
<apex:pageBlock id="pg">
<apex:pageBlockSection id="pbs">
<apex:inputText value="{!name}" label="Name" id="pn"/>
<apex:inputText value="{!pwd}" label="password" id="pp"/>
<apex:commandButton value="save" action="{!save}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>

</apex:page>

     

Controller:

 

   

public with sharing class pwdvaldcon {

public String name { get; set; }
public String pwd { get; set; }
public new_account__c na {get;set;}



public pwdvaldcon(){
na = new new_account__c();

}
public PageReference save() {
na.password__c = pwd;
na.name=name;

insert na ;
return null;
}

}

  • October 10, 2013
  • Like
  • 0

Hi..

 

Am trying for password validation using javascript in apex class.But i dont know where i went wrong .Can anyone please go through the below  code and let me know my mistake.

 

Thanks in advance.

 

<apex:page controller="pwdvaldcon">
<script>
function validate(){

var myTextField = document.getElementById('pp');
if(myTextField.value != "")
alert("You entered: " + myTextField.value)
else
alert("Would you please enter some text?")
}
</script>

<apex:form id="frm">
<apex:pageBlock id="pg">
<apex:pageBlockSection id="pbs">
<apex:inputText value="{!name}" label="Name" id="pn"/>
<apex:inputText value="{!pwd}" label="password" id="pp"/>
<apex:commandButton value="save" action="{!save}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>

</apex:page>

     

Controller:

 

   

public with sharing class pwdvaldcon {

public String name { get; set; }
public String pwd { get; set; }
public new_account__c na {get;set;}



public pwdvaldcon(){
na = new new_account__c();

}
public PageReference save() {
na.password__c = pwd;
na.name=name;

insert na ;
return null;
}

}

  • October 10, 2013
  • Like
  • 0