Short Description
|
extending body Onload()?
|
Entered
|
By:
JaxAce
When: 1999-05-13 18:10:46 Build: 2.0.4D
|
Categories
|
Type:
Question
Department: Product
Category:
Missing Product Feature
|
Description
|
In an STML file, <TEMACRO TERMBODY> generates this in the HTML file:
<Body onLoad="SS_SetCursor(document.Surf_Form.F_0_80);">
where the parameter is the first field to put in focus.
And throught the extensions, it's possible to add other
functions:
<TEMACRO TERMBODY 'onUnload="DoThisCoolThing()"'>
But how can I hook to my <b>own onLoad</b> function? It's not
possible to alter SS_SetCursor() so that I could let
it run and call my code from it. Nor can I call my own
onLoad routine which would call SS_SetCursor() because I can't know ahead of time which field will be getting the
focus. (not to mention that if I need VBS, I'm stuck with JScript - well you guys can't implement everything!)
- H
|
|
Append
|
By: WindSurfer When: 1999-05-13 18:42:33 New Status:
Pending Customer
|
Comment
|
You didn't look closely enough at the SS_SetCursor function-- if you did, you'd notice the call to userLoadScript(targ) :)
If you include a function named userLoadScript(parameter) on the page, it will get called at onLoad time-- the parameter that is passed is the field name currently containing the focus which may or may not be of use to your onLoad function, but it is there anyway.
I believe that the scripting model in IE allows inter-language calls between VBScript and JavaScript...so you might try a VBScript procedure named userLoadScript...
The documentation for TEMACRO TERMBODY was pretty lame-- we updated it slightly and it is in the latest rev of the docs at ftp://ftp.ieinc2.com/pub/surfer/surfdocs.zip (unzip to \screensurfer\hostserver\docs).
Coincidentally, the description of the TEMACRO TERMBODY is the only difference between the docs in this zip and those in the V2 installation program.
|
|
Append
|
By: JaxAce When: 1999-05-14 09:58:58 New Status:
Pending IE
|
Comment
|
Actually, I remember now that I did look at this in
an earlier version of the docs - but couldn't get it
to work. The newer version explains it as you do
above. I just tried that too - it doesn't get called.
<script language="JScript">
function UserLoadScript(cursor_pos)
{
alert ("Call me a code mushroom");
}
</script>
|
|
Append
|
By: Connie When: 1999-05-14 10:02:54 New Status:
Pending Customer
|
Comment
|
Hmmm--we will reproduce and get a fix out today-- possible work-around is to add a var UserLoadScript in your script block, as our "don't call it if it isn't there" logic may be breaking in IE (tested in Netscape)...
|
|
Append
|
By: JaxAce When: 1999-05-17 11:59:20 New Status:
Pending IE
|
Comment
|
Problem solved.
wE need to watch our CaPs A Little closer:
UserLoadScript() in the comment and docs
is not
userLoadScript() as it's called in SS_SetCursor()
As you know, many coders, including me, mindlessly
cut and pAste.
- h
|
|
Append
|
By: Jitz When: 1999-05-17 12:03:07 New Status:
Pending Customer
|
Comment
|
dOn'T iNsuLt sUPpOrt oR tHe kID gEt'S iT!
Doc is fixed--will fix this ticket-- readers of the ticket note that the immediately prior append helped you to avoid the same mistake!
|
|
Append
|
By: JaxAce When: 1999-05-17 12:11:03 New Status:
Closed
|
Comment
|
thanks --- yes the prior append did point me
in the right direction.
It's not a capital crime <g> and
no InSult inTended <G>
|
|
Append
|
By: WindSurfer When: 1999-05-17 12:16:26 New Status:
Closed
|
Comment
|
wE kNew it wAsN't aN iNsUlT, mR. lINdbUrgH.
|