|
I am developing a web application using asp.net/c#. I am creating cache in the application start for certain data.I have given the expiry date for cache has 24 hrs. Problem is sometimes cache is not getting loaded in the memory when the application starts. I have debugged the application but it is not throwing any exception and it is properly fetching the data from the database. Can any one give me a solution for this.
|
|
|
|
|
I had a form like this:
Type 1
Type 2
Type 3
Red
Green
Blue
When Submit I want to use javascript check user had check at least one value in radio and checkbox but I dont want to use default "checked" for radio or checkbox. Can u help me, please? Thanks
|
|
|
|
|
Include following 2 javascript functions & call CheckSubmit() on form submit. Hope this helps u.
function CheckObject(chkObj)
{
for(i=0;i<chkObj.length;i++)
{
if(chkObj[i].checked)
return true;
}
return false;
}
function CheckSubmit()
{
if(!CheckObject(document.all("type")))
{
alert("Please select a type");
return false;
}
if(!CheckObject(document.all("color")))
{
alert("Please select a color");
return false;
}
return true;
}
Never comment ur code. If it was hard to write, it should be hard to understand !!!
|
|
|
|
|
Thank you very much
|
|
|
|
|
Not sure if this is the right place to post, but here goes:
I want to add a button or toolbar to IE6 that reads the content of the current web-page when a button is pressed.
It's not anything complex like reading the HTML page as it arrives (although that would be nice as well), I just want to be able to read what the user is currently looking at. Preferable the current active frame.
I know the print preview option sees which frame is currently active, and can render the output, but how can I read the HTML source from a program?
tia,
Pauwl
|
|
|
|
|
Hi All,
Can Anybody help me out on how to redirect from a perl page to ASP/ASP.Net Page. I have a perl script which perform some function and i want as the script is executed it should redirect to a ASP/ASP.Net Page with some query string. I need to know how can I accomplish this task.
Any Help in this regard is higly appreciated in advance.
Jaffer Mumtaz
|
|
|
|
|
Try:
print "Location: http://www.developernotes.com/default.aspx\n\n";
- Nick Parker My Blog | My Articles
|
|
|
|
|
Hi,
what is the most simple way to change the style of a given 'td' element on mouseover? I find it very hard to get it working in some of the more popular browsers using javascript. What am I doing wrong?
Thanks in advance,
Matthias
If eell I ,nust draw to your atenttion to het fakt that I can splel perfrectly well - i;ts my typeying that sukcs.
(Lounge/David Wulff)
www.emvoid.de
|
|
|
|
|
This works on IE6 and Netscape7 for changing the background color. It should be simple enough to modify for changing other style attributes.
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function changeColor(cellID, color)
{
if(document.getElementById)
{
document.getElementById(cellID).style.backgroundColor = color;
}
else if (document.all)
{
document.all.item(cellID).style.backgroundColor = color;
}
}
</script>
</head>
<body>
<h2>Testing color changing table cells</h2>
<table border="1" cellpadding="8" cellspacing="0">
<tr>
<td id="c1" onmouseover="changeColor('c1', '#CCCCCC');"
onmouseout="changeColor('c1', '#FFFFFF');">
Cell 1
</td>
<td id="c2" onmouseover="changeColor('c2', '#CCCCCC');"
onmouseout="changeColor('c2', '#FFFFFF');">
Cell 2
</td>
<td id="c3" onmouseover="changeColor('c3', '#CCCCCC');"
onmouseout="changeColor('c3', '#FFFFFF');">
Cell 3
</td>
</tr>
<tr>
<td id="c4" onmouseover="changeColor('c4', '#FF0000');"
onmouseout="changeColor('c4', '#FFFFFF');">
Cell 4
</td>
<td id="c5" onmouseover="changeColor('c5', '#00FF00');"
onmouseout="changeColor('c5', '#FFFFFF');">
Cell 5
</td>
<td id="c6" onmouseover="changeColor('c6', '#0000FF');"
onmouseout="changeColor('c6', '#FFFFFF');">
Cell 6
</td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
Hi Mike,
thanks for your reply. I played around with it and found it helpful. But since I've got to change a couple of "styles", such as the border-top color, the border-left color, and so on, I would like to simply change the class of the style used. Here is what I've got and what doesn't work:
headers omitted...
<style>
td.active
{
border-top: 1px solid #cccccc;
border-bottom: 1px solid #000000;
border-left: 1px solid #000000;
border-right: 1px solid #cccccc;
}
td.inactive
{
border-top: 1px solid #ffffff;
border-bottom: 1px solid #cccccc;
border-left: 1px solid #cccccc;
border-right: 1px solid #ffffff;
}
</style>
<script language=javascript>
//...
// and later I try:
document.getElementById(cellID).class = "active";
//...
</script>
</head>
<body>
Any ideas on this one?
Thanks again,
Matthias
|
|
|
|
|
Hi Matthias. You want .className instead of .class . This should work:
<html>
<head>
<script language="JavaScript" type="text/JavaScript">
function changeClass(cellID, sClass)
{
if(document.getElementById)
{
document.getElementById(cellID).className = sClass;
}
else if (document.all)
{
document.all.item(cellID).className = sClass;
}
}
</script>
<style>
.active {background-color: #CCCCCC; color: #0000FF;}
.inactive {background-color: #FFFFFF; color: #000000;}
</style>
</head>
<body>
<h2>Testing class changing table cells</h2>
<table border="1" cellpadding="8" cellspacing="0">
<tr>
<td id="c1" onmouseover="changeClass('c1', 'active');"
onmouseout="changeClass('c1', 'inactive');">
Cell 1
</td>
<td id="c2" onmouseover="changeClass('c2', 'active');"
onmouseout="changeClass('c2', 'inactive');">
Cell 2
</td>
<td id="c3" onmouseover="changeClass('c3', 'active');"
onmouseout="changeClass('c3', 'inactive');">
Cell 3
</td>
</tr>
<tr>
<td id="c4" onmouseover="changeClass('c4', 'active');"
onmouseout="changeClass('c4', 'inactive');">
Cell 4
</td>
<td id="c5" onmouseover="changeClass('c5', 'active');"
onmouseout="changeClass('c5', 'inactive');">
Cell 5
</td>
<td id="c6" onmouseover="changeClass('c6', 'active');"
onmouseout="changeClass('c6', 'inactive');">
Cell 6
</td>
</tr>
</table>
</body>
</html>
|
|
|
|
|
How about this?
<br />
function changeClass(obj) {<br />
if(obj.className=="active")<br />
obj.className = "inactive";<br />
else if (obj.className=="inactive")<br />
obj.className = "inactive";<br />
}<br />
and you call it from within the TD as such:
<td id="c4" onmouseover="changeClass(this);" onmouseout="changeClass(this);"><br />
Cell 4<br />
</td>
theJazzyBrain
Excelence is not an act, but a habit Aristotle
|
|
|
|
|
Can any one tell me that how can i call a com / Activex function via javascript and vbscript. Currently i am doing some thing as follows but in web page i get the error that object doesnt support this property or method :
<body>
<object id=MUMSocket1 style="LEFT: 0px; TOP: 0px" classid="clsid:BDBEED17-BE31-475E-966F-28A3F07FDBBD" VIEWASTEXT>
</object>
<input type="button" value="Button" id=button1 name=button1 onclick=ini()>
<script language ="javascript" >
function ini()
{
MUMSocket1.Initialize ()
}
</script>
</body>
|
|
|
|
|
How do you find the filesize of a page (hosted on another domain) without triggering the "Access Denied" error?
I came up with a few methods, none of which works:
1. using XMLHTTP
<br />
objHTTP = new ActiveXObject("Microsoft.XMLHTTP");<br />
objHTTP.Open("head", "someurl", false);<br />
size=objHTTP.getResponseHeader("Content-Length");<br />
this gives access denied as the url is on another domain.
2. Using iframe and point to the site, then using document.fileSize gave the same error too.
Please advise.
Thanks
|
|
|
|
|
I am in need of a method to hide or encrypt some Client side VbScript. I have seem some encrypted code but do not know how that was done. I can not seem to find anything on this.
Any Help is greatly appreciated.
Thanks
|
|
|
|
|
afaik u cant encrypt client side vbscript (or any other client side script) cos the browser doesnt know anything about encryption for those things
u can obfuscate the code but ultimately u cant really protect anything client side 100%
if its so secret it should really be server-side
"there is no spoon" biz stuff about me
|
|
|
|
|
It is for an intranet app and not really that secret. No one would be trying to hack the page I just do not want it to be that easily accessible to the user.
Thanks
l a u r e n
|
|
|
|
|
there is a tool (microsoft script encoder ) about 250KB that encodes scripts.
search microsoft downloads for it.
|
|
|
|
|
What is the best way to communicate between ASP.NET (VB)and a GemPlus smart card reader running on Windows clients? The client can communicate via a Web Service passing a DataSet at card insert/read time. But, the website works with and updates the data sometimes over a 30-60 minute period. Due to the length of processing time, I'm not sure that an asychronous web service call will work well even if multi-threading. Is there a better way to notify the client from the webserver and pass back the dataset in order to write back to the card.
rdahlke
|
|
|
|
|
hello roger......... if u got a solution for integrate card reader with ur appln..... plz give me the source code.....
email id:infotechkarthik@yahoo.co.in
regards
karthik2086
|
|
|
|
|
I have ran into a situation where a alert('test') type practice would make more sense. It works great in IE, but i'm not sure if any other browsers would have problems with this...??
There place inside various tags through the web site...and it's not actually alert('test') it's setting a cookie, becuz at this point i've already sent headers and PHP won't let me set cookies using it's functions...
Any suggestions...?
Thanks
How do I print my voice mail?
|
|
|
|
|
if ur having problems outputting headers in php either re-structure ur code to output the header first or buffer the output until after u write the headers
ur first question i dont really understand?
"there is no spoon" biz stuff about me
|
|
|
|
|
Can any one tell me that how can i call a com / Activex function via javascript and vbscript. Currently i am doing some thing as follows but in web page i get the error that object doesnt support this property or method :
<HTML>
<BODY>
<OBJECT id=MUMSocket1 style="LEFT: 0px; TOP: 0px" classid="clsid:BDBEED17-BE31-475E-966F-28A3F07FDBBD" VIEWASTEXT>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="1323">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
<INPUT type="button" value="Button" id=button1 name=button1 onclick=ini()>
<script language ="javascript" >
function ini(){
MUMSocket1.Initialize ()
}
</script>
</BODY>
</HTML>
|
|
|
|
|
hi,
I had IIS installed on my windows 2k pro, and was up and running till very recently. Now I am getting an error message that my server is not accessible. I am not able to create or open any of my web projects.
I tried reinstalling IIS, but it didnt help.
I also tried reinstalling the Visual studio.Net, still nothing is happening. Now i guess i will have to reinstall windows to get this fixed. which i may do it tmrw. could some one tell if there is a fix for the problem,
I really am not willing to reinstall the Operating System.
Please Help Me..
thanks in advance
|
|
|
|
|
Did you recently run anything like the IIS Lockdown tool or the Microsoft Baseline Security Analyzer or did you remove or disable any of your local computer accounts, such as ASPNET, IUSR_<machinename> or Administrator?
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|