or this:
onClick='MarkToDelete(269,
Main Topics
Browse All TopicsHi. I keep getting a syntax error on this line of my javascript and I do not understand what the trouble is with it:
onClick='MarkToDelete(269,
Where 'MarkToDelete' is a function I have defined to take 2 parameters. I've tried putting "" around MarkToDelete instead of ' but that doesn't work either. If I do not put '' around testt.doc then the javascript does not error until it gets to function 'MarkToDelete' and it tells me that 'testt.doc' is undefined. Both 269 and testt.doc are brought into Javascript using VB calls to a SQL Database.
Also, the return false; is NOT performing properly. Instead its pulling up another page. I dont know if that is also caused from the javascript error or not :(
I'd really apprectiate any suggestions!
Thank you.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Thanks so much for the quick response. The first comment you offered caused it to give me an ASP error 'expected end of line' and the second on returns invalid character. Any other thoughts??
It will take the 269 argument twice. So the problem isn't with 2 parameters being passed.. its' something with that filename. However, even that still causes return false to not act right. I'm not even processing with it in MarkToDelete. All I want to use it for is a popup to say are you sure you want to delete testt.doc.
I never posted in here.. so I hope this code isn't horrible to read! :)
Set objComp = Session("DataObj").GetReco
If Not objComp.EOF Then blnHasFiles = true
If blnHasFiles Then
While Not objComp.EOF
Response.Write "<td><input type='image'
src='images/SmallRedX.gif'
onClick='MarkToDelete(" & objComp("TransactID") & ", '"
& objComp("ServerFileName") & "'); return
false';></input> &nbs
ObjComp.MoveNext
WEnd
Else
Response.Write"<tr><td colspan='5' align='center'
class='nsWHead' bgcolor='#770000'><i>No Files Associated
With This Quote</i></td></tr>"
End if
objComp.Close
Set objComp = Nothing
Here is the javascript function:
function MarkToDelete(sQuoteID, sFileName)
{
if(!confirm("Are you sure you want to delete" + sFileName + "?"))
{
return false;
} // end if
window.open("QuoteDeleteFi
} // end MarkToDelete()
Business Accounts
Answer for Membership
by: knightEknightPosted on 2002-11-04 at 06:03:30ID: 7405694
quotes .... try this:
"testt.doc"); return false';
onClick='MarkToDelete(269,