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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:29:03+00:00 2026-05-26T08:29:03+00:00

I have a web application where I am dynamically creating a url. The url

  • 0

I have a web application where I am dynamically creating a url. The url has a parameter and I must pass a double quote. I have tried this all different ways but it is still not working. Anybody have any ideas?

To create the URL:

searchSurveyDetail.setSurveyFormURL(surveyDetail.getSurveyFormURL()+"#search="+ "\"" + searchValue + "\"");  

on the Page:

onClick="window.open('${surveyDetail.surveyInstructionsURL}')"

The result:

onClick="window.open('http://www.mytest.com/survey1.pdf#search="company"')"
  • 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-26T08:29:03+00:00Added an answer on May 26, 2026 at 8:29 am

    The short answer is you need to double escape the double quotes. So you need:

    searchSurveyDetail.setSurveyFormURL(surveyDetail.getSurveyFormURL()+"#search="+ "\\\"" + searchValue + "\\\"");
    

    which produces:

    onClick="window.open('http://www.mytest.com/survey1.pdf#search=\"company\"')"
    

    which will escape the quotes properly.

    Couple of things to keep in mind:

    • This doesn’t take care of double quotes in the search term itself. Make sure you escape that.
    • I’m not sure why you want to wrap the search term in double quotes. For a typical search url, you’ll want a query string like: search=term not search="term" because you’ll just end up stripping the quotes later. But maybe you need that for some reason.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that dynamically loads assemblies based on database configuration entries
I have web application written in java using Eclipse. It has just one servlet
I have a web application that dynamically creates a web page using usercontrols. Within
I have a web application which has 2 different versions deployed. 1 is an
I have a MVC 3 Razor web application that needs to allow creating and
I have an iPhone web application that creates a meta viewport tag dynamically, using
I have a web application where i want my users to dynamically create a
I'm currently developing a web application using Struts2 framework. This application requires to dynamically
I'm currently working on a Java web application, and have dynamically generated input boxes
I have a web application that uses jQuery to dynamically create an silverlight object.

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.