cancel
Showing results for 
Search instead for 
Did you mean: 

ITS - Error in webpage SetFocus() is not defined

former_member593554
Participant
0 Kudos

Hi All,

I did ITSmobile for my client requirement, its working fine, but when i do screen changes & i will regenate screen tempates {Internet service templetes for that screen}, then i use URL again my Function code is not working. So i checked the screen{ web screen } using Firefox -Firebug after my login screen i have error message "SetFocus is not defind" .

I am not understanding the root cause of error "SetFocus is not defind and when i click on my OK button then displays error SetOkcode is not defined" . is it because of standard script Mobile.js is not loading?

please help me what has to be done when i regenerate the screen template? and reason why its is giving errors when there is changes?

Regards,

Satheesh.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member593554
Participant
0 Kudos

When there is i am executing service ITSMOBILE00 then i executing my custom service, its working in this case.

former_member194364
Active Contributor
0 Kudos

Hi Satheesh,

Do you delete the template(and MIME) cache via SITSPMON before testing? And browser cache?

Regards,

Oisin

former_member593554
Participant
0 Kudos

Hi Oisin,

Thanks for your reply..

I deleted screen template for my screens & regenerated again. But how to do deletion the template(and MIME) cache via SITSPMON before testing?

Regards,

Satheesh.

former_member194364
Active Contributor
0 Kudos

Hi Satheesh,

Call transaction: "sitspmon"

Goto tab: Template and MIME cache

Select SYSTEM WIDE for both Templates (and MIMES - if they have also been adjusted)

Regards,

Oisin

former_member593554
Participant
0 Kudos

Hi Oisin,

Thanks for your reply..

I got the error again, so in transaction code SITSPMON

tab Template & MIME cache

i clicked on SYSTEM-WIDE for both, but it has got same error SetFocus() is not defined then i tried to execute standard service ITSMOBILE00 and then i tested my service again at that time it displaying correctly. i checked using firebug while it is not loading java script mobile.js and style mobile.css . if no error in that case i can see java script mobile.js and style mobile.css.

Regards,

Satheesh.

former_member194364
Active Contributor
0 Kudos

HiSatheesh,

What are your GUI Configuration settings for your ITSMobile service in SICF?

Regards,

Oisin

former_member593554
Participant
0 Kudos

Hi Oisin,

My GUI Configuration for ITS Mobile service as below.

~TRANSACTION = ZSDASN_01

~THEME = 99

~ITSMOBILE = 1

#MESSAGE SOUND Plays a background sound if a message appears

~ITSMOBILEMSGSOUND = 1

#SYSTEM MODAL POPUPS Shows express mails / system messages

~SHOW_SYSTEM_MODAL = 1

#SOURCES Template search sequence

~SOURCES = ZSDASN_SERV,itsmobile

#POPUPS Show popups, default is no

~POPUPS = 1

Regards,

Satheesh.

former_member194364
Active Contributor
0 Kudos

Hi Satheesh,

Are you doing the testing on a Workstation browser are on your Mobile Device?

What template generation style did you use?

Might be useful to do a HTTPWatch trace to see if the

onfocus code is present in the HTML source and pointing to a valid

input field. Could be that the browser does not accept onfocus?

Regards,

Oisin

former_member593554
Participant
0 Kudos

Hi Oisin,

--> I am testing form workstation browser & hand held devices browser also.

---> I used MOBILE4 Mobile Devices (without HTML tables) generating style.

---> i used FireBug In firefox to check that method SetFocus() is loading or not? refer below cases

Case1: first time when i generate screen templates At that time i didn't check, because i didn't have any problem

Case2: Second time i did few changes to screen, i deleted old screen templates and then i created templates this time i got error so i checked using FireBug i found out that Java script MOBILE.xJS is not loading so function example for Page up

setFocusField('`'PAGE-UP'[1].name`')

leaveFocusField('`'PAGE-UP'[1].name`')

RfidButtonClick()

setOkCode('`'PAGE-UP'[1].okcode`')

is not triggering when i click on push button

After few trial and errors, i found out that when i test Standard mobile services like ITSMOBILE00 and then i test MY services, its working. I check using FireBug then i can see Java script MOBILE.xJS at header level of html in run time.

I tried few times by recreating templates, every time i did recreation i need to run Standard mobile services like ITSMOBILE00 then only MY services is working.

When moved to QAS same error again, then i run Standard mobile services like ITSMOBILE00 then only MY services is working.

I don't understand why its behaving like this? Do we need to do any clearing thing once we recreate templates?

Regards,

Satheesh.

former_member194364
Active Contributor
0 Kudos

Hi Satheesh,

Try changing

~SOURCES = ZSDASN_SERV,itsmobile

to

~SOURCES = ZSDASN_SERV,itsmobile00

I think your service works after calling itsmobile00 due to the fact that the mobile.js is in the browser cache?

Am out of idea's after this if above does not work.

Regards,

Oisin