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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:50:35+00:00 2026-05-22T17:50:35+00:00

I have a fairly simple web app built with Delphi (2009) Web Broker. I

  • 0

I have a fairly simple web app built with Delphi (2009) Web Broker. I am trying (and failing) to output Javascript to the page.

The javascript I need to output is in the body of the page in a <form> tag, and is as follows:

<script>DateInput('mydatefield', true, 'DD-MM-YYYY');</script>

This javascript should create a nice date input control (tested ok in a hand-crafted HTML page). The code in my Delphi app this is:

Response.Content := Response.Content + '<script>DateInput(''mydatefield'', true, ''DD-MM-YYYY'');</script>';

The Script tags are being removed from the final output.

As a test I added an HTML button with an onClick event set as follows:

Response.Content := Response.Content + '<input type="button" onClick="alert(''Hello World'')" Value="Hello World"/>';

and when the source of the page is inspected

alert(''Hello World'')

had become

alert(&#39;Hello World&#39;)

I wondered if this translation of the single quote from ‘ into &#39; might be causing my earlier script tag to be removed?

Any help/pointers appreciated, thanks.

* EDIT

I should point out that the Alert popup does work even with the &#39; characters.

* EDIT

I have tried to use JQuery scripts like $(document).ready( function() { etc }); and it’s working, so I guess the problem is not with WebBroker output. Thanks to all who took time to read/think.

  • 1 1 Answer
  • 3 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-22T17:50:36+00:00Added an answer on May 22, 2026 at 5:50 pm

    Try HTMLEncode unit HTTPApp:

    Response.Content := Response.Content + HTMLEncode('...');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fairly simple web app that uses cookies to store some information
I have a fairly simple android app, it gets protobuf data from a web
I have a fairly simple question about these 2 templating engines. I'm trying to
My web app, up until this point, has been fairly straight forward. I have
I have a fairly simple data audit web application written with ASP MVC which
My setup is fairly simple: I have a web front-end, back-end is spring-wired. I
At work we have a web app that we'll need to interface with another
I have a fairly simple HTML page with a link on it that calls
I have a fairly simple web application that gets a list of items from
We have a collapsible tree implementation in our web app. I need to add

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.