Solved

document.write removing "\" I need for directory structure

Posted on 2006-07-05
3
226 Views
Last Modified: 2012-05-05
Need to add the path audit in front of the below expression but when it writes out it always path\auditClascompletionAudit.jsp and not path\audit\ClasCompletionAudit.jsp.  Have tried various ways but still cant get past the "\" being removed

Original statement....
      document.write("<A HREF=\"ClasCompletionAudit.jsp?server_name=" + serverName + "\" >");

Change I made do add audit before ClasCompletionAudit.jsp...
      
document.write("<A HREF=\"audit\ClasCompletionAudit.jsp?server_name=" + serverName + "\" >");

0
Comment
Question by:TheVeee
  • 2
3 Comments
 
LVL 5

Author Comment

by:TheVeee
ID: 17044226
Figured this out finally, had to put two \\ together...
0
 
LVL 14

Accepted Solution

by:
dfu23 earned 250 total points
ID: 17045651
The backslash "\" is Java's (and most C syntaxed languages) escape character ...

\n - new line
\t - tab

And like you did:

\\ - escaping the escape character
0
 
LVL 5

Author Comment

by:TheVeee
ID: 17050365
Thanks dfu23 for the info!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lessBy10  challenge 15 95
Prevent Firefox page from going to the background when clicking a spreadsheet link 17 71
tomcat startup error 5 132
servlet example 17 59
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
No single Antivirus application (despite claims by manufacturers) will catch or protect you from all Virus / Malware or Spyware threats. That doesn't stop you from further protecting yourself however - and this article is to show you how.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question