Results 1 to 5 of 5

Thread: Omni Slide & onclick events ?

  1. #1
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Omni Slide & onclick events ?

    http://www.dynamicdrive.com/dynamici...lide/index.htm

    [question] Is it possible when clicking on the link within the menu to have an onClick event happen?

    This is one of the links
    ["Finalize", "#application.root#expenses/approveExpenses.cfm?reason=approveExpenses&financeProcess=1&expenseContactID=0", "_blank"]

    Basically what I would like to do is submit the variables on the page when a link is selected as form variables not url variables.

    Any assistance is appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    The way I wrote this script, you would need to use the:

    javascript:void(javascript commands could go here)

    in place of a URL. But, that causes problems in some browsers. You could, after setting up all the links and having something there for the ones that you want to have events, set the property in your menu to:

    Code:
    design_mode:true,  //if true, generates a report of the script generated/intended styles and markup (as a design aid)
    You will then get a display of the styles and markup. For what you are doing, you could then copy just the markup and use that with whatever edits you like to include events for some or all of the links. Once that is done you would set the above property back to false (or just delete it) and set this one:

    Code:
    user_defined_markup:true, //if true, prevents script from generating markup for this menu
    The menu will then use your markup, not its own.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ??

    John:
    Thanks for the quick response, just to get it out there I am an ID10T when it comes to javascript, please don't roll your eyes to far in the back of your head while reading my next questions.

    I saw the markup come up and I could see where I would place my javascript
    onclick functions...but

    1.) I am confused as to where to put the markup that is returned?

    2.) the menu options are going to be dynamic, based queries being returned
    Example:
    <cfif variables.addExpenseContactIds GT 0>
    <cfloop query="getAddExpenseContacts">
    ["Add New - #LCASE(expenseAddUserName)#", "myExpenses_addNew.cfm?reason=newExpenses&expenseContactID=#addExpenseContactID#", "_blank"],
    </cfloop>
    </cfif>

    If I can have the links that display in the menu be like the markup returned that will be fine, I can loop and add variables as needed, however, little confused as to where I would put the below that is returned in the markup mode.

    <div id="menu1" onmouseover="movein(this);" onmouseout="moveout(this);"><div><table>
    <td class="heading" colspan="2">Expense - Go To ...</td><td id="menu1bar" rowspan="9"><br>O<br>p<br>t<br>i<br>o<br>n<br>s<br> </td></tr>
    <tr><td colspan="2"><a href="myExpenses_addNew.cfm?reason=newExpenses&expenseContactID=33746" target="_blank">&nbsp;&nbsp;&nbsp;&nbsp;Add New - FinanceUser</a></td></tr>

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Don't feel too bad. This was an idea I had for just these sort of situations. I don't think there are many, if any scripts that have this sort of flexibility as an option.

    You would put your markup right after your opening <body> tag. You must use the entire markup returned (for what you are doing, you can skip the styles). You can edit it however you like, including placing server side tokens in there as long as the page this is on will be processed by the server (usually requires the server extension of .php or .asp - whatever you re using).

    Once you have edited your custom markup and pasted it into your page, don't forget to turn off design_mode and turn on user_defined_markup, as mentioned before.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks

    John:

    Thanks, this will now work perfectly.

    The script is very slick and looks great on the the page.

    Thanks again,

    Kris

Bookmarks

Posting Permissions

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