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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:39:46+00:00 2026-05-28T07:39:46+00:00

Is it possible to pop up window from a json line. Example, this link

  • 0

Is it possible to pop up window from a json line.

Example, this link works fine:

$json['msg'] = 'Welcome. Please, <a href="http://mylink/?chat_session='.$rows['id'].'">click here</a>!';

But when I tried to create a pop up for it, it says errors T string parsing, things like that.

For my pop up I tried using:

<script language="javascript" type="text/javascript"><!--function mbetter(url) {
newwindow=window.open(url,'name','height=600,width=550');
if (window.focus) {newwindow.focus()}
return false;}// --></script>

and for link

$json['msg'] = 'Welcome. Please, <a href="#" onClick="return mbetter('http://mylink/?chat_session='.$rows['id'].'')">click here</a>!';

What could be causing this issue?

  • 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-28T07:39:47+00:00Added an answer on May 28, 2026 at 7:39 am

    This is a problem with escaping a string.

    $json['msg'] = 'Welcome. Please, <a href="#" onClick="return mbetter('http://mylink/?chat_session='.$rows['id'].'')">click here</a>!';
    

    Should be:

    $json['msg'] = 'Welcome. Please, <a href="#" onClick="return mbetter(\'http://mylink/?chat_session='.$rows['id'].'\')">click here</a>!';
    

    Notice how I have escaped the single quotes in your JavaScript with backslashes?

    This is described in the PHP manual on the Strings page:

    To specify a literal single quote, escape it with a backslash (). To
    specify a literal backslash, double it (\). All other instances of
    backslash will be treated as a literal backslash: this means that the
    other escape sequences you might be used to, such as \r or \n, will be
    output literally as specified rather than having any special meaning.

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

Sidebar

Related Questions

I would like to create a link to a pop up window from a
I need to open window pop-up from Silverlight Out-of-Browser application. I've added parameter <param
Just wondering will it be possible to passing a value from one page (window
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's
What is the best way(s) to keep the User from getting confused by this
I have a html page with a button pop-up. If I click on this
In an HTML page: <a href=/files/getfile.php?name=abc.zip>file download</a> in PHP script(getfile.php): if('notlogged') { echo 'please,
Is it possible to close a tab via JavaScript? For example, I have redirected

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.