Terren wrote:
Yes, you are right but I had to use href because I have a
table full of these. Basically it is a table with abbreviated
descriptions that "link" to the full description in the popup
window. So it wouldn't look to good if I had 100's of buttons
and I don't know how readable it would be as well because the
abbreviation is 50 characters long...
Well...button is but one possibility. A small graphic can be just as useful.
Nevertheless, there is another approach, and it's probably a better one. You
can *use* the HREF attribute:
<a href="desc.asp?msg="<%=tempdesc%>"
target="win<%=rownum%>"
onclick="window.open('','win<%=rownum%>',...)">
The key here is matching the TARGET name to a window name. No need to pass
the URL via script, and if scripting should err, it will *still* open in a
new window.
Incidentally, there is no need to list the window attributes you do not
want, nor to use yes/no. This is sufficient:
window.open(...,...,"width=600,height=600,left=300 ,top=300,scrollbars")
A little reading helps:
"When the sFeatures parameter is specified, the features that
are not defined in the parameter are disabled. Therefore, when
using the sFeatures parameter, it is necessary to enable all
the features that are to be included in the new window. If the
sFeatures parameter is not specified, the window features
maintain their default values. In addition to enabling a
feature by setting it to a specific value, simply listing the
feature name also enables that feature for the new window."
http://msdn.microsoft.com/workshop/a...ods/open_0.asp
One last thing -- you seem to be passing the entire description in your
querystring. What happens if that description includes line breaks, quotes,
or other characters that might break your URL?
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.