[thelist] JavaScript: style.display

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Wed Nov 30 02:35:28 CST 2005


A few questions:

1)  If you're doing this after the form posts back to the server, why do
you need to use Javascript at all?  Why not just hide or show it with
server-side code?

2)  Why do you have "javascript:" in the first line of your script?

Regards,

Peter

-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Casey

Thanks in advance for your help.  Here's what we're trying to do:

In a parent window the user is presented large amounts of data.  In fact

it's so much data that not all of it is visible at once, and to see
pieces 
of it at a time he must click on a various toggle switches.  These
switches 
are an <a href javascript...> link which simply makes a <tr> visible or
not 
visible.

When one of the <tr>'s is visible, he is given a link which may be used
to 
update the data in that particular section. Clicking on the link opens a

new, small window.  When he clicks on "Save" a series of events happen:

1) The new data is saved.  No problem.
2) The current, small window is closed.  No problem.
3) The parent window is refreshed.  No problem.
4) The <tr> that was visible before the refresh must also be visible
after. 
PROBLEM.

>From the new, small window, here's how I'm trying to do it:

sql="UPDATE....."
<script language="JavaScript">
   javascript:window.close();
   opener.document.getElementById('contact_location').style.display = 
'inline';
   window.opener.location.reload();
</script>

Again, everything works fine except for making 'contact_location'
visible 
again.  Any hints?

TIA,

Casey

P.S. The app is classic ASP, but I think that won't matter as this is
all a 
clientside issue.






More information about the thelist mailing list