I want to execute a function on click

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default I want to execute a function on click

    I want to make a link execute a function I made, instead of going to a
    different page. Has anyone done anything like this? I've looked in the forums
    but theres almost no information on functions.

    My attempt. It executes the function on page loadup, not when it's clicked.

    <a href='<Cfoutput>#session.myFunctions.Deletestory(I D)#</Cfoutput>'>
    Delete Story
    </a>

    Any help would be greatly appreciated.

    J?J Guest

  2. Similar Questions and Discussions

    1. Crash Acrobat 8 Mac with AVDocClose() from task button execute function
      Dear All, Acrobat 8 Mac crashes (on Intel Mac, OS X 10.4) when some document is closed with AVDocClose() which in its turn is invoked from the...
    2. execute a Javascript function
      I have a Submit form with some form objects that turn off/on through checkboxes using onClick. The same form is used for editing submissions, and...
    3. #25990 [Opn->Bgs]: ob_get_clean () does not execute a callback function registered in ob_start ()
      ID: 25990 Updated by: helly@php.net Reported By: MDonatas at centras dot lt -Status: Open +Status: ...
    4. #25990 [NEW]: ob_get_clean () does not execute a callback function registered in ob_start ()
      From: MDonatas at centras dot lt Operating system: Windows XP PHP version: 4.3.3 PHP Bug Type: Output Control Bug...
    5. VB-Script Execute function!
      Ah! "Stefan Hellberg" <stefanhellberg@hotmail.com> wrote in message news:07cc01c33d93$f274e5e0$a501280a@phx.gbl...
  3. #2

    Default Re: I want to execute a function on click

    ColdFusion is a 'Server-Side' mark up language. So to get it to do anything
    once your page has hit the browser you need to send a request back to the
    Application server. So to get this sort of functionality you would need to use
    some 'Client-Side' language like JavaScript to load a page containing a call to
    your function.

    Stressed_Simon Guest

  4. #3

    Default Re: I want to execute a function on click

    so i have to go to a different page, huh? Oh well.....
    J?J Guest

  5. #4

    Default Re: I want to execute a function on click

    Create a javascript function on the page and do a simple postback ie function
    postback(){ document.nameofyourform.action = 'thenameofyourpage.cfm';
    document.nameofyourform.submit(); form1.fieldyouwantfocuson.focus(); }

    StokeyTCI Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139