usenet@ctoxyeb.com wrote:[color=blue]
> ASM wrote:
>[color=green]
>>usenet@ctoxyeb.com wrote:
>>[color=darkred]
>>>Hi All,
>>>
>>>I have some initialization to be done at page load time, which changes
>>>the text of some anchors so that they are consistent with the query
>>>string (these anchors are used as criteria selectors, and should be
>>>initialized to the criteria contained within the url).[/color]
>>
>>once more I do understand anything[/color][/color]
re-reading (with lighting bellow)
I understand you want to change content of divs (or links)
with what follow an url ( foo.htm?criter1=New text&criter2=Other text )
Couldn't you have a script in header's top
to stock this criterias in global variables
then along lines with links to modify
have JS script(s) to write the correct text(s) comming from this variables ?
[color=blue][color=green]
>>What is the text of an anchor ? (no sense for me)[/color]
>
> It's a regular <a> tag,[/color]
well, we talk about same thing
but, in fact, probably you speak about links
[color=blue]
> when clicked it opens a selector box,[/color]
I don't know what it is in JavaScript
[color=blue]
> and once
> a selection is made, the link text is changed to the selected item.[/color]
let's say so
[color=blue][color=green]
>>what kind of code do you use to re-render your anchors ?[/color]
>
> Standard stuff like:
>
> var div = getElementById('divId');
> div.innerHTML = newText;
>
> Html for this is along hte lines of:
>
> <a href="#" onclick="openSelector(); return false">
> <div id=divId>Selection</div></a>[/color]
<a id="divId" href="#" onclick="openSelector(); return false">
Selection</a>
or, if possible (global variable in header)
<a href="#" onclick="openSelector(); return false">
<script type="text/javascript">document.write(criter_1)</script></a>
because I've seen openSelector() is a Java function
http://onesearch.sun.com/search/ones...Selector%28%29
Are you using Java ?
If yes, I can do anything for you, sorry.
[color=blue]
> Once a selection is made, "Selection" gets replaced with the actual
> item.[/color]
Not too hard to do (I think) even if I don't understand what it wiil
do with the NewSelectionText on next click on this link ...
[color=blue]
> None of this actually matters, though - the problem is that at the time
> of unload()[/color]
*on*load I presume
[color=blue]
> the page is already rendered. This is easily seen using
> <body onload='alert("onload");'> - in FF, the dialog box is displayed
> with the page contents rendered, while in IE/Safari it's displayed over
> an empty page, and it's rendered after you click OK.[/color]
I see.
[color=blue][color=green][color=darkred]
>>>Currently I've "solved" this by hiding the containing div
>>>in the document, and showing it after making changes.[/color][/color][/color]
If you can't start the job before end of load
I do not see how to do other way
--
Stephane Moriaux et son [moins] vieux Mac