Click here to Skip to main content
15,795,793 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys,

javascript is not working on bootstrap,

my code:

<script type="text/javascript" language="javascript">
                             function ConfirmOnDelete(INVCODE) {
                                 if (confirm("Are you sure you want to Delete?") == true) {
                                     window.location = "del.aspx?INVCODE=" + INVCODE +"&DOIF=" + 1;
                                     return true;
                                     return false;

its not redirecting me to del.aspx page, JUST is working, other options are not window.location.href, etc.

Plzzz suggest me, what to do.

Best Regards,

1 solution

Refer - Window.location.href () and () methods in JavaScript[^].
window.location.href is not a method, it's a property that will tell you the current URL location of the browser. Setting the property to something different will redirect the page. is a method that you can pass a URL to that you want to open in a new window. For example:

window.location.href example:
window.location.href = ''; //Will take you to Google. example:
JavaScript''); //This will open Google in a new window.

Additional Information: can be passed additional parameters. See: tutorial[^]
Share this answer
abdul subhan mohammed 18-Jan-14 0:20am    
<script type="text/javascript" language="javascript">
function ConfirmOnDelete(ORDCODE) {
if (confirm("Are you SURE you want to Delete") == true) {"del.aspx?ORDCODE=" + ORDCODE + "&DOIF=" + 1);
return true;
else {
confirm("Info NOT yet Deleted!");
return false;

function updateCo(CONAME, COID) {
window.location.href = "updateCo.aspx?CONAME=" + CONAME + "&COID=" + COID;

still this code is not working....
Then there is an issue with the value of ORDCODE. Debug and check what is the value? I guess it is null or undefined.
abdul subhan mohammed 21-Jan-14 9:20am    
Hi Tadit Dash,
I have posted one query regarding bootstrap icon are not appearing on server after publishing web app in, if know, could plz help me. thnx
Ok, let me check. I have not worked on Bootstrap, but let me check. If I can help, then I will reply there.
abdul subhan mohammed 18-Jan-14 1:20am    
only"del.aspx") is working, but other then this, like window.location, window.location.href='del.aspx', window.location.assgin, nothing is working, Plzzz suggest me,
how can i solve this issue, becuasee i dont want to open a new window, i want to open in d same window only.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900