Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 23rd, 2004, 05:51 PM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default quotation mark problems...

I dont think this is a pro topic but no one is answering on the regular board so I am wondering if anyone here can help...

This maybe simple but for some reason I am having problems with all the quotation marks...I need to put this command into a string variable - to be executed later on but I am having problems any suggestions or tips, here is the code:

mm_menu_womens_0.addMenuItem(mm_menu_womens_0_3,"l ocation='categoryind.asp?categoryid=3'");

I want this piece of code to go into the string rootmenulist...as I loop through the list I will keep on adding on commands to this string and then execute it later....

elladi


 
Old December 24th, 2004, 08:06 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi elladi,

If you're inside a server side ASP string, and need to send a double quote to the JavaScript string, then you should double your double quotes, like this:
Code:
Dim myString
myString = "var myVar = ""Hello"";"
Response.Write(myString)
This will end up as
Code:
var MyVar = "Hello";
in the resulting HTML / Javascript.

I don't think you need to execute your code; if you write it out at the right location inside a client side JavaScript block using the server side Response.Write statement, your code will run automatically....:
Code:
<%
Dim myString
myString = "Bla bla bla, your menu code goes here"
%>
<html>
<head>
  <script type="text/javascript">
    <%= myString %>
  </script>
<head>
... rest of the page goes here
Does this help?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Freak On A Leash by KoRn (Track 3 from the album: Follow The Leader) What's This?
 
Old December 26th, 2004, 10:34 PM
Authorized User
 
Join Date: Jul 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks - its works perfectly now....

elladi






Similar Threads
Thread Thread Starter Forum Replies Last Post
problem unclosed quotation mark. HelpHelp waiwaisan VB Databases Basics 1 January 4th, 2007 05:29 AM
Quotation NEO1976 XML 5 July 19th, 2006 10:00 AM
display quotation mark in ASP angelran Classic ASP Basics 2 October 31st, 2005 08:03 AM
please help to develop this quotation prog mjuliao Access 18 August 29th, 2005 10:28 PM
str_replace for quotation mark starsol Beginning PHP 4 August 21st, 2003 11:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.