what do you want to happen when someone clicks on the link?  Currently they
will be redirected to the PDF at the same time as your function tries to
run.  You probably want to change it to:

<a href="somePDF.pdf" onclick="someFunction(); return false" />

this way they won't get taken to that URL, and your function will run.
this is good if you're using the function to do some javascript that may
take them to that URL too.  those with javascript, the function does it's
job, and the return=false prevents the PDF from loading directly from the
link.  those without javascript will be taken directly to the PDF.


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                                 
                    Adrian Lynch                                                       
                                 
                    <[EMAIL PROTECTED]        To:     "'[EMAIL PROTECTED]'" <[EMAIL 
PROTECTED]>     
                    ubble.net>                cc:                                      
                                 
                                              Subject:     RE: [ cf-dev ] Data piping  
                                 
                    14/10/2003 16:36                                                   
                                 
                    Please respond to                                                  
                                 
                    dev                                                                
                                 
                                                                                       
                                 
                                                                                       
                                 



Too quick with my reply on this one. I have the call to the function in the
onclick of an <a> tag

This works...

<input type="button" name="myButton" value="Press Me"
onclick="someFunction();" />

but this doesn't...

<a href="somePDF.pdf" onclick="someFunction();" />

Any ideas?

Ade


-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 16:07
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] Data piping


Right then Peter, you've won yourself an all expenses paid trip to an
explanation as to why in the hell that works :OD

Oh, and thank you as well :O)

Ade

-- Code that works --

<script>
           function download() {
                     randomNumber = Math.random();
                     pipeImage.src = "http://somedomain.com/file.cfm?random
=" +
randomNumber;
           };
</script>

-----Original Message-----
From: Peter Harrison [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 15:56
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Data piping


Would a varying request string force the re-request?

...
blah.src = "page.cfm?random=" + nRandomNumer;
...

- Peter


-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: 14 October 2003 15:50
To: Cfug Dev List (E-mail)
Subject: [ cf-dev ] Data piping


I'm trying to run a cfm page using the src attribute of an image tag but
for
some reason, the change of source doesn't cause the cfm page to be run.

-- JavaScript Function --

function test() {
           pipeImage.src = "page.cfm";

           // also tried document.images["pipeImage"].src = "page.cfm";

           // and creating a new image object in place of the above
}

-- Image tag --
<img name="pipeImage" src="../gif/trans.gif" />

-- Events --
<a href="somewhere.cfm" onclick="test();" />
or
<input type="button" name="myButton" value="press me" onclick="test(); />


If I call the cfm page straight away from an image tag without any change
to
the src attribute I get the correct update in the DB, but changing it in a
function called via an event doesn't seem to want to work. Does anyone have
any pointers on how to get this to work.

I don't want any data passed back to the browser so setting of cookies and
then reading them as per some tutorials I've read isn't needed.

Thanks

Ade

------------------------------------------------------------------
Adrian Lynch
Web Application Developer
Thoughtbubble Ltd
Full Service Agency
------------------------------------------------------------------
<http://www.thoughtbubble.com>
Tel: +44 (0) 20 7387 8890 (ex. 23)
Fax: +44 (0) 20 7383 2220
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute,
or
retain this message. Please notify us on +44 (0)207 387 8890.


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]



--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to