[thelist] RE: DHTML questions...
JTocher
janice at discoverysystems.com
Thu Nov 15 18:52:01 CST 2001
Thanks for the insight, Ben!
This looks understandable even for a javascript newbie like me! I'll give
this one a whirl!
This - in combination with re-writing the div tag might just be the ticket I
need.
Janice
on 11/15/01 4:48 PM, you wrote:
> I think the unstated problem here is to what the variables are returned
> by the function. You can't return more than one value to a variable,
> unless it's an object. This code snippet shows a way to do so:
>
> var getTheLoc = new Object();
>
> getTheLoc.top_loc = 10;
> getTheLoc.left_loc = 20;
>
> alert("top_loc: " + getTheLoc.top_loc + " left_loc: " +
> getTheLoc.left_loc);
>
> function locateBox(top_loc, left_loc) {
> var theLoc = new Object();
> theLoc.top_loc = top_loc;
> theLoc.left_loc = left_loc;
> return theLoc;
> }
>
> getTheLoc = locateBox(40,60);
>
> alert("top_loc: " + getTheLoc.top_loc + " left_loc: " +
> getTheLoc.left_loc);
More information about the thelist
mailing list