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

  • Home
  • SEARCH
  • 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 524899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:36:57+00:00 2026-05-13T08:36:57+00:00

The Question: Is there a way that I can pass a JavaScript function into

  • 0

The Question:

Is there a way that I can pass a JavaScript function into a page (from a database) to be run?

Background info

I have developed a metadata driven asp.net mvc web site (basically I change data in the db, and the pages get generated on the fly).

Unfortunately I have one page that has some routing requirements (i.e. if you choose option 1, then hide item x)

I could solve this by having a custom page, but it would be nice if I could come up with a more robust solution.

So what I am thinking is that I can attach an onchange event handler (based on a metadata value), and then somehow have some code that is executed based on that onchange event.

  • 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-05-13T08:36:57+00:00Added an answer on May 13, 2026 at 8:36 am

    You can have server-side code render static javascript yes, but you can’t change the javascript when on the client due to a change in requirements; you have to render JS code that’s dynamic enough to handle all the interactions you may need to do. By server-side code, that means any code as well as any external resources (ie. database). Though, I’m not sure storing static JS code in the DB is buying you anything more than you could already have by storing the JS in a file, and having JS components smart enough to have these different interactions within that file…

    So yes server-side storage can render out static JavaScript, but JS can’t change from server-side code dynamically, unless your JS code call a web service on the server side.

    Make sense?

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

Sidebar

Ask A Question

Stats

  • Questions 296k
  • Answers 296k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You have to realize that it's a completely different model… May 13, 2026 at 7:06 pm
  • Editorial Team
    Editorial Team added an answer Steps you will do. Start visual studio 2005 and create… May 13, 2026 at 7:06 pm
  • Editorial Team
    Editorial Team added an answer I'm assuming you've seen the online tools that are available… May 13, 2026 at 7:06 pm

Related Questions

Is there a way that I can pass in a reference to an object,
I have come to something of a crossroads. I recently wrote a 10,000 line
If I have a vector of pairs: std::vector<std::pair<int, int> > vec; Is there and
I have a file that may be in a different place on each user's
I have a class that has a dozen or so properties that represent various

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.