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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:54:49+00:00 2026-05-11T00:54:49+00:00

I have this little function function makewindows(){ child1 = window.open (about:blank); child1.document.write(<?php echo htmlspecialchars(json_encode($row2[‘ARTICLE_DESC’]),

  • 0

I have this little function

function makewindows(){ child1 = window.open ('about:blank'); child1.document.write('<?php echo htmlspecialchars(json_encode($row2['ARTICLE_DESC']), ENT_QUOTES); ?>'); child1.document.close();  } 

Which whatever I try, simply outputs the php code as the html source, and not the result of the php code. This was previously working fine, and I am not sure what I have changed to result in this behavior.

I have pasted all the code now. An error is generated by a link that calls updateByQuery, preventing makewindows from being parsed correctly..I think. I am not sure what is wrong with updateByQuery however:

function updateByQuery(layer, query) {    url = 'get_records.php?cmd=GetRecordSet&query='+query+'&sid='+Math.random();    update(layer, url); } 
  • 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. 2026-05-11T00:54:50+00:00Added an answer on May 11, 2026 at 12:54 am

    I assume you still have it in a file that is parsed by PHP, like the others already have said. Then it is probably something above this code snippet that confuses the php-parser so it don’t recognize the php-tag.

    To test that, try to output something else before this function, maybe just a comment or something.

    Also, use ‘var’ before client1, or else client1 will be in the global scope.

    update 1 Since you tried to insert a piece of php-code and it broke, then the problem is that the server don’t parse the file as it should.

    To test if the server really parses your .js files (its not the default setting I believe), create a new file: test.js

    <?php echo 'This is a test'; ?> 

    Open the test.js file in your browser and look at the page source. If it has the php tags your server don’t parse .js files.

    update 2 If the php works in .js files, try to rewrite the function like this (sorry I have not tested it because I don’t have access to a php-server right now)

    <?php     echo 'function makewindows(){var child1 = window.open (\'about:blank\'); ' . 'child1.document.write(\'' . htmlspecialchars(json_encode($row2['ARTICLE_DESC']), ENT_QUOTES) . '\');' . 'child1.document.close(); }';     ?> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Implement HTML5 and CSS3. All of it. That would be… May 11, 2026 at 12:54 pm
  • added an answer The error message says it cannot find the module Date::Parse… May 11, 2026 at 12:54 pm
  • added an answer UPDATE table SET status = 1 WHERE status = 2… May 11, 2026 at 12:54 pm

Related Questions

I have this little function function makewindows(){ child1 = window.open (about:blank); child1.document.write(<?php echo htmlspecialchars(json_encode($row2['ARTICLE_DESC']),
I have this little script to toggle a contact form when a button is
I've searched for this a little but I have not gotten a particularly straight
This is a little out there but I have a customer object coming back
I need a little help on this subject. I have a Web application written
I have this little function do connect to a MySQL database: function connectSugarCRM() {
It appear that SQL Server like most other products Random Function really is not
Ok this is a little complex. I am creating a plugin, and want to

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.