[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Syntax error problem

Posted on 2004-11-18
4
Medium Priority
?
240 Views
Last Modified: 2006-11-17
Am I sending the arguements correctly in document.showcontext(\""+strPath+"\",\""+true+"\");? strPath is a variable that I declare above this....I don't know why, My function is not working.

var innerHTML = "<div style=\"padding-top:2px;padding-bottom:2px;\" onMouseOver=\"this.style.background='#cccccc'\" onMouseOut=\"this.style.background=''\">"
                                                +"<a onClick=\"parent.oPopup.hide();document.showContext(\""+strPath+"\",\""+true+"\");\" style=\"cursor:hand;text-decoration: none;\">"
                                                      +"<nobr>"
                                                            +"<b>Open all links in tabs</b>"
                                                      +"</nobr>"
                                                +"</a>"
                                          +"</div>"
                                          +"<center>----------------------</center>"
                                          +sList;
                  tooltip(innerHTML,NavigateTo,OpenFavBarFolder,ShowContext);
0
Comment
Question by:JavascriptBeginner
  • 2
4 Comments
 
LVL 33

Accepted Solution

by:
knightEknight earned 200 total points
ID: 12618789
var innerHTML = '<div style="padding-top:2px;padding-bottom:2px;" onMouseOver="this.style.background=\"#cccccc\"" onMouseOut="this.style.background=\"\"">'
                                        +'<a onClick="parent.oPopup.hide();document.showContext(\"'+strPath+'\",\"'+true+'\");return false;" style="cursor:hand;text-decoration:none;">'
                                             +'<nobr>'
                                                  +'<b>Open all links in tabs</b>'
                                             +'</nobr>'
                                        +'</a>'
                                   +'</div>'
                                   +'<center>----------------------</center>'
                                   +sList;
   
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 12618801
if that doesn't work try:

var innerHTML = '<div style="padding-top:2px;padding-bottom:2px;" onMouseOver="this.style.background=\\"#cccccc\\"" onMouseOut="this.style.background=\\"\\"">'
                                        +'<a onClick="parent.oPopup.hide();document.showContext(\\"'+strPath+'\\",\\"'+true+'\\");return false;" style="cursor:hand;text-decoration:none;">'
                                             +'<nobr>'
                                                  +'<b>Open all links in tabs</b>'
                                             +'</nobr>'
                                        +'</a>'
                                   +'</div>'
                                   +'<center>----------------------</center>'
                                   +sList;
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12619623
This version worked in my test:


var innerHTML = "<div style=\"padding-top:2px;padding-bottom:2px;\" onMouseOver=\"this.style.background='#cccccc'\" onMouseOut=\"this.style.background=''\">"
                                        +"<a onClick=\"parent.oPopup.hide();document.showContext('"+strPath+"','"+true+"');\" style=\"cursor:hand;text-decoration: none;\">"
                                             +"<nobr>"
                                                  +"<b>Open all links in tabs</b>"
                                             +"</nobr>"
                                        +"</a>"
                                   +"</div>"
                                   +"<center>----------------------</center>"
                                   +sList;



0
 

Author Comment

by:JavascriptBeginner
ID: 12619924
All three worked for me. Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

830 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