Jump to content

Search the Community

Showing results for tags 'jquery object'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Ok, I really should know this by now and I'm in a time crunch so I thought I might just ask to see if someone can point me in the right direction. So I build a table class in jquery. What I want now is to be able to handle custom functions that come about for the individuals tables I create. What I do now is have a customChange function and just use switch() to find the keyword and then run the function. But this is mighty inefficient and I have to constantly go in to the object and add the single custom instance. So for example, say on one table when the Qty is changed I want the Cost column to autocalculate and trigger a warning if the cost is above a certain value. I load up my javascript like this... $this->ajax->loadScript(" $(function() { var tbl = new Tablev2('beta'); tbl.init({'mysqlTable':'msr_data'}); tbl.ajaxDD('tid',{'text':'abbr','tbl':'budget_cats','locked':true}); tbl.ajaxDD('mid',{'text':'description','values':'mid','tbl':'modules','width':400,'numChars':2,'locked':true}); tbl.ajaxDD('sid',{'text':'description','values':'old_pav_sid','tbl':'systems','width':400,'numChars':2,'locked':true}); tbl.ajaxDD('manufacturer',{'text':'manufacturer','tbl':'msr_data','width':200,'numChars':1}); tbl.ajaxDD('line_description',{'text':'line_description','tbl':'msr_data','width':600,'numChars':2}); tbl.customChangeEvent('sid','getBudget'); tbl.customChangeEvent('per_unit_cost','calculateCost'); tbl.loadCustomMysql('tid',{'tbl':'budget_cats','matchField':'abbr','returnField':'bid','int':1}); tbl.loadCustomMysql('sid',{'tbl':'systems','matchField':'old_pav_sid','returnField':'sid','int':1}); }); "); How can I type up the function within the $this->ajax->loadScript function so I do not have to actually manipulate the object but still use the variables within the object? The way I do it now is through the tbl.customChangeEvent() and then I just write the function in the class itself. I want to be able to write the function on the script that is creating the table. Any help will be greatly appreciated. Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.