Click here to Skip to main content
15,920,896 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Javascript validate the master and content page Pin
MalarGayu9-Nov-11 15:33
MalarGayu9-Nov-11 15:33 
QuestionWhere is the data behind the page? Pin
LeonardoDaga22-Oct-11 0:37
LeonardoDaga22-Oct-11 0:37 
AnswerRe: Where is the data behind the page? Pin
Richard MacCutchan22-Oct-11 1:48
mveRichard MacCutchan22-Oct-11 1:48 
GeneralRe: Where is the data behind the page? Pin
LeonardoDaga22-Oct-11 6:12
LeonardoDaga22-Oct-11 6:12 
GeneralRe: Where is the data behind the page? Pin
Richard MacCutchan22-Oct-11 6:26
mveRichard MacCutchan22-Oct-11 6:26 
GeneralRe: Where is the data behind the page? Pin
DaveAuld22-Oct-11 8:21
professionalDaveAuld22-Oct-11 8:21 
GeneralRe: Where is the data behind the page? Pin
Richard MacCutchan22-Oct-11 21:51
mveRichard MacCutchan22-Oct-11 21:51 
GeneralRe: Where is the data behind the page? Pin
DaveAuld22-Oct-11 21:59
professionalDaveAuld22-Oct-11 21:59 
GeneralRe: Where is the data behind the page? Pin
Richard MacCutchan23-Oct-11 2:17
mveRichard MacCutchan23-Oct-11 2:17 
GeneralRe: Where is the data behind the page? Pin
DaveAuld24-Oct-11 4:50
professionalDaveAuld24-Oct-11 4:50 
GeneralRe: Where is the data behind the page? Pin
Richard MacCutchan24-Oct-11 5:16
mveRichard MacCutchan24-Oct-11 5:16 
GeneralRe: Where is the data behind the page? Pin
AspDotNetDev23-Oct-11 8:24
protectorAspDotNetDev23-Oct-11 8:24 
GeneralRe: Where is the data behind the page? Pin
DaveAuld23-Oct-11 8:31
professionalDaveAuld23-Oct-11 8:31 
GeneralRe: Where is the data behind the page? Pin
DaveAuld24-Oct-11 4:51
professionalDaveAuld24-Oct-11 4:51 
GeneralRe: Where is the data behind the page? Pin
LeonardoDaga31-Oct-11 0:36
LeonardoDaga31-Oct-11 0:36 
QuestionUncaught SyntaxError: Unexpected token ILLEGAL Pin
Vimalsoft(Pty) Ltd19-Oct-11 22:02
professionalVimalsoft(Pty) Ltd19-Oct-11 22:02 
Good Day All

in my page i have a hyperlink button in a gridview defined like this

JavaScript
<a href="#" onclick="<%#  String.Format("return showComment('{0}','{1}')", Replace(Eval("Field1").ToString(),Chr(13),"<BR>"), Replace(Eval("Field2").ToString(),Chr(13),"<BR>") ) %>">

                      <img src="../../Imgs/comment2.png" />
                      </a>


and the Function showComment is defined like this



JavaScript
function showComment(CommentPend,CommentCancel)
{
    $("#btnclose").unbind();
    $("#divPendComment").center();
    $("#divPendComment").fadeIn('slow');

    $("#txtcomment").val(CommentPend.toString().replace(/^[a-z0-9 ]$/i, ''));

    $("#txtcommentCancel").val(CommentCancel.toString().replace(/^[a-z0-9 ]$/i, ''));

    $("#btnclose").click(function (e)
     {

         $("#divPendComment").fadeOut('slow');
         e.preventDefault();

    });
    return false;
}


now as you can see i am trying to get rid of the special characters like the carriage returns but still i get a a javascript error when this link is clicked

Uncaught SyntaxError: Unexpected token ILLEGAL

thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com

AnswerRe: Uncaught SyntaxError: Unexpected token ILLEGAL Pin
Richard Andrew x6422-Oct-11 12:18
professionalRichard Andrew x6422-Oct-11 12:18 
GeneralRe: Uncaught SyntaxError: Unexpected token ILLEGAL Pin
Vimalsoft(Pty) Ltd23-Oct-11 1:44
professionalVimalsoft(Pty) Ltd23-Oct-11 1:44 
AnswerRe: Uncaught SyntaxError: Unexpected token ILLEGAL Pin
jsc4228-Oct-11 1:51
professionaljsc4228-Oct-11 1:51 
QuestionHow to select all the text in a Textbox in JQuery Pin
Vimalsoft(Pty) Ltd19-Oct-11 2:11
professionalVimalsoft(Pty) Ltd19-Oct-11 2:11 
AnswerRe: How to select all the text in a Textbox in JQuery Pin
Manfred Rudolf Bihy19-Oct-11 2:50
professionalManfred Rudolf Bihy19-Oct-11 2:50 
AnswerRe: How to select all the text in a Textbox in JQuery Pin
Dennis E White19-Oct-11 7:07
professionalDennis E White19-Oct-11 7:07 
GeneralRe: How to select all the text in a Textbox in JQuery Pin
Vimalsoft(Pty) Ltd19-Oct-11 21:45
professionalVimalsoft(Pty) Ltd19-Oct-11 21:45 
Questionchanging size of web page Pin
Member 832305616-Oct-11 3:16
Member 832305616-Oct-11 3:16 
AnswerRe: changing size of web page Pin
AspDotNetDev16-Oct-11 10:18
protectorAspDotNetDev16-Oct-11 10:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.