Hai all,
iam trying to use java script code in my jsp page.
i used a onclick event.while clicking on the button that wil goes to the javascript function(deleteRecord(name,subject)).
this deleterecord() wil post the url request.
my code is like this
-----------------
function deleteRecord(name,subject){
document.write("name received is:"+name);
f.method="post";
var url="http://localhost/myproject/DeleteRecord?";
var url1= "name="+name;
var url2="subject="+subject;
var URL=url+url1+url2;
f.action(URL);
f.submit();
}
my onclickevent code is'
<td width="20%" height="25" align="left" valign="middle"><input type="submit" name="delete" value="Delete" style="background-color:#ff0000;font-weight:bold;color:#ffffff;" onclick="deleteRecord(<%=rs.getString("name")%>,<%=rs.getString("subject")%>);" /></td>
---------------------------------------------
wil iam running my jsp page internet explorer is giving in variable subject (error:'divi' is invalid).divi is the value of the parameter name which iam passing to the function .
and mozilla firefox my script is not working
there is some syntax issues as wel as browser issues...and with url syntax
can any one help me...
Regards,
Divya
iam trying to use java script code in my jsp page.
i used a onclick event.while clicking on the button that wil goes to the javascript function(deleteRecord(name,subject)).
this deleterecord() wil post the url request.
my code is like this
-----------------
function deleteRecord(name,subject){
document.write("name received is:"+name);
f.method="post";
var url="http://localhost/myproject/DeleteRecord?";
var url1= "name="+name;
var url2="subject="+subject;
var URL=url+url1+url2;
f.action(URL);
f.submit();
}
my onclickevent code is'
<td width="20%" height="25" align="left" valign="middle"><input type="submit" name="delete" value="Delete" style="background-color:#ff0000;font-weight:bold;color:#ffffff;" onclick="deleteRecord(<%=rs.getString("name")%>,<%=rs.getString("subject")%>);" /></td>
---------------------------------------------
wil iam running my jsp page internet explorer is giving in variable subject (error:'divi' is invalid).divi is the value of the parameter name which iam passing to the function .
and mozilla firefox my script is not working
there is some syntax issues as wel as browser issues...and with url syntax
can any one help me...
Regards,
Divya
Comment