I just wanted to expand on this; the example I gave uses an anchor to
trigger the style and visibility changes of the example div..  I want to
note that the anchor is not required.  It is only acting as a catalyst,
an object that triggers the javascript to run.

In a cfflush type of implementation, you could insert a block of
javascript code to do the same thing.  Since it would run as soon as the
browser sees it, you could place the block inline at the point where you
want it to execute:

<script language="javascript">
        myTestDiv.style.display='none';
</script>

Hope this clarifies some...

Seth

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On Behalf Of Seth Bienek
> Sent: Friday, June 13, 2003 11:58 AM
> To: [EMAIL PROTECTED]
> Subject: RE: <cfflush...<div
> 
> 
> Hi Philip,
> 
> I removed the OT in the subject because I think this is 
> on-topic for our group.
> 
> I'd suggest reading into DHTML (Dynamic HTML), basically, 
> modern browsers treat every element within a page as an 
> object, and depending on the type of object, different 
> methods for manipulating the object (style, visibility, 
> content, etc.) are available, via JavaScript, VBScript et al.
> 
> What you want to do isn't find a way to "run an anchor tag".  
> What you want to do is to find a way to manipulate the 
> content of your "loading" message, in much the way the anchor 
> tag you saw worked.  Have a look at the anchor tag's source; 
> if it calls a javascript, look at the javascript as well.
> 
> Here's some quick sample code to get you started, also.. 
> Maybe you can work with it to get it to do what you want.
> 
> <div id="myTestDiv">Page is loading...</div><br>
> 
> <!--- see how we reference the element by it's id? --->
> <a href="#" onmouseover="myTestDiv.innerHTML='<b>Page is 
> loading...<br></b>'">Make it bold</a><br> <a href="#" 
> onmouseover="myTestDiv.innerHTML='Page is 
> loading...<br>'">Make it light</a><br> <a href="#" 
> onmouseover="myTestDiv.style.display='none'">Make it 
> disappear</a><br> <a href="#" 
> onmouseover="myTestDiv.style.display='inline'">Make it 
> reappear</a><br>
> 
> Here's a good starting point for you: 
> http://msdn.microsoft.com/library/default.asp?url=/workshop/au
> thor/dhtml
> /reference/properties/innerhtml.asp
> 
> Oh, BTW, the biggest drawback to using DHTML is cross-browser 
> differences.  If you are coding for browser compatibility, 
> make sure you test your code in all target browsers.
> 
> Peace out,
> 
> Seth
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]] On Behalf Of phumes1
> > Sent: Thursday, June 13, 2002 11:23 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: OT...<cfflush...<div
> > 
> > 
> > 
> > This is still a continuation from a previous post .
> > 
> > I found a script that changes the text of the <div by
> > clicking on a <a 
> > href. Is there a way to automatically have the <a href run at 
> > the end of 
> > the <cfexecute process?
> > 
> > ...
> > 
> > <head>
> > <script language="JavaScript1.2">
> > function writetoLyr(name, message) {
> >      if (document.layers) {
> >          document.layers[name].document.close();
> >          document.layers[name].document.write(message);
> >          document.layers[name].document.close();
> >      } else {
> >          if (document.all) {
> >              eval("document.all." + name + ".innerHTML='" +
> > message + "'");
> >          } else {
> >              document.getElementById(name).innerHTML = message;
> >          }
> >      }
> > }
> > </script>
> > </head>
> > 
> > <div id="TestLayer">
> > <p align="center" style="Arial" size="+1"><font
> > color="#ffffff">Work in 
> > progress...</font></p>
> > </div>
> > 
> > <cfexecute ...
> >             outputfile="....
> >             timeOut="1000">
> > </cfexecute>
> > 
> > <cffile action="READ"
> >          file="....
> >          variable="results">
> > 
> > <table width="100%" cellpadding="6" cellspacing="0"
> > border="0"> <tr align="center">
> >     <td>
> >             <input type="button" value="Close" class="navlinks" 
> > onClick="location.href='blank.cfm'">
> >     </td>
> > </tr>
> > <tr align="center">
> >     <td>
> >             <table cellpadding="6" cellspacing="0" border="0">
> >                     <tr>
> >                             <td class="wdirlinks">
> >                                     
> > #replace(results,chr(10),"<br>","all")#
> >                             </td>
> >                     </tr>
> >             </table>
> >     </td>
> > </tr>
> > </table>
> > 
> > 
> > <center>
> > <a href="javascript:;" onClick="writetoLyr('TestLayer', '<p
> > align=center 
> > style=Arial size=+1><font color=white>Done.</font></p>')">Text</a>
> > </center>
> > 
> > 
> > --------------------------------------------------------------
> > -----------
> > This email server is running an evaluation copy of the
> > MailShield anti- spam software. Please contact your email 
> > administrator if you have any questions about this message. 
> > MailShield product info: www.mailshield.com
> > 
> > -----------------------------------------------
> > To post, send email to [EMAIL PROTECTED]
> > To subscribe / unsubscribe: http://www.dfwcfug.org
> > 
> 
> 
> --------------------------------------------------------------
> -----------
> This email server is running an evaluation copy of the 
> MailShield anti- spam software. Please contact your email 
> administrator if you have any questions about this message. 
> MailShield product info: www.mailshield.com
> 
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
> 


-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to