Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8046647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:51:19+00:00 2026-06-05T05:51:19+00:00

I have this function below as a string. How would I convert it back

  • 0

I have this function below as a string. How would I convert it back into a function? I am pulling event handlers from JQuery events and I want to store them as string then convert them back because they will be saved in mySQL

function () {

    if (!GActiveClick) {
        return;
    }
    SaveProduct();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:51:21+00:00Added an answer on June 5, 2026 at 5:51 am
    var func = new Function(theFunctionString);
    func();
    

    MDN:

    new Function ([arg1[, arg2[, … argN]],] functionBody)

    Parameters

    arg1, arg2, … argN
    Names to be used by the function as formal argument names. Each must be a string that corresponds to a valid JavaScript identifier or a list of such strings separated with a comma; for example “x”, “theValue”, or “a,b”.

    functionBody
    A string containing the JavaScript statements comprising the function definition.


    Update:

    All this a very bad practice!
    You should have a generic function that get parameters that build what you want. The only thing that change are the parameters. Store those parameters in the DB you have.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function which cuts a string into a number of characters without
I have the function below which takes a string from the datepicker and turns
I have this function below and I need to append its result inside a
I have the below prog Object.prototype.inherit = function(baseConstructor) { this.prototype = (baseConstructor.prototype); this.prototype.constructor =
I have this function call passed as a string: var dcall = tumbsNav(1); Is
I have this function... private string dateConvert(string datDate) { System.Globalization.CultureInfo cultEnGb = new System.Globalization.CultureInfo(en-GB);
I have some C++ code (segment seen below), I need to convert this to
I have this function, I need to store some values in an array, I
I have this function in my PHP : setcookie(UserPusser, $user, time() + 604800, /pusser/beta/);
I have this function (defun mention-notify (match-type nickuserhost msg) (interactive) (if (and (eq match-type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.