L
Leroy Frye
hii all,
this script is nightmare for me, sometimes i got a value with cookies
but sometimes not, why?
sometimes i got like this :
new member was registered, here details :
first name : john
last name : doe
sex : m
but sometimes i got like this, here details :
new member was registered, here details :
first name : undefined
last name : undefined
sex : undefined
there is a something wrong? or browser support?
how i can get cookies in all browser?
how i can get cookies without an empty value come into my post??
here is my testing script:
<script language="javascript" type="text/javascript"><!--
function checkMemberForm24(frm){
document.cookie = "fname=" + frm.elements['form[first_name]'].value;
document.cookie = "lname=" + frm.elements['form[last_name]'].value;
document.cookie = "sex=" + frm.elements['form[sex]'].value;
alert(frm.elements['form[first_name]'].value);
alert(frm.elements['form[last_name]'].value);
alert(frm.elements['form[sex]'].value);
}
--></script>
<div id="divForm24" class="formContent" id="frmMember24"
name="frmMember24">
<form action="" method="POST" onsubmit="return checkMemberForm24
(this)">
<div style="padding:5px;font-weight:bold;">Member Information</div>
<div class="formLine">
<div class="formSpace"><u>Please enter your Information</u></div>
</div>
<div style="clear:both;height:0px;">
<input type="hidden" name="oa" value="ProcessMember"/>
</div>
<div class="formLine">
<div class="formCaption">First Name :</div>
<div class="formControl">
<input type="text" class="formControlText" name="form[first_name]"
value="John"/>
</div>
</div>
<div class="formLine">
<div class="formCaption">Last Name :</div>
<div class="formControl">
<input type="text" class="formControlText" name="form[last_name]"
value="Doe"/>
</div>
</div>
<div class="formLine">
<div class="formCaption">Sex :</div>
<div class="formControl">
<select name="form[sex]" value=""/>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</div>
<div class="formLine">
<div class="formCaption">Age :</div>
<div class="formControl">
<input type="text" class="formControlText" style="width:50px;"
maxlength="4" size="2" name="form[age]" value="35"/>
</div>
</div>
<br/>
<div class="formLine">
<div class="formSpace" style="text-align:center;width:100%;">
<input type="image" src="images/buttons/submit.gif" alt="Submit >>"
id="submit"/>
<br/>
</div>
</div>
</form>
</div>
</div>
thanks
this script is nightmare for me, sometimes i got a value with cookies
but sometimes not, why?
sometimes i got like this :
new member was registered, here details :
first name : john
last name : doe
sex : m
but sometimes i got like this, here details :
new member was registered, here details :
first name : undefined
last name : undefined
sex : undefined
there is a something wrong? or browser support?
how i can get cookies in all browser?
how i can get cookies without an empty value come into my post??
here is my testing script:
<script language="javascript" type="text/javascript"><!--
function checkMemberForm24(frm){
document.cookie = "fname=" + frm.elements['form[first_name]'].value;
document.cookie = "lname=" + frm.elements['form[last_name]'].value;
document.cookie = "sex=" + frm.elements['form[sex]'].value;
alert(frm.elements['form[first_name]'].value);
alert(frm.elements['form[last_name]'].value);
alert(frm.elements['form[sex]'].value);
}
--></script>
<div id="divForm24" class="formContent" id="frmMember24"
name="frmMember24">
<form action="" method="POST" onsubmit="return checkMemberForm24
(this)">
<div style="padding:5px;font-weight:bold;">Member Information</div>
<div class="formLine">
<div class="formSpace"><u>Please enter your Information</u></div>
</div>
<div style="clear:both;height:0px;">
<input type="hidden" name="oa" value="ProcessMember"/>
</div>
<div class="formLine">
<div class="formCaption">First Name :</div>
<div class="formControl">
<input type="text" class="formControlText" name="form[first_name]"
value="John"/>
</div>
</div>
<div class="formLine">
<div class="formCaption">Last Name :</div>
<div class="formControl">
<input type="text" class="formControlText" name="form[last_name]"
value="Doe"/>
</div>
</div>
<div class="formLine">
<div class="formCaption">Sex :</div>
<div class="formControl">
<select name="form[sex]" value=""/>
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>
</div>
</div>
<div class="formLine">
<div class="formCaption">Age :</div>
<div class="formControl">
<input type="text" class="formControlText" style="width:50px;"
maxlength="4" size="2" name="form[age]" value="35"/>
</div>
</div>
<br/>
<div class="formLine">
<div class="formSpace" style="text-align:center;width:100%;">
<input type="image" src="images/buttons/submit.gif" alt="Submit >>"
id="submit"/>
<br/>
</div>
</div>
</form>
</div>
</div>
thanks