472,961 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,961 software developers and data experts.

How to work out which script to call to Save

I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.

The snippet of html is:

<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>

I want to call a script which will save the 'record' if you understand
me. But all I see is .js files. Can I call these .js methods from
javascript? If so how? Or if not is there any way, in javascript or
some code I can save the 'record' (obviously, I can manually click on
the Save button - but want to achieve this in code).

The full page appears below:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var loaded = 0;function ScriptLoaded() { ++loaded; if(loaded == 2)
ARSystemInit(); }
var ReportSelForm="ReportSelection",
RelContextPath='../../../../',AbsContextPath=null;</script>
<link rel="stylesheet" href="../../../../resources/stylesheets/
ARSystem.css"></link>
<script src="../../../../resources/javascript/LocalizedMessages_en.js"
defer=1></script>
<script src="../../../../resources/javascript/locale/en_GB.js"
defer=1></script>
<script>function DVFsf(){return "<HTML></HTML>"}; function DVFol(){}</
script>
<script src="../../../../resources/javascript/ClientCore.js" defer=1></
script>
<script src="form.js/b129d513.js" defer=1></script>
<script>document.write('<script src="userdata.js?winname=doctorO2_SHR
%3ACTI'+encodeURIComponent(name)+'" defer=1></'+'script>');</script>
</head>
<body onload="ScriptLoaded()" draghandler="BodyDrag"
style="display:none">

<div id="Toolbar"><div class="TBTopBarStatus">Current mode: <span
class="TBTopBarStatusMode"></span></div>
<a class="btn TBTopBarBox" href="javascript:"><img class="tbright"
src="../../../../resources/images/tb_right.gif" /><img class="tbdown"
src="../../../../resources/images/tb_down.gif" /></a><table
cellpadding=0 cellspacing=0 class="Toolbar"><tbody><tr><td nowrap=1
class="TBGroup TBGroup0">
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>

</td>
<td nowrap=1 class="TBGroup TBGroup2">
<a class="statushistory btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBstatushistory">Status history</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup3">
<a class="home btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBhome">Home</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="ResultsList">
<div ARID="1020" ARType="Table" ARDBN="CustomResultsList"
class="arfid1020 ardbnCustomResultsList" style="top:2; left:2; width:
636; height:60;visibility:hidden;z-index:0;"
ARCols="536890911,536890912,536890913,536890914,53 6890915,536890916,536890917"
ARColWs="112,70,112,112,140,70,140" ARDrill=1 ARServer="@"
ARSchema="@" ARMaxRows=0 ARDType=1 ARCSize=0 ARFixHdr=1 ARSelRows=0
ARSelInit=0 ARSelRefresh=0 ARAutoFit=0 ARSort=""
ARQual="{qual:&quot;&quot;, ids:[],extids:[]}"><img src="../../../../
resources/images/menu_down.gif" class="TableSortImgUp" ARInDOM=1 /
><img src="../../../../resources/images/menu_up.gif"
class="TableSortImgDown" ARInDOM=1 /><div class='TableHdr'><table
class='TableHdr' cellpadding=0 cellspacing=0><tbody><tr><td nowrap
valign=middle class='TableHdrL'></td><td nowrap valign=middle
class='TableHdrR'></td></tr></tbody></table></div><div
class='TableInner'></div><div class='TableFtr'><table class='TableFtr'
cellpadding=0 cellspacing=0><tbody><tr><td nowrap valign=middle
class='TableFtrL'></td><td nowrap valign=middle class='TableFtrR'></
td></tr></tbody></table></div></div>
</div>
<div id="Splitter" draggable=1 dragoriginal=1>
</div>
<div id="FormContainer" style="background-color:#ffffff">
<div class="FormContainerBackground">
<img class="FormContainerImage" galleryimg="no" style="top:0; left:0;
width:1652; height:50;" src="../../../../imagepool/
ffffff944e3868ffffffc965ffffff89ffffffccffffffffff ffffa542ffffffcf4ffffffc46ffffffae" /
>
</div>
<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>
<div ARID="240000005" ARType="Char" ARDBN="Requester Login Name+"
class="df arfid240000005 ardbnRequesterLoginName+" style="z-index:
1041;top:86; left:136; width:236; height:21;">
<label class="label f6" for="arid240000005" style="top:4; left:0;
width:90; height:17;">Login*+</label><textarea class="text sr "
wrap="off" id="arid240000005" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="240000001" ARType="Char" ARDBN="Requester Name+" class="df
arfid240000001 ardbnRequesterName+" style="z-index:1039;top:109; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000001" style="top:4; left:0;
width:90; height:17;">Name*+</label><textarea class="text sr "
wrap="off" id="arid240000001" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<a href="javascript:" ARID="660000281" ARType="Control"
ARDBN="O2_btnAuthenticate" class="btn btn3d arfid660000281
ardbnO2_btnAuthenticate" style="top:157; left:177; width:78; height:
21;z-index:1044;"><div class="btntextdiv" style="top:0; left:0; width:
78; height:21;"><div class="f1" style=";width:78">Authenticate</div>
</div>
</a>
<a href="javascript:" ARID="660000500" ARType="Control"
ARDBN="O2_btnAuthenticationNotReq" class="btn btn3d arfid660000500
ardbnO2_btnAuthenticationNotReq" style="top:157; left:288; width:78;
height:21;z-index:1045;"><div class="btntextdiv" style="top:0; left:0;
width:78; height:21;"><div class="f1" style=";width:78">Not Required</
div>
</div>
</a>
<a href="javascript:" ARID="640000003" ARType="Control"
ARDBN="btn_HelpDeskNew" class="btn btnurl arfid640000003
ardbnbtn_HelpDeskNew" style="top:80; left:4; width:128; height:20;z-
index:1026;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000004" ARType="Control"
ARDBN="btn_HelpDeskSearch" class="btn btnurl arfid640000004
ardbnbtn_HelpDeskSearch" style="top:110; left:4; width:128; height:
20;z-index:1027;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000005" ARType="Control"
ARDBN="btn_ChangeRequestNew" class="btn btnurl arfid640000005
ardbnbtn_ChangeRequestNew" style="top:140; left:4; width:128; height:
20;z-index:1028;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Change Request</div>
</div>
</a>
<a href="javascript:" ARID="640000006" ARType="Control"
ARDBN="btn_ChangeRequestSearch" class="btn btnurl arfid640000006
ardbnbtn_ChangeRequestSearch" style="top:170; left:4; width:128;
height:20;z-index:1029;background-color:transparent;"><div
class="btntextdiv" style="top:0; left:0; width:128; height:20;"><div
class="f7" style="text-align:left;;width:128">Search Change Request</
div>
</div>
</a>
<a href="javascript:" ARID="640000007" ARType="Control"
ARDBN="btn_OrdersNew" class="btn btnurl arfid640000007
ardbnbtn_OrdersNew" style="top:200; left:4; width:128; height:20;z-
index:1030;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Order</div>
</div>
</a>
<a href="javascript:" ARID="640000008" ARType="Control"
ARDBN="btn_OrdersSearch" class="btn btnurl arfid640000008
ardbnbtn_OrdersSearch" style="top:230; left:4; width:128; height:20;z-
index:1031;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Order</div>
</div>
</a>
<div ARID="240000002" ARType="Char" ARDBN="Phone Number" class="df
arfid240000002 ardbnPhoneNumber" style="z-index:1040;top:132; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000002" style="top:4; left:0;
width:90; height:17;">Phone</label><textarea class="text sr "
wrap="off" id="arid240000002" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="300000050" ARType="Trim" ARSubType=3 ARDBN="txt_banner"
class="arfid300000050 ardbntxt_banner trimdiv" style="z-index:
1005;background-color:transparent;top:15; left:250; width:410; height:
35;">
<table style="top:0; left:0; width:410; height:35;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="color:#ffffff;" class="f2
trimJustl">Remedy&nbsp;IT&nbsp;Service&nbsp;Manage ment&nbsp;for&nbsp;the&nbsp;Enterprise</
td>
</tr>
</table>
</div>
<a href="javascript:" ARID="750000000" ARType="Control"
ARDBN="O2_btnOrganisation" class="btn btn3d arfid750000000
ardbnO2_btnOrganisation" style="top:87; left:376; width:45; height:
21;visibility:hidden;z-index:1048;"><div class="btntextdiv" style="top:
0; left:0; width:45; height:21;"><div class="f1" style=";width:45">3rd
Pty</div>
</div>
</a>
<div ARID="661000230" ARType="Char" ARDBN="OrganisationType"
class="df dfro arfid661000230 ardbnOrganisationType" style="z-index:
1046;top:86; left:430; width:274; height:21;">
<label class="label f6" for="arid661000230" style="top:4; left:0;
width:88; height:17;">Organisation Type</label><textarea class="text
sr " wrap="off" id="arid661000230" cols="" style="top:0; left:89;
width:159; height:21;" ARMenu="O2_AST:OrganisationType" mstyle=2
readonly rows=1></textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<a href="javascript:" ARID="240000019" ARType="Control"
ARDBN="Profile" class="btn btn3d arfid240000019 ardbnProfile"
style="top:110; left:376; width:45; height:21;z-index:1042;"><div
class="btntextdiv" style="top:0; left:0; width:45; height:21;"><div
class="f1" style=";width:45">View</div>
</div>
</a>
<div ARID="200000006" ARType="Char" ARDBN="Department" class="df dfro
arfid200000006 ardbnDepartment" style="z-index:1038;top:109; left:430;
width:274; height:21;">
<label class="label f6" for="arid200000006" style="top:4; left:0;
width:88; height:17;">Organisation</label><textarea class="text sr "
wrap="off" id="arid200000006" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="SHR:Department" mstyle=2 readonly rows=1></
textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="200000012" ARType="Char" ARDBN="Region" class="df dfro
arfid200000012 ardbnRegion" style="z-index:1036;top:132; left:430;
width:274; height:21;">
<label class="label f6" for="arid200000012" style="top:4; left:0;
width:88; height:17;">Region</label><textarea class="text sr "
wrap="off" id="arid200000012" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="O2_SHR:Region" mstyle=2 readonly rows=1></
textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="200000007" ARType="Char" ARDBN="Site" class="df dfro
arfid200000007 ardbnSite" style="z-index:1037;top:155; left:430; width:
274; height:21;">
<label class="label f6" for="arid200000007" style="top:4; left:0;
width:88; height:17;">Location</label><textarea class="text sr "
wrap="off" id="arid200000007" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="O2_SHR:LocationByRegion" mstyle=2 readonly
rows=1></textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="660000268" ARType="EnumSel" ARDBN="O2_Authenticated"
class="df dfro arfid660000268 ardbnO2_Authenticated" style="z-index:
1043;top:184; left:174; width:198; height:21;">
<label class="label f9" for="arid660000268" style="top:4; left:0;
width:90; height:17;">Authenticated*</label><div class="selection"
style="top:0; left:91; width:107; height:21;"
ARSelMenu="[{v:&quot;No&quot;},{v:&quot;Yes&quot;},{v:&quot;No t
Required&quot;}]">
<input id="arid660000268" type="text" class="text " readonly
style="top:0; left:0; width:86; height:19;" />
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0;
left:86; width:19; height:19;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:0; left:-1; width:19; height:19;" />
</a>
</div>
</div>
<div ARID="640000025" ARType="Char" ARDBN="Incoming CLI" class="df
dfro arfid640000025 ardbnIncomingCLI" style="z-index:1049;top:211;
left:136; width:236; height:21;">
<label class="label f9" for="arid640000025" style="top:4; left:0;
width:90; height:17;">Incoming CLI</label><textarea class="text sr "
wrap="off" id="arid640000025" cols="" style="top:0; left:91; width:
145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="2" ARType="Char" ARDBN="Submitter" class="df dfro arfid2
ardbnSubmitter" style="z-index:993;top:211; left:430; width:248;
height:22;">
<label class="label f9" for="arid2" style="top:4; left:0; width:88;
height:18;">Submitter</label><textarea class="text sr " wrap="off"
id="arid2" cols="" style="top:0; left:89; width:159; height:21;"
readonly rows=1></textarea>
</div>
<div ARID="640000001" ARType="Char" ARDBN="Dialled Number" class="df
dfro arfid640000001 ardbnDialledNumber" style="z-index:1024;top:234;
left:136; width:236; height:21;">
<label class="label f9" for="arid640000001" style="top:4; left:0;
width:90; height:17;">Dialled Number</label><textarea class="text sr "
wrap="off" id="arid640000001" cols="" style="top:0; left:91; width:
145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="7" ARType="EnumSel" ARDBN="Status" class="df dfro arfid7
ardbnStatus" style="z-index:998;top:234; left:430; width:248; height:
21;">
<label class="label f9" for="arid7" style="top:4; left:0; width:88;
height:17;">Status</label><div class="selection" style="top:0; left:
89; width:159; height:21;" ARSelMenu="[{v:&quot;Active&quot;},
{v:&quot;Inactive&quot;}]">
<input id="arid7" type="text" class="text " readonly style="top:0;
left:0; width:138; height:19;" />
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0;
left:138; width:19; height:19;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:0; left:-1; width:19; height:19;" />
</a>
</div>
</div>
<div ARID="640000002" ARType="Char" ARDBN="Dialled Department"
class="df dfro arfid640000002 ardbnDialledDepartment" style="z-index:
1025;top:257; left:136; width:236; height:21;">
<label class="label f6" for="arid640000002" style="top:4; left:0;
width:90; height:17;">Dialled Department</label><textarea class="text
sr " wrap="off" id="arid640000002" cols="" style="top:0; left:91;
width:145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="3" ARType="Time" ARDBN="Create Date" class="df dfro arfid3
ardbnCreateDate" style="z-index:994;top:257; left:430; width:274;
height:23;">
<label class="label f10" for="arid3" style="top:4; left:0; width:88;
height:19;">Create Date</label><input id="arid3" class="text "
type="text" style="top:0; left:89; width:159; height:21;" readonly
ds=0 />
<a href="javascript:" class="btn btn3d expand" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/
field_calendar.gif" style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="300196300" ARType="Trim" ARSubType=3 ARDBN="Page Title_txt"
class="arfid300196300 ardbnPageTitle_txt trimdiv" style="z-index:
1000;background-color:transparent;top:50; left:135; width:271; height:
25;">
<table style="top:0; left:0; width:271; height:25;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="" class="f2
trimJustl">Remedy&nbsp;Telephony</td>
</tr>
</table>
</div>
<div ARID="301172200" ARType="Trim" ARSubType=2
ARDBN="NavigationSideBarTrimBox" class="arfid301172200
ardbnNavigationSideBarTrimBox bs4" style="z-index:992;background-
color:#ffffff;top:49; left:0; width:125; height:258;border-width:2;">
</div>
</div>
<div id="QueryBar" class="AdvancedSearchBar" ARID="1005"
ARType="SearchBar">
<label class="hidden" style="left:0;top:0;" for="arid1005">Advanced
Search Bar</label>
</div>
<input id="ARState" type="text" style="visibility:hidden" /></body>
</html>

Mar 23 '07 #1
3 3588
I don't get you, if you want to call a method in .js,
you just call it. Check out the reference.
Angus wrote:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.

The snippet of html is:

<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>

I want to call a script which will save the 'record' if you understand
me. But all I see is .js files. Can I call these .js methods from
javascript? If so how? Or if not is there any way, in javascript or
some code I can save the 'record' (obviously, I can manually click on
the Save button - but want to achieve this in code).

The full page appears below:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var loaded = 0;function ScriptLoaded() { ++loaded; if(loaded == 2)
ARSystemInit(); }
var ReportSelForm="ReportSelection",
RelContextPath='../../../../',AbsContextPath=null;</script>
<link rel="stylesheet" href="../../../../resources/stylesheets/
ARSystem.css"></link>
<script src="../../../../resources/javascript/LocalizedMessages_en.js"
defer=1></script>
<script src="../../../../resources/javascript/locale/en_GB.js"
defer=1></script>
<script>function DVFsf(){return "<HTML></HTML>"}; function DVFol(){}</
script>
<script src="../../../../resources/javascript/ClientCore.js" defer=1></
script>
<script src="form.js/b129d513.js" defer=1></script>
<script>document.write('<script src="userdata.js?winname=doctorO2_SHR
%3ACTI'+encodeURIComponent(name)+'" defer=1></'+'script>');</script>
</head>
<body onload="ScriptLoaded()" draghandler="BodyDrag"
style="display:none">

<div id="Toolbar"><div class="TBTopBarStatus">Current mode: <span
class="TBTopBarStatusMode"></span></div>
<a class="btn TBTopBarBox" href="javascript:"><img class="tbright"
src="../../../../resources/images/tb_right.gif" /><img class="tbdown"
src="../../../../resources/images/tb_down.gif" /></a><table
cellpadding=0 cellspacing=0 class="Toolbar"><tbody><tr><td nowrap=1
class="TBGroup TBGroup0">
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>

</td>
<td nowrap=1 class="TBGroup TBGroup2">
<a class="statushistory btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBstatushistory">Status history</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup3">
<a class="home btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBhome">Home</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="ResultsList">
<div ARID="1020" ARType="Table" ARDBN="CustomResultsList"
class="arfid1020 ardbnCustomResultsList" style="top:2; left:2; width:
636; height:60;visibility:hidden;z-index:0;"
ARCols="536890911,536890912,536890913,536890914,53 6890915,536890916,536890917"
ARColWs="112,70,112,112,140,70,140" ARDrill=1 ARServer="@"
ARSchema="@" ARMaxRows=0 ARDType=1 ARCSize=0 ARFixHdr=1 ARSelRows=0
ARSelInit=0 ARSelRefresh=0 ARAutoFit=0 ARSort=""
ARQual="{qual:&quot;&quot;, ids:[],extids:[]}"><img src="../../../../
resources/images/menu_down.gif" class="TableSortImgUp" ARInDOM=1 /
<img src="../../../../resources/images/menu_up.gif"
class="TableSortImgDown" ARInDOM=1 /><div class='TableHdr'><table
class='TableHdr' cellpadding=0 cellspacing=0><tbody><tr><td nowrap
valign=middle class='TableHdrL'></td><td nowrap valign=middle
class='TableHdrR'></td></tr></tbody></table></div><div
class='TableInner'></div><div class='TableFtr'><table class='TableFtr'
cellpadding=0 cellspacing=0><tbody><tr><td nowrap valign=middle
class='TableFtrL'></td><td nowrap valign=middle class='TableFtrR'></
td></tr></tbody></table></div></div>
</div>
<div id="Splitter" draggable=1 dragoriginal=1>
</div>
<div id="FormContainer" style="background-color:#ffffff">
<div class="FormContainerBackground">
<img class="FormContainerImage" galleryimg="no" style="top:0; left:0;
width:1652; height:50;" src="../../../../imagepool/
ffffff944e3868ffffffc965ffffff89ffffffccffffffffff ffffa542ffffffcf4ffffffc46ffffffae" /
</div>
<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>
<div ARID="240000005" ARType="Char" ARDBN="Requester Login Name+"
class="df arfid240000005 ardbnRequesterLoginName+" style="z-index:
1041;top:86; left:136; width:236; height:21;">
<label class="label f6" for="arid240000005" style="top:4; left:0;
width:90; height:17;">Login*+</label><textarea class="text sr "
wrap="off" id="arid240000005" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="240000001" ARType="Char" ARDBN="Requester Name+" class="df
arfid240000001 ardbnRequesterName+" style="z-index:1039;top:109; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000001" style="top:4; left:0;
width:90; height:17;">Name*+</label><textarea class="text sr "
wrap="off" id="arid240000001" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<a href="javascript:" ARID="660000281" ARType="Control"
ARDBN="O2_btnAuthenticate" class="btn btn3d arfid660000281
ardbnO2_btnAuthenticate" style="top:157; left:177; width:78; height:
21;z-index:1044;"><div class="btntextdiv" style="top:0; left:0; width:
78; height:21;"><div class="f1" style=";width:78">Authenticate</div>
</div>
</a>
<a href="javascript:" ARID="660000500" ARType="Control"
ARDBN="O2_btnAuthenticationNotReq" class="btn btn3d arfid660000500
ardbnO2_btnAuthenticationNotReq" style="top:157; left:288; width:78;
height:21;z-index:1045;"><div class="btntextdiv" style="top:0; left:0;
width:78; height:21;"><div class="f1" style=";width:78">Not Required</
div>
</div>
</a>
<a href="javascript:" ARID="640000003" ARType="Control"
ARDBN="btn_HelpDeskNew" class="btn btnurl arfid640000003
ardbnbtn_HelpDeskNew" style="top:80; left:4; width:128; height:20;z-
index:1026;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000004" ARType="Control"
ARDBN="btn_HelpDeskSearch" class="btn btnurl arfid640000004
ardbnbtn_HelpDeskSearch" style="top:110; left:4; width:128; height:
20;z-index:1027;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000005" ARType="Control"
ARDBN="btn_ChangeRequestNew" class="btn btnurl arfid640000005
ardbnbtn_ChangeRequestNew" style="top:140; left:4; width:128; height:
20;z-index:1028;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Change Request</div>
</div>
</a>
<a href="javascript:" ARID="640000006" ARType="Control"
ARDBN="btn_ChangeRequestSearch" class="btn btnurl arfid640000006
ardbnbtn_ChangeRequestSearch" style="top:170; left:4; width:128;
height:20;z-index:1029;background-color:transparent;"><div
class="btntextdiv" style="top:0; left:0; width:128; height:20;"><div
class="f7" style="text-align:left;;width:128">Search Change Request</
div>
</div>
</a>
<a href="javascript:" ARID="640000007" ARType="Control"
ARDBN="btn_OrdersNew" class="btn btnurl arfid640000007
ardbnbtn_OrdersNew" style="top:200; left:4; width:128; height:20;z-
index:1030;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Order</div>
</div>
</a>
<a href="javascript:" ARID="640000008" ARType="Control"
ARDBN="btn_OrdersSearch" class="btn btnurl arfid640000008
ardbnbtn_OrdersSearch" style="top:230; left:4; width:128; height:20;z-
index:1031;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Order</div>
</div>
</a>
<div ARID="240000002" ARType="Char" ARDBN="Phone Number" class="df
arfid240000002 ardbnPhoneNumber" style="z-index:1040;top:132; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000002" style="top:4; left:0;
width:90; height:17;">Phone</label><textarea class="text sr "
wrap="off" id="arid240000002" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="300000050" ARType="Trim" ARSubType=3 ARDBN="txt_banner"
class="arfid300000050 ardbntxt_banner trimdiv" style="z-index:
1005;background-color:transparent;top:15; left:250; width:410; height:
35;">
<table style="top:0; left:0; width:410; height:35;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="color:#ffffff;" class="f2
trimJustl">Remedy&nbsp;IT&nbsp;Service&nbsp;Manage ment&nbsp;for&nbsp;the&nbsp;Enterprise</
td>
</tr>
</table>
</div>
<a href="javascript:" ARID="750000000" ARType="Control"
ARDBN="O2_btnOrganisation" class="btn btn3d arfid750000000
ardbnO2_btnOrganisation" style="top:87; left:376; width:45; height:
21;visibility:hidden;z-index:1048;"><div class="btntextdiv" style="top:
0; left:0; width:45; height:21;"><div class="f1" style=";width:45">3rd
Pty</div>
</div>
</a>
<div ARID="661000230" ARType="Char" ARDBN="OrganisationType"
class="df dfro arfid661000230 ardbnOrganisationType" style="z-index:
1046;top:86; left:430; width:274; height:21;">
<label class="label f6" for="arid661000230" style="top:4; left:0;
width:88; height:17;">Organisation Type</label><textarea class="text
sr " wrap="off" id="arid661000230" cols="" style="top:0; left:89;
width:159; height:21;" ARMenu="O2_AST:OrganisationType" mstyle=2
readonly rows=1></textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<a href="javascript:" ARID="240000019" ARType="Control"
ARDBN="Profile" class="btn btn3d arfid240000019 ardbnProfile"
style="top:110; left:376; width:45; height:21;z-index:1042;"><div
class="btntextdiv" style="top:0; left:0; width:45; height:21;"><div
class="f1" style=";width:45">View</div>
</div>
</a>
<div ARID="200000006" ARType="Char" ARDBN="Department" class="df dfro
arfid200000006 ardbnDepartment" style="z-index:1038;top:109; left:430;
width:274; height:21;">
<label class="label f6" for="arid200000006" style="top:4; left:0;
width:88; height:17;">Organisation</label><textarea class="text sr "
wrap="off" id="arid200000006" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="SHR:Department" mstyle=2 readonly rows=1></
textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="200000012" ARType="Char" ARDBN="Region" class="df dfro
arfid200000012 ardbnRegion" style="z-index:1036;top:132; left:430;
width:274; height:21;">
<label class="label f6" for="arid200000012" style="top:4; left:0;
width:88; height:17;">Region</label><textarea class="text sr "
wrap="off" id="arid200000012" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="O2_SHR:Region" mstyle=2 readonly rows=1></
textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="200000007" ARType="Char" ARDBN="Site" class="df dfro
arfid200000007 ardbnSite" style="z-index:1037;top:155; left:430; width:
274; height:21;">
<label class="label f6" for="arid200000007" style="top:4; left:0;
width:88; height:17;">Location</label><textarea class="text sr "
wrap="off" id="arid200000007" cols="" style="top:0; left:89; width:
159; height:21;" ARMenu="O2_SHR:LocationByRegion" mstyle=2 readonly
rows=1></textarea>
<a href="javascript:" class="btn btn3d menu" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="660000268" ARType="EnumSel" ARDBN="O2_Authenticated"
class="df dfro arfid660000268 ardbnO2_Authenticated" style="z-index:
1043;top:184; left:174; width:198; height:21;">
<label class="label f9" for="arid660000268" style="top:4; left:0;
width:90; height:17;">Authenticated*</label><div class="selection"
style="top:0; left:91; width:107; height:21;"
ARSelMenu="[{v:&quot;No&quot;},{v:&quot;Yes&quot;},{v:&quot;No t
Required&quot;}]">
<input id="arid660000268" type="text" class="text " readonly
style="top:0; left:0; width:86; height:19;" />
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0;
left:86; width:19; height:19;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:0; left:-1; width:19; height:19;" />
</a>
</div>
</div>
<div ARID="640000025" ARType="Char" ARDBN="Incoming CLI" class="df
dfro arfid640000025 ardbnIncomingCLI" style="z-index:1049;top:211;
left:136; width:236; height:21;">
<label class="label f9" for="arid640000025" style="top:4; left:0;
width:90; height:17;">Incoming CLI</label><textarea class="text sr "
wrap="off" id="arid640000025" cols="" style="top:0; left:91; width:
145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="2" ARType="Char" ARDBN="Submitter" class="df dfro arfid2
ardbnSubmitter" style="z-index:993;top:211; left:430; width:248;
height:22;">
<label class="label f9" for="arid2" style="top:4; left:0; width:88;
height:18;">Submitter</label><textarea class="text sr " wrap="off"
id="arid2" cols="" style="top:0; left:89; width:159; height:21;"
readonly rows=1></textarea>
</div>
<div ARID="640000001" ARType="Char" ARDBN="Dialled Number" class="df
dfro arfid640000001 ardbnDialledNumber" style="z-index:1024;top:234;
left:136; width:236; height:21;">
<label class="label f9" for="arid640000001" style="top:4; left:0;
width:90; height:17;">Dialled Number</label><textarea class="text sr "
wrap="off" id="arid640000001" cols="" style="top:0; left:91; width:
145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="7" ARType="EnumSel" ARDBN="Status" class="df dfro arfid7
ardbnStatus" style="z-index:998;top:234; left:430; width:248; height:
21;">
<label class="label f9" for="arid7" style="top:4; left:0; width:88;
height:17;">Status</label><div class="selection" style="top:0; left:
89; width:159; height:21;" ARSelMenu="[{v:&quot;Active&quot;},
{v:&quot;Inactive&quot;}]">
<input id="arid7" type="text" class="text " readonly style="top:0;
left:0; width:138; height:19;" />
<a href="javascript:" class="btn btn3d selectionbtn" style="top:0;
left:138; width:19; height:19;">
<img class="btnimg" src="../../../../resources/images/field_menu.gif"
style="top:0; left:-1; width:19; height:19;" />
</a>
</div>
</div>
<div ARID="640000002" ARType="Char" ARDBN="Dialled Department"
class="df dfro arfid640000002 ardbnDialledDepartment" style="z-index:
1025;top:257; left:136; width:236; height:21;">
<label class="label f6" for="arid640000002" style="top:4; left:0;
width:90; height:17;">Dialled Department</label><textarea class="text
sr " wrap="off" id="arid640000002" cols="" style="top:0; left:91;
width:145; height:21;" readonly rows=1></textarea>
</div>
<div ARID="3" ARType="Time" ARDBN="Create Date" class="df dfro arfid3
ardbnCreateDate" style="z-index:994;top:257; left:430; width:274;
height:23;">
<label class="label f10" for="arid3" style="top:4; left:0; width:88;
height:19;">Create Date</label><input id="arid3" class="text "
type="text" style="top:0; left:89; width:159; height:21;" readonly
ds=0 />
<a href="javascript:" class="btn btn3d expand" style="top:0; left:253;
width:21; height:21;">
<img class="btnimg" src="../../../../resources/images/
field_calendar.gif" style="top:1; left:0; width:19; height:19;" />
</a>
</div>
<div ARID="300196300" ARType="Trim" ARSubType=3 ARDBN="Page Title_txt"
class="arfid300196300 ardbnPageTitle_txt trimdiv" style="z-index:
1000;background-color:transparent;top:50; left:135; width:271; height:
25;">
<table style="top:0; left:0; width:271; height:25;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="" class="f2
trimJustl">Remedy&nbsp;Telephony</td>
</tr>
</table>
</div>
<div ARID="301172200" ARType="Trim" ARSubType=2
ARDBN="NavigationSideBarTrimBox" class="arfid301172200
ardbnNavigationSideBarTrimBox bs4" style="z-index:992;background-
color:#ffffff;top:49; left:0; width:125; height:258;border-width:2;">
</div>
</div>
<div id="QueryBar" class="AdvancedSearchBar" ARID="1005"
ARType="SearchBar">
<label class="hidden" style="left:0;top:0;" for="arid1005">Advanced
Search Bar</label>
</div>
<input id="ARState" type="text" style="visibility:hidden" /></body>
</html>
Mar 23 '07 #2
On 23 Mar, 14:57, "femto" <femto...@gmail.comwrote:
I don't get you, if you want to call a method in .js,
you just call it. Check out the reference.

Angus wrote:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of html is:
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
I want to call a script which will save the 'record' if you understand
me. But all I see is .js files. Can I call these .js methods from
javascript? If so how? Or if not is there any way, in javascript or
some code I can save the 'record' (obviously, I can manually click on
the Save button - but want to achieve this in code).
The full page appears below:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var loaded = 0;function ScriptLoaded() { ++loaded; if(loaded == 2)
ARSystemInit(); }
var ReportSelForm="ReportSelection",
RelContextPath='../../../../',AbsContextPath=null;</script>
<link rel="stylesheet" href="../../../../resources/stylesheets/
ARSystem.css"></link>
<script src="../../../../resources/javascript/LocalizedMessages_en.js"
defer=1></script>
<script src="../../../../resources/javascript/locale/en_GB.js"
defer=1></script>
<script>function DVFsf(){return "<HTML></HTML>"}; function DVFol(){}</
script>
<script src="../../../../resources/javascript/ClientCore.js" defer=1></
script>
<script src="form.js/b129d513.js" defer=1></script>
<script>document.write('<script src="userdata.js?winname=doctorO2_SHR
%3ACTI'+encodeURIComponent(name)+'" defer=1></'+'script>');</script>
</head>
<body onload="ScriptLoaded()" draghandler="BodyDrag"
style="display:none">
<div id="Toolbar"><div class="TBTopBarStatus">Current mode: <span
class="TBTopBarStatusMode"></span></div>
<a class="btn TBTopBarBox" href="javascript:"><img class="tbright"
src="../../../../resources/images/tb_right.gif" /><img class="tbdown"
src="../../../../resources/images/tb_down.gif" /></a><table
cellpadding=0 cellspacing=0 class="Toolbar"><tbody><tr><td nowrap=1
class="TBGroup TBGroup0">
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup2">
<a class="statushistory btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBstatushistory">Status history</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup3">
<a class="home btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBhome">Home</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="ResultsList">
<div ARID="1020" ARType="Table" ARDBN="CustomResultsList"
class="arfid1020 ardbnCustomResultsList" style="top:2; left:2; width:
636; height:60;visibility:hidden;z-index:0;"
ARCols="536890911,536890912,536890913,536890914,53 6890915,536890916,5368909*17"
ARColWs="112,70,112,112,140,70,140" ARDrill=1 ARServer="@"
ARSchema="@" ARMaxRows=0 ARDType=1 ARCSize=0 ARFixHdr=1 ARSelRows=0
ARSelInit=0 ARSelRefresh=0 ARAutoFit=0 ARSort=""
ARQual="{qual:&quot;&quot;, ids:[],extids:[]}"><img src="../../../.../
resources/images/menu_down.gif" class="TableSortImgUp" ARInDOM=1 /
><img src="../../../../resources/images/menu_up.gif"
class="TableSortImgDown" ARInDOM=1 /><div class='TableHdr'><table
class='TableHdr' cellpadding=0 cellspacing=0><tbody><tr><td nowrap
valign=middle class='TableHdrL'></td><td nowrap valign=middle
class='TableHdrR'></td></tr></tbody></table></div><div
class='TableInner'></div><div class='TableFtr'><table class='TableFtr'
cellpadding=0 cellspacing=0><tbody><tr><td nowrap valign=middle
class='TableFtrL'></td><td nowrap valign=middle class='TableFtrR'></
td></tr></tbody></table></div></div>
</div>
<div id="Splitter" draggable=1 dragoriginal=1>
</div>
<div id="FormContainer" style="background-color:#ffffff">
<div class="FormContainerBackground">
<img class="FormContainerImage" galleryimg="no" style="top:0; left:0;
width:1652; height:50;" src="../../../../imagepool/
ffffff944e3868ffffffc965ffffff89ffffffccffffffffff ffffa542ffffffcf4ffffffc4*6ffffffae" /
</div>
<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>
<div ARID="240000005" ARType="Char" ARDBN="Requester Login Name+"
class="df arfid240000005 ardbnRequesterLoginName+" style="z-index:
1041;top:86; left:136; width:236; height:21;">
<label class="label f6" for="arid240000005" style="top:4; left:0;
width:90; height:17;">Login*+</label><textarea class="text sr "
wrap="off" id="arid240000005" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="240000001" ARType="Char" ARDBN="Requester Name+" class="df
arfid240000001 ardbnRequesterName+" style="z-index:1039;top:109; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000001" style="top:4; left:0;
width:90; height:17;">Name*+</label><textarea class="text sr "
wrap="off" id="arid240000001" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<a href="javascript:" ARID="660000281" ARType="Control"
ARDBN="O2_btnAuthenticate" class="btn btn3d arfid660000281
ardbnO2_btnAuthenticate" style="top:157; left:177; width:78; height:
21;z-index:1044;"><div class="btntextdiv" style="top:0; left:0; width:
78; height:21;"><div class="f1" style=";width:78">Authenticate</div>
</div>
</a>
<a href="javascript:" ARID="660000500" ARType="Control"
ARDBN="O2_btnAuthenticationNotReq" class="btn btn3d arfid660000500
ardbnO2_btnAuthenticationNotReq" style="top:157; left:288; width:78;
height:21;z-index:1045;"><div class="btntextdiv" style="top:0; left:0;
width:78; height:21;"><div class="f1" style=";width:78">Not Required</
div>
</div>
</a>
<a href="javascript:" ARID="640000003" ARType="Control"
ARDBN="btn_HelpDeskNew" class="btn btnurl arfid640000003
ardbnbtn_HelpDeskNew" style="top:80; left:4; width:128; height:20;z-
index:1026;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000004" ARType="Control"
ARDBN="btn_HelpDeskSearch" class="btn btnurl arfid640000004
ardbnbtn_HelpDeskSearch" style="top:110; left:4; width:128; height:
20;z-index:1027;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000005" ARType="Control"
ARDBN="btn_ChangeRequestNew" class="btn btnurl arfid640000005
ardbnbtn_ChangeRequestNew" style="top:140; left:4; width:128; height:
20;z-index:1028;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Change Request</div>
</div>
</a>
<a href="javascript:" ARID="640000006" ARType="Control"
ARDBN="btn_ChangeRequestSearch" class="btn btnurl arfid640000006
ardbnbtn_ChangeRequestSearch" style="top:170; left:4; width:128;
height:20;z-index:1029;background-color:transparent;"><div
class="btntextdiv" style="top:0; left:0; width:128; height:20;"><div
class="f7" style="text-align:left;;width:128">Search Change Request</
div>
</div>
</a>
<a href="javascript:" ARID="640000007" ARType="Control"
ARDBN="btn_OrdersNew" class="btn btnurl arfid640000007
ardbnbtn_OrdersNew" style="top:200; left:4; width:128; height:20;z-
index:1030;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Order</div>
</div>
</a>
<a href="javascript:" ARID="640000008" ARType="Control"
ARDBN="btn_OrdersSearch" class="btn btnurl arfid640000008
ardbnbtn_OrdersSearch" style="top:230; left:4; width:128; height:20;z-
index:1031;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Order</div>
</div>
</a>
<div ARID="240000002" ARType="Char" ARDBN="Phone Number" class="df
arfid240000002 ardbnPhoneNumber" style="z-index:1040;top:132; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000002" style="top:4; left:0;
width:90; height:17;">Phone</label><textarea class="text sr "
wrap="off" id="arid240000002" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="300000050" ARType="Trim" ARSubType=3 ARDBN="txt_banner"
class="arfid300000050 ardbntxt_banner trimdiv" style="z-index:
1005;background-color:transparent;top:15; left:250; width:410; height:
35;">
<table style="top:0; left:0; width:410; height:35;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="color:#ffffff;" class="f2
trimJustl">Remedy&nbsp;IT&nbsp;Service&nbsp;Manage ment&nbsp;for&nbsp;the&nb*sp;Enterprise</
td>
</tr>
</table>
</div>
<a href="javascript:" ARID="750000000" ARType="Control"
ARDBN="O2_btnOrganisation" class="btn btn3d arfid750000000
ardbnO2_btnOrganisation" style="top:87; left:376; width:45; height:- Hide quoted text -

- Show quoted text -...

read more
But what function do I call? If the function is not defined on the
web page, can I still call it - eg it is a script on the server? If
so how?

Mar 23 '07 #3
Angus wrote:
On 23 Mar, 14:57, "femto" <femto...@gmail.comwrote:
>I don't get you, if you want to call a method in .js,
you just call it. Check out the reference.

Angus wrote:
I have a web page with a toolbar containing a Save button. The Save
button can change contextually to be a Search button in some cases.
Hence the button name searchsavechanges.
The snippet of html is:
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
I want to call a script which will save the 'record' if you understand
me. But all I see is .js files. Can I call these .js methods from
javascript? If so how? Or if not is there any way, in javascript or
some code I can save the 'record' (obviously, I can manually click on
the Save button - but want to achieve this in code).
The full page appears below:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script>
var loaded = 0;function ScriptLoaded() { ++loaded; if(loaded == 2)
ARSystemInit(); }
var ReportSelForm="ReportSelection",
RelContextPath='../../../../',AbsContextPath=null;</script>
<link rel="stylesheet" href="../../../../resources/stylesheets/
ARSystem.css"></link>
<script src="../../../../resources/javascript/LocalizedMessages_en.js"
defer=1></script>
<script src="../../../../resources/javascript/locale/en_GB.js"
defer=1></script>
<script>function DVFsf(){return "<HTML></HTML>"}; function DVFol(){}</
script>
<script src="../../../../resources/javascript/ClientCore.js" defer=1></
script>
<script src="form.js/b129d513.js" defer=1></script>
<script>document.write('<script src="userdata.js?winname=doctorO2_SHR
%3ACTI'+encodeURIComponent(name)+'" defer=1></'+'script>');</script>
</head>
<body onload="ScriptLoaded()" draghandler="BodyDrag"
style="display:none">
<div id="Toolbar"><div class="TBTopBarStatus">Current mode: <span
class="TBTopBarStatusMode"></span></div>
<a class="btn TBTopBarBox" href="javascript:"><img class="tbright"
src="../../../../resources/images/tb_right.gif" /><img class="tbdown"
src="../../../../resources/images/tb_down.gif" /></a><table
cellpadding=0 cellspacing=0 class="Toolbar"><tbody><tr><td nowrap=1
class="TBGroup TBGroup0">
<a class="searchsavechanges btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBsearchsavechanges">Search</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup2">
<a class="statushistory btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBstatushistory">Status history</div>
</a>
</td>
<td nowrap=1 class="TBGroup TBGroup3">
<a class="home btn btn3d tbbtn" href="javascript:"
style="position:static">
<div id="TBhome">Home</div>
</a>
</td>
</tr>
</tbody>
</table>
</div>
<div id="ResultsList">
<div ARID="1020" ARType="Table" ARDBN="CustomResultsList"
class="arfid1020 ardbnCustomResultsList" style="top:2; left:2; width:
636; height:60;visibility:hidden;z-index:0;"
ARCols="536890911,536890912,536890913,536890914,53 6890915,536890916,5368909*
17"
ARColWs="112,70,112,112,140,70,140" ARDrill=1 ARServer="@"
ARSchema="@" ARMaxRows=0 ARDType=1 ARCSize=0 ARFixHdr=1 ARSelRows=0
ARSelInit=0 ARSelRefresh=0 ARAutoFit=0 ARSort=""
ARQual="{qual:&quot;&quot;, ids:[],extids:[]}"><img src="../../../../
resources/images/menu_down.gif" class="TableSortImgUp" ARInDOM=1 /
<img src="../../../../resources/images/menu_up.gif"
class="TableSortImgDown" ARInDOM=1 /><div class='TableHdr'><table
class='TableHdr' cellpadding=0 cellspacing=0><tbody><tr><td nowrap
valign=middle class='TableHdrL'></td><td nowrap valign=middle
class='TableHdrR'></td></tr></tbody></table></div><div
class='TableInner'></div><div class='TableFtr'><table class='TableFtr'
cellpadding=0 cellspacing=0><tbody><tr><td nowrap valign=middle
class='TableFtrL'></td><td nowrap valign=middle class='TableFtrR'></
td></tr></tbody></table></div></div>
</div>
<div id="Splitter" draggable=1 dragoriginal=1>
</div>
<div id="FormContainer" style="background-color:#ffffff">
<div class="FormContainerBackground">
<img class="FormContainerImage" galleryimg="no" style="top:0; left:0;
width:1652; height:50;" src="../../../../imagepool/
ffffff944e3868ffffffc965ffffff89ffffffccffffffffff ffffa542ffffffcf4ffffffc4*
6ffffffae"
/
</div>
<div style="top:0;left:0;width:735;height:348">&nbsp;</div>
<div ARID="640000009" ARType="Char" ARDBN="Call ID" class="df dfro
arfid640000009 ardbnCallID" style="z-index:1032;top:53; left:430;
width:248; height:21;">
<label class="label f9" for="arid640000009" style="top:4; left:0;
width:88; height:17;">Call ID</label><textarea class="text sr "
wrap="off" id="arid640000009" cols="" style="top:0; left:89; width:
159; height:21;" readonly rows=1></textarea>
</div>
<div ARID="240000005" ARType="Char" ARDBN="Requester Login Name+"
class="df arfid240000005 ardbnRequesterLoginName+" style="z-index:
1041;top:86; left:136; width:236; height:21;">
<label class="label f6" for="arid240000005" style="top:4; left:0;
width:90; height:17;">Login*+</label><textarea class="text sr "
wrap="off" id="arid240000005" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="240000001" ARType="Char" ARDBN="Requester Name+" class="df
arfid240000001 ardbnRequesterName+" style="z-index:1039;top:109; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000001" style="top:4; left:0;
width:90; height:17;">Name*+</label><textarea class="text sr "
wrap="off" id="arid240000001" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<a href="javascript:" ARID="660000281" ARType="Control"
ARDBN="O2_btnAuthenticate" class="btn btn3d arfid660000281
ardbnO2_btnAuthenticate" style="top:157; left:177; width:78; height:
21;z-index:1044;"><div class="btntextdiv" style="top:0; left:0; width:
78; height:21;"><div class="f1" style=";width:78">Authenticate</div>
</div>
</a>
<a href="javascript:" ARID="660000500" ARType="Control"
ARDBN="O2_btnAuthenticationNotReq" class="btn btn3d arfid660000500
ardbnO2_btnAuthenticationNotReq" style="top:157; left:288; width:78;
height:21;z-index:1045;"><div class="btntextdiv" style="top:0; left:0;
width:78; height:21;"><div class="f1" style=";width:78">Not Required</
div>
</div>
</a>
<a href="javascript:" ARID="640000003" ARType="Control"
ARDBN="btn_HelpDeskNew" class="btn btnurl arfid640000003
ardbnbtn_HelpDeskNew" style="top:80; left:4; width:128; height:20;z-
index:1026;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000004" ARType="Control"
ARDBN="btn_HelpDeskSearch" class="btn btnurl arfid640000004
ardbnbtn_HelpDeskSearch" style="top:110; left:4; width:128; height:
20;z-index:1027;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Help Desk</div>
</div>
</a>
<a href="javascript:" ARID="640000005" ARType="Control"
ARDBN="btn_ChangeRequestNew" class="btn btnurl arfid640000005
ardbnbtn_ChangeRequestNew" style="top:140; left:4; width:128; height:
20;z-index:1028;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Change Request</div>
</div>
</a>
<a href="javascript:" ARID="640000006" ARType="Control"
ARDBN="btn_ChangeRequestSearch" class="btn btnurl arfid640000006
ardbnbtn_ChangeRequestSearch" style="top:170; left:4; width:128;
height:20;z-index:1029;background-color:transparent;"><div
class="btntextdiv" style="top:0; left:0; width:128; height:20;"><div
class="f7" style="text-align:left;;width:128">Search Change Request</
div>
</div>
</a>
<a href="javascript:" ARID="640000007" ARType="Control"
ARDBN="btn_OrdersNew" class="btn btnurl arfid640000007
ardbnbtn_OrdersNew" style="top:200; left:4; width:128; height:20;z-
index:1030;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">New Order</div>
</div>
</a>
<a href="javascript:" ARID="640000008" ARType="Control"
ARDBN="btn_OrdersSearch" class="btn btnurl arfid640000008
ardbnbtn_OrdersSearch" style="top:230; left:4; width:128; height:20;z-
index:1031;background-color:transparent;"><div class="btntextdiv"
style="top:0; left:0; width:128; height:20;"><div class="f7"
style="text-align:left;;width:128">Search Order</div>
</div>
</a>
<div ARID="240000002" ARType="Char" ARDBN="Phone Number" class="df
arfid240000002 ardbnPhoneNumber" style="z-index:1040;top:132; left:
136; width:236; height:21;">
<label class="label f6" for="arid240000002" style="top:4; left:0;
width:90; height:17;">Phone</label><textarea class="text sr "
wrap="off" id="arid240000002" cols="" style="top:0; left:91; width:
145; height:21;" rows=1></textarea>
</div>
<div ARID="300000050" ARType="Trim" ARSubType=3 ARDBN="txt_banner"
class="arfid300000050 ardbntxt_banner trimdiv" style="z-index:
1005;background-color:transparent;top:15; left:250; width:410; height:
35;">
<table style="top:0; left:0; width:410; height:35;" class="trimTable"
cellpadding=0 cellspacing=0>
<tr>
<td valign="middle" style="color:#ffffff;" class="f2
trimJustl">Remedy&nbsp;IT&nbsp;Service&nbsp;Manage ment&nbsp;for&nbsp;the&nb*
sp;Enterprise</
td>
</tr>
</table>
</div>
<a href="javascript:" ARID="750000000" ARType="Control"
ARDBN="O2_btnOrganisation" class="btn btn3d arfid750000000
ardbnO2_btnOrganisation" style="top:87; left:376; width:45; height:-
Hide quoted text -

- Show quoted text -...

read more

But what function do I call? If the function is not defined on the
web page, can I still call it - eg it is a script on the server? If
so how?
Hi,

Without looking through your huge script, a few pointers:
If you need some JS functions in your script, include them.
Two ways:
1) serverside:
when you spit out the HTML make sure you output the JS functions too.
2) Clientside
Let the browser get the needed JS.
Simply add this:
<script src="path/to/your/file/yourjs.js"></script>

Now all the JS defined in that file is included in your script.

PS: using <a href="javascript:"is not advised.

Regards,
Erwin Moller
Mar 23 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Wen | last post by:
Hi everyone, ..After my first lesson, I have to create a asp page with: ..asp tag for time ..client script that runs at the server for date ..client script that runs at client and shows a...
2
by: kelvin | last post by:
Hi, I've this piece of code which does not work at all. Can anyone point out my mistake? I've 2 buttons. History button will call verifyFields() function and lead to different page for...
30
by: bblais | last post by:
Hello, Let me start by saying that I am coming from a background using Matlab (or Octave), and C++. I am going to outline the basic nuts-and-bolts of how I work in these languages, and ask for...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
4
by: E | last post by:
I am having trouble with setTimeout working on a second call to the setTimeout function from a second page which is an html page. Here is the scenario. I have a web page and onload it calls a...
15
by: mc | last post by:
I'm writing an app for managing Task Lists, I'm trying to add some controls to a form that I can use to link tasks, my original intention was to: - Add two list boxes, one listing "all Tasks"...
1
by: satish2112 | last post by:
Hi, I have a text-area which contains values from mysql database and 2 buttons, Edit and Update. When I click on the Edit button, I can edit the text-area (initially non-editable). After this,...
10
by: Ohmster | last post by:
I am trying to use this cool script that some MIT guy wrote and it just does not work, I get a stream of errors when I try to run it. It is supposed to visit a URL and snag all of the pictures on...
3
by: fizilla | last post by:
Hello all! I have the following weird problem and since I am new to Python I somehow cannot figure out an elegant solution. The problem reduces to the following question: How to pickle a...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.