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 6774833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:50:05+00:00 2026-05-26T15:50:05+00:00

I am having trouble accessing a Javascript function from my code behind file. I

  • 0

I am having trouble accessing a Javascript function from my code behind file. I need to do this as I am using the GoogleMaps JS API to add markers to a map based on addresses retrieved from my database. I have a function called AddMarker that takes in the address as a parameter, so I need to be able to call that from my code behind file in the page_load function.

To simplify the question, how I can I call this javascript function to display an alert with a string passed from my code behind file?:

function hello(message)
{
alert(message)
}

Thanks in advance!

P.S Either vb or c# will do 🙂

  • 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-26T15:50:06+00:00Added an answer on May 26, 2026 at 3:50 pm

    You may consider this a hack but you could always put your message in an html element like:

    <p id='message' style='display: none;'>Your Message</p>
    

    Then in your javascript:

    function hello()
    {
        var m = document.getElementById('message').innerHTML;
        alert(m);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm converting some javascript to coffeescript, and I'm having trouble accessing a function I've
For some reason I'm having trouble accessing the fopen() function from inside a class
I'm having trouble accessing the review_history using the getInfoFor method, example code below :
I am having some trouble accessing a stateful session bean (SFSB) from an application
I'm having trouble accessing a dataset. I've pulled data from an Access database (successfully
I'm using Silo with HDF5, and I'm having trouble accessing some of the metadata
I am having trouble accessing the id from a hash: @categories = Category.includes(:discussions) The
I'm having trouble accessing the fields of a scala object from java. Scala: object
Hello all having some trouble accessing elements from a returned JSON from Twitter. I'm
I'm having some trouble accessing the data attributes of a dynamically(ajax) loaded file. For

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.