JStudio SiteWalker Service Board Forum Index JStudio SiteWalker Service Board
Find out / share information about our product, experience and requirements. To serve all user all postings must be written in English language. We are looking for constructive meanings and experience. Disrespectful postings will be deleted immediately.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

onchange() is not generated to input text field

 
Post new topic   Reply to topic    JStudio SiteWalker Service Board Forum Index -> Product Issues: Bugs & Problems
View previous topic :: View next topic  
Author Message
fayili
Guest





PostPosted: Mon Mar 20, 2006 12:46 pm    Post subject: onchange() is not generated to input text field Reply with quote

Hi,

If there is an "onchange()" in the input text field, it is not generated to the resulted HTML in the "Mission designer" mode of sitewalker.

If the "onchange()" in the type=button input filed, then it is generated.

Is this a bug or a feature? Since quite often in struts js validation, onchange() in text input is used.

Following is the example html content:
***************
<HTML lang=fi>
<HEAD><TITLE>customer</TITLE>
<LINK href="popup_style.css" type=text/css rel=STYLESHEET>
<SCRIPT>
function doFetch() {
// fetch something
}

function checkSocialNumber() {
alert("check social number");
}

function fetchCustomerInfo() {
alert("fetch customer info");
}
</SCRIPT>
</HEAD>
<BODY onload=init()>
<FORM name=params onsubmit="return doFetch()" action="" autocomplete="off">
<TABLE cellSpacing=0 cellPadding=0 width=486 border=1>
<TR>
<TD width=250 colSpan=2>Social security Id:</TD>
<TD width=252>
</TR>
<TR >
<TD>
<INPUT maxLength=11 size=11 value=010180-1309 name=socialNumber onchange="checkSocialNumber()"/>
</TD>
<TD vAlign=center align=left width=50>
<INPUT class=button onclick=javascript:fetchCustomerInfo() type=button value=Fetch>
</TD>
</TR></TABLE>
</FORM></BODY></HTML>
***************
Back to top
sitewalker
Site Admin


Joined: 09 Feb 2006
Posts: 39

PostPosted: Mon Mar 20, 2006 8:04 pm    Post subject: use JavaScript to raise any dynamic Reply with quote

Hi fayili,

thank you for this posting. We will check it in more detail, but our first results when reviewing the problem indicates that this might be a bug in JStudio SiteWalker made by design.

When parsing the web document in Mission Designer the event onchange will be filtered and does not exist anymore when opening the step configuration dialog. Because the event method does not exist in step configuration the event handler will not be cause automatically when executing the step at autonavigation runtime.

Workaround:

The problem can be solved by calling the event handler directly via JavaScript. Therefore add the HTML element as step again (The HTML element then is represented by two steps) and add the call for the event handler at configuration dialog, tab 'events':

Code:
document.activeElement.onchange();   
//works for all input elements

or call the function directly:

Code:
checkSocialNumber();


So the first step enters the value automatically; the second step processes script action on it. Use quick javascript statements in general when event handling differs from behaviour in Jstudio SiteWalker.

Again, thank you for this problem posting. We hope this suggestion might help you and others to overcome the problem.

regards,


Frank
Back to top
View user's profile Send private message Send e-mail
fayili
Guest





PostPosted: Tue Mar 21, 2006 7:57 am    Post subject: Reply with quote

Hi, Frank

Yes, workaround it helps. It would be much better and more comfortable if the Mission designer can record the event.

best regards,
yili
Back to top
sitewalker
Site Admin


Joined: 09 Feb 2006
Posts: 39

PostPosted: Tue Mar 21, 2006 2:49 pm    Post subject: Fine Reply with quote

Hi fayili,

thanks for response. I noticed this as topic for further releases..

regards,

Frank
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    JStudio SiteWalker Service Board Forum Index -> Product Issues: Bugs & Problems All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group