Jump to content

Javascript Help..please


Recommended Posts

Posted

Hi bhayyas eppudu okka page lo search chesthunamu and adhi vunte it fill all the required fields and again if we try to search with wrong id kindha message vasthundhi ID not found ani kani aa filled reset avvadam ledhu it still showing previous search results in it if ID is not found..

 

 

so nenu form1.reset() use chesa still no work

document.ByelementId() use chesa still no work...

 

 

e page lo okka 10 tabs kuda vunnayi which will fill automatically by ID..

 

 

so ela  cheyali or am i missing something there...??? koncham cheppandi bhayya 

Posted

Hi bhayyas eppudu okka page lo search chesthunamu and adhi vunte it fill all the required fields and again if we try to search with wrong id kindha message vasthundhi ID not found ani kani aa filled reset avvadam ledhu it still showing previous search results in it if ID is not found..

 

 

so nenu form1.reset() use chesa still no work

document.ByelementId() use chesa still no work...

 

 

e page lo okka 10 tabs kuda vunnayi which will fill automatically by ID..

 

 

so ela  cheyali or am i missing something there...??? koncham cheppandi bhayya 

bhayya, i don't know whether it will help you or not but want to help you.... did you try using xpath.... it works in most of the cases for finding the object. please let me know if you have tried this... and what is the result

Posted
function setAction(objForm, imgId)
{
alert('in orderupdate.xsl');
var form1 = document.orderupdate;
isMainForm = true;
//alert(objForm);
//form1.mystate.value = 'search';
form1.action = 'xyz.jsp';
form1.target = 'mainFrame';
 
if(trimAll(form1.waybill1.value) == ''  
&& trimAll(form1.refNum.value) == '' 
 
{
;return;
}
 
if (isMainForm)
alert('in mainform ');
 
if(!validateUSPhone(form1.txtConsigneePhone, true))
phone=false;
else if(validateUSPhone(form1.txtConsigneePhone, true))
phone=true;
if (isMainForm && (trimAll(form1.waybill1.value) != ''  
|| trimAll(form1.refNum.value) != '' 
))
{
alert('in trim all if condition');
form1.submit();
}
resetForm();
}
 
 
function resetForm(){
alert('in resetFOrm function');
 
var form1 = document.orderupdate;
form1.target='';
form1.action = xyz.jsp';
form1.reset() ;
 
 
alert('end of the function');
}

Nee code ikkada paste cheyyi

 

Posted

alert('in resetFOrm function');   ee alert chupisthundhaaa

 

order update chesthunnav soo  idhi vadu  form1[order].reset();

Posted

bhayya adhi form.{order}.reset() ledha form(order).reset aa

emipoaayav TS

 

Posted

bhayya adhi form.{order}.reset() ledha form(order).reset aa

document.forms["form1"].reset();   idhi try cheyyi raledhu antee ,, ee code pina alert(myform); petti , debug cheyyi, myform outpout emi vasthundhooo chudu

Posted

last but one line lo instead of form1.reset() ; try this document.forms['form1'].reset() also check if there are any id's with 'reset' name

function setAction(objForm, imgId)
{
	alert('in orderupdate.xsl');
	var form1 = document.orderupdate;
	isMainForm = true;
	//alert(objForm);
	//form1.mystate.value = 'search';
	form1.action = 'xyz.jsp';
	form1.target = 'mainFrame';
 
	if(trimAll(form1.waybill1.value) == '' && trimAll(form1.refNum.value) == '' ))
	 {
	;return;
	}
 
	if (isMainForm)
	alert('in mainform ');
 
	if(!validateUSPhone(form1.txtConsigneePhone, true))
		phone=false;
	else if(validateUSPhone(form1.txtConsigneePhone, true))
		phone=true;
	
	if (isMainForm && (trimAll(form1.waybill1.value) != '' || trimAll(form1.refNum.value) != '' ))
	{
		alert('in trim all if condition');
		form1.submit();
	}
	resetForm();
}
 
 
function resetForm(){
alert('in resetFOrm function');
 
var form1 = document.orderupdate;
form1.target='';
form1.action = xyz.jsp';
form1.reset() ;
 
 
alert('end of the function');
}

Posted

 

last but one line lo instead of form1.reset() ; try this document.forms['form1'].reset() also check if there are any id's with 'reset' name

function setAction(objForm, imgId)
{
	alert('in orderupdate.xsl');
	var form1 = document.orderupdate;
	isMainForm = true;
	//alert(objForm);
	//form1.mystate.value = 'search';
	form1.action = 'xyz.jsp';
	form1.target = 'mainFrame';
 
	if(trimAll(form1.waybill1.value) == '' && trimAll(form1.refNum.value) == '' ))
	 {
	;return;
	}
 
	if (isMainForm)
	alert('in mainform ');
 
	if(!validateUSPhone(form1.txtConsigneePhone, true))
		phone=false;
	else if(validateUSPhone(form1.txtConsigneePhone, true))
		phone=true;
	
	if (isMainForm && (trimAll(form1.waybill1.value) != '' || trimAll(form1.refNum.value) != '' ))
	{
		alert('in trim all if condition');
		form1.submit();
	}
	resetForm();
}
 
 
function resetForm(){
alert('in resetFOrm function');
 
var form1 = document.orderupdate;
form1.target='';
form1.action = xyz.jsp';
form1.reset() ;
 
 
alert('end of the function');
}

 

 

 

function setAction(objForm, imgId)
{
alert('in orderupdate.xsl');
var form1 = document.orderupdate;
isMainForm = true;
//alert(objForm);
//form1.mystate.value = 'search';
form1.action = 'xyz.jsp';
form1.target = 'mainFrame';
 
if(trimAll(form1.waybill1.value) == ''  
&& trimAll(form1.refNum.value) == '' 
 
{
;return;
}
 
if (isMainForm)
alert('in mainform ');
 
if(!validateUSPhone(form1.txtConsigneePhone, true))
phone=false;
else if(validateUSPhone(form1.txtConsigneePhone, true))
phone=true;
if (isMainForm && (trimAll(form1.waybill1.value) != ''  
|| trimAll(form1.refNum.value) != '' 
))
{
alert('in trim all if condition');
form1.submit();
}
resetForm();
}
 
 
function resetForm(){
alert('in resetFOrm function');
 
var form1 = document.orderupdate;
form1.target='';
form1.action = xyz.jsp';
form1.reset() ;
 
 
alert('end of the function');
}

 

 

 

 

vammo coding ilauntundi ? pfdb_brahmi001.gif   nen dengalenra sami pfdb_brahmi01.gif

Posted

alert(form1) petti chusa i am getting  as objectHTMLForm Element ani  so adhi ela cheyali

document.forms["form1"].reset();   idhi try cheyyi raledhu antee ,, ee code pina alert(myform); petti , debug cheyyi, myform outpout emi vasthundhooo chudu

 

×
×
  • Create New...