|
dont cross-post pls
refer the answer one in asp.net board
<< >>
|
|
|
|
|
We have wikimedia in our website. The pages doesnt get refreshed or updated. Everytime the cached pages are only displayed. This problem is only in Firefox and not IE. Let me know why it happens.
|
|
|
|
|
We host all these 3 sites
www.xyx.com/a belongs to education sector
www.xyx.com/b belongs to finance
www.xyx.com/c belongs to insurance
these are indiviual child sites
when i browse these from the internet individually
everthing works fine but when i acces all the three simultaneously one of the other sites gives me a problem
and the error message is always different
|
|
|
|
|
Well - withouth the error-message(s) it would be hard to guess, but my bet is that they all access the same database/datasource and deadlock eachother yeilding various errors..... but it is a guess.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Code:
<script>
function Msg()
{
var agree = confirm("Save ?");
if( agree )
{}
else
{
return false;
}
}
</script>
on body :
<body onbeforeunload="return Msg();">...........</body>
so when I click "Cancel" on "Confirm Window", IE open a new alert box automatically. How can I disable this function of IE by using Javascript ?
Thanks!
Hung
|
|
|
|
|
Hi Hung,
You cannot disable this dialog box since you are using the onbeforeunload event. In this case, you might consider using this dialog to show the confirm message instead of using the confirm method. It looks something like:
<body onbeforeunload="return 'Save?';">...........</body>
|
|
|
|
|
But how can I change the content of the Messages ?
Hung
|
|
|
|
|
You cannot change the predefined text in the dialog log, what you can do is to dynamically add your confirm message in the dialog. You message should appear in the center of the dialog box.
|
|
|
|
|
Can you show me the code ?
Hung
|
|
|
|
|
MSDN:
"When a string is assigned to the returnValue property of window.event, a dialog box appears that gives users the option to stay on the current page and retain the string that was assigned to it. The default statement that appears in the dialog box, "Are you sure you want to navigate away from this page? ... Press OK to continue, or Cancel to stay on the current page.", cannot be removed or altered."
Example from MSDN:
<HTML>
<HEAD>
<SCRIPT>
function closeIt()
{
event.returnValue = "Any string value here forces a dialog box to \
appear before closing the window.";
}
</SCRIPT>
</HEAD>
<BODY onbeforeunload="closeIt()">
<a href="http://www.microsoft.com">Click here to navigate to
www.microsoft.com</a>
</BODY>
</HTML>
---
b { font-weight: normal; }
|
|
|
|
|
Sorry, I'm the author of this question but I lost my account.
Can I close that window automatically when it appear ? or do you know how to do like that window ?
|
|
|
|
|
If any browser allows such a thing, then take it as a bug. The idea behind it is that users get one chance (and only one!) to re-think their decision to close a window, thus giving web developers an opportunity to remind users of unsaved form data, etc. If you could actually stop the user from closing / leaving a page, then it would invite usability problems, to say the least.
|
|
|
|
|
I have the code:
<table><tr>
<td id="text"><a href="abc.htm">hung1</a></td>
</tr>
</table>
I want when I click on this text "abc page" the message box appear and if user choose "cancel" then nothing change (like Message box above of IE).
I used this javascript code:
<SCRIPT FOR=text EVENT=onclick>
confirm("Save?");
</SCRIPT>
But not successful. What must I do?
|
|
|
|
|
the js code should be something like this:
onclick="return confirm('Save?')
<< >>
-- modified at 0:59 Saturday 10th September, 2005
|
|
|
|
|
hello,
i need to retrieve the value of a hidden html field in a JSTL expression.
I've tried a lot of solution but none worked.
Tried with value ="${param.fieldname}", <c:set ...
servlet pageContext.set attribute....
In partiicular i have a text field witch contains a string like"yyMMdd...."
and i need to fmt:parseDate and fmt:formatDate it but i cannot get it's value and it cames empty.
What is the solution?
Please help as soon as possible. Thanks a lot
Domenico
|
|
|
|
|
Back ground to a problem:
---------------------------
We have a page of multiple choice questions in a Test (ASP application) that has a timer. Since there are several questions on the page obviously the page scrolls, and to enable the student to see the time remaining as per timer, we have made a separate frame and fixed the timer in that- on the top right.
If the questions are not completed by the student, and the time is up- this questions page auto submits.
The Problem:
----------------
When the student clicks on submit button indicating that he has finished with the questions, or if the page auto submits…the student moves to the answers page, but the timer appears here also.
Can someone please suggest a way by which the timer is restricted to the Questions page only- at the top right in a fixed manner?
|
|
|
|
|
Put target="_top" in the form.
---
b { font-weight: normal; }
|
|
|
|
|
hi guys, i have a jscript piece of code that is not displaying the records together with the radio buttons, The sql statement works fine (i checked it in Access and it works) but it just won't display, can someone check where i went wrong please. There are no errors, it just displays the 'update" button.
here it is
<html>
<head>
<title>Attendance Records</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10pt;
}
-->
</style>
</head>
<body>
<%@ LANGUAGE="JAVASCRIPT" %>
<%
var conn;
var rs;
var strSQL;
var fld;
conn = new ActiveXObject("ADODB.Connection");
conn.Open("Provider=Microsoft.Jet.OLEDB.4.0; DATA SOURCE = " + Server.MapPath("db1.mdb"));
if(Request.Form("update") == "update"){
for (var fld in Request.Form)
{
if(Left(fld,7) == "status_"){
student_id = CLng(Mid(fld,8));
attendance = Request.Form(fld);
strSQL = "Update tblattendatt_status = '" + attendance + "' WHERE studentID = " + student_id + " && att_date = Date()";
conn.Execute (strSQL);
if(recsupdated == 0){
conn.Execute = "Insert INTO tblattend(studentID,att_status,att_date) VALUES(" + student_id + ",'" + attendance + "', #" + Month(Date()) + "/" + Day(Date()) + "/" + Year(Date()) + "#)";
}
}
next;
}
rs = conn.Execute("Select tblstudent.studentID, tblstudent.Name, tblattend.att_status From tblstudent LEFT JOIN tblattend ON (tblstudent.studentID = tblattend.studentID && tblattend.att_date = Date()) ORDER by tblstudent.Name");
function currentstatus(statval){
if(rs("att_status") == statval){
currentstatus = " checked";
}else{
currentstatus = "";
}
}
%>;
<div align="center"><font size="3">Attendance records for today</font></div>;
<form name="form1" method="post" action="">;
<table width="50%" border="0" align="center" cellpadding="4" cellspacing="0">;
<tr bgcolor="#CCCCCC">;
<td width="58%">Student</td>;
<td width="14%">Present</td>;
<td width="14%">Absent</td>;
<td width="14%">Late</td>;
</tr>;
<%
while (!rs.eof) {
Response.Write("<tr>");
Response.Write("<td>" + rs("Name") + "</td>");
Response.Write("<td><input type=radio name='status_" + rs("studentID") + "' value='P" + currentstatus("P") + "'></td>");
Response.Write("<td><input type=radio name='status_" + rs("studentID") + "' value='A" + currentstatus("A") + "'></td>");
Response.Write("<td><input type=radio name='status_" + rs("studentID") + "' value='L" + currentstatus("L") + "'></td>");
Response.Write("</tr>");
rs.movenext();
Wend();
}
rs.Close();
conn = null;
}
%>
<tr bgcolor="#CCCCCC"><td></td><td></td><td></td><td><input type="submit" name="update" value="update"></td></tr>
</table>
</form>
</body>
</html>
|
|
|
|
|
Hi all, I have a query regarding javascript regular expression.
I have one string which has "(double quote) and \(slash) characters.
Now, how I can replace these ( " with \" and \ with \\)using regular expressions at one iteration otherwise it will be recursive.
I mean we have to check every character and replace it. Can I use replace() method for this?
Thanks,
Jay
|
|
|
|
|
You don't have to use regular expressions for that.
oneString = oneString.replace('\\', '\\\\').replace('"', '\\"');
---
b { font-weight: normal; }
|
|
|
|
|
How do I get the maxlength attribute of an input field in a java-script
eg
document.getElementById("keypad1_txtResult").value
gives me the value
but document.getElementById("keypad1_txtResult").maxlength
gives me undefined
clueless
|
|
|
|
|
maxLength
Javascript is case sensetive.
---
b { font-weight: normal; }
|
|
|
|
|
Does any know how to not display the browser toolbar in a web page?
Clueless
|
|
|
|
|
hi there,
this can be done with js: window.open with feature "toolbar=no"
the link below might give u more infor on this
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/open_0.asp
<< >>
-- modified at 8:16 Thursday 8th September, 2005
|
|
|
|
|
Thanks, but I still don't follow. I want the first page displayed not to display the toolbar.
|
|
|
|