Click to See Complete Forum and Search --> : reload vs refresh


cipi
07-15-2003, 09:12 AM
Hy,

Can you tell me what is the equivalent code for :

opener.parent.mainFrame.location.reload();

using the refresh method.

I use this code to reload a frame from a pop up using this code:

<form>
<input type="button" onClick="opener.parent.mainFrame.location.reload(); window.close();" value="Close and reload">
</form>

opener.parent.mainFrame.location.refresh(); does not work

Thanks

pyro
07-15-2003, 09:21 AM
There isn't an equivalent. refresh() is used to make newly installed plugins available, not reload the page. Just out of curiosity, what's wrong with reload()?

cipi
07-15-2003, 09:28 AM
I made a mistake.

In the page there are some inputs, dropdown lists etc.
If in one of the dropdown list cannot be found the value you need you can click a link that opens a pop up and let's you insert the value you want.
Then I have to reload/refresh the page from the pop-up in order to see the new value.

If I have some fields that were completed before the pop-up then on reload the values will reset.

Now I see that on refresh they do the same(reset). So the question has no solution for me now.

Sorry for the mistake.
Thanks anyway. Maybe you know another solution.

pyro
07-15-2003, 09:34 AM
Can't you just run a function to change the values of the dropdown?

cipi
07-15-2003, 09:38 AM
Unfortunately Javascript is for me on the SF domain. I know just how to modify a javascript and play a little with it so if you can give some clues where to begin would be great.

Thanks

pyro
07-15-2003, 09:47 AM
This will add an option in IE:

<html>
<head>

<script type="text/javascript">
x = 0;
function insertTime() {
if (x == 0) {
anOption = document.createElement("option")
document.myform.time.options.add(anOption)
anOption.innerText = "Four";
anOption.Value = "four";
x = 1;
}
}
</script>

</head>
<body>

<form name="myform">
<select name="time" size="1">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
<input type="button" name="now" value="Insert" onclick="insertTime();">
</form>

</body>
</html>