Greetings all...
javascript digest wrote:
> Subject: Popup, Frames and Opener
> From: "Don Woo" <dwoo@r...>
> Date: Wed, 6 Dec 2000 14:10:32 -0000
> X-Message-Number: 2
>
> I am trying to redirect a frame on my main ASP from a popup in Javascript
> (Netscape). But I keep getting the error
> "window.opener.parent.main has no properties"...
dw,
Looks like you're trying to access the wrong window. Suggestions:
1. Trying using *self* instead of *window*
2. Does *opener* indeed refer to the window in which *window.open()*
was called?
3. Per D. Flanagan: "This property is valid only for Window objects
that represent
top-level windows, not those that represent frames."
If you continue to have trouble, please post a link to the frameset
page in question.
Thanks.
>
> ----------------------------------------------------------------------
>
> Subject: Re: Help using a variable in the place of an address
> From: "Don Woo" <dwoo@r...>
> Date: Wed, 6 Dec 2000 15:27:12 -0000
> X-Message-Number: 3
>
> Instead of assigning a variable, assign to a session variable, then in the
> forms action refer to the session variable ("=<%Session("var")%>"), but then you must use
> VBScript instead of Javascript...
Sorry, but that last bit, while a commonly-held belief, is FALSE.
I happen to care little for VB or VBS, so nearly all my ASP work has
been done in
JScript, which is supported in MS PWS/IIS/ASP/WSH.
I don't mean to sound belligerent or anything like that, but it
really irritates me that
so many people believe ASP=VB when it's not true. Both VB(S) *and* JS
are supported by the
*default* IIS/PWS installation on all 32-bit Windows versions. (BTW, if
you install
ActivePerl on your server, you can do your ASP code using PerlScript.
And client Windows
systems which have ActivePerl installed can run clientside PerlScript in
MSIE 3.01 and later.
You should be able to do the same with Python once ActivePython is
released.) If you're
interested in exploring ASP using JScript, I'll be glad to point you to
some references on
it.
> and also server-side not client-side...
TRUE.
>
> ----------------------------------------------------------------------
>
> Subject: is it possible to get the value of multiple selected fields through javascript
> From: "Jacek Kaczocha" <jacek@w...>
> Date: Wed, 6 Dec 2000 18:13:09 -0000
> X-Message-Number: 4
>
> In the code below, I'd like to get the the value of multiple selected
> options. For instance, I select opt1 and opt2 and check() should display
> opt1 and opt2. Is it possible on the client?
> ...
jacek,
The answer is "Yes". Try looping through the Option elements, checking
the *selected* value
of each:
function reportAllOptions(selectObj)
{
var output="";
for(var i=0;i<selectObj.options.length;i++)
if(selectObj.options[i].selected)
output+="Option #"+(i+1)+":
"+selectObj.options[i].value+"\n";
alert(output);
}
(Test it yourself with this:
<form>
<select name="mySelect" multiple="multiple" size="5">
<option value="larry">Larry</option>
<option value="joe">Joe</option>
<option value="moe">Moe</option>
<option value="curly">Curly</option>
<option value="shemp">Shemp</option>
</select>
<br />
<input type="button" value="Click me."
onClick="reportAllOptions(this.form.mySelect);" />
</form>)
HTH!
--
--------------------------------
jon stephens <zontar@m...>
--------------------------------
voice: xxx.xxx.xxxx
voice mail: 650.416.3500, ext. 1472
--------------------------------
What's The Buzz? http://buzz.builder.com/
--------------------------------
____________NetZero Free Internet Access and Email_________
Download Now http://www.netzero.net/download/index.html
Request a CDROM 1-800-333-3633
___________________________________________________________