|
try this
var getChkElement=document.getElementbyid('<%=ur checkbox control.ClientID%>');
var chkcount=getChkElement.getElementsByTagName("input");
for(var iCount=0;iCount<chkcount.length;icount++)>
{
if (chkcount[iCount].checked == true)
{
//starts from the first chk box is checked or not.
}
}
|
|
|
|
|
Hi,
I wrote a sample javascript code as,
var getChkElement=document.getElementbyid('<%=checkboxlist1.ClientID%>');
alert(getChkElement);
Its not getting.Can you help me?
Anu
|
|
|
|
|
wat ur getting whether a script error or a message like [object]
if it is getting like [object] then it is correct
|
|
|
|
|
in my application i have logout button is there to close the window.but when the user closes the window with out using this button then i have to promt a messgae didnot singed out coreectly ..i have the code tat when user press alt+f4 or directly closing the window clicking on the X button of the window..using javascript.how can i identify user closes the butoon using ctrl+space+c to close the button
|
|
|
|
|
I want to call log-off function onclick of browser close button. Please give me sample code
|
|
|
|
|
i created an app. but when i clicked the back button in the browser, it shows an err-msg.But it shud not happen, plz help.
|
|
|
|
|
What is the browser you are using and what is the error message you are getting?
N.Surendra Prasad
|
|
|
|
|
Hi,
I have problem with my web site, when user sign in i use the session to store username and password, but it early to expire. Sometimes 1 or 2 mns.
I have put Session in web.config already
<sessionstate mode="InProc" stateconnectionstring="tcpip=127.0.0.1:42424" sqlconnectionstring="data source=127.0.0.1;trusted_connection=true" cookieless="false" timeout="6000">
Please help me
Socheat
|
|
|
|
|
If your session is set to the default of 20 minutes then there must be some other cause.
If your session is stored as "InProc" (In Process) then it can be damaged by a number of things. The App Pool being recycled (becuase it is now in a different process). IIS being reset. You have a web garden or web farm. Anything that means that the new web request is handled somehow by a different process to the previous request.
However, if you are doing this in Visual Studio and stopping and starting debugging then this is only natural and to be expected.
|
|
|
|
|
Yes, I used "InProc" in web.config
I developed in Visual Studio in my local, it work normally, but when upload it to the server it work not good because the session always expire. So anyway that can do?
Socheat
|
|
|
|
|
Socheat.Net wrote: So anyway that can do?
Just check ASP.NET process is recycling frequently? I believe it gives some entries to EventViewer when it restarts. If it is recyling frequently, you need to find why it is doing so and solve it.
|
|
|
|
|
N a v a n e e t h wrote: I believe it gives some entries to EventViewer when it restarts
I'm not sure that it does. At least not by default.
I've got a web application that recycles far too often for my liking and I only see a message that I put up when the Appliation_Start method runs to say that it has processed a certain config setting that I created.
|
|
|
|
|
Colin Angus Mackay wrote: I'm not sure that it does. At least not by default.
Well, I was not sure. Anyway, solving this kind of problem is a pain.
|
|
|
|
|
N a v a n e e t h wrote: Anyway, solving this kind of problem is a pain
Absolutely.
|
|
|
|
|
Socheat.Net wrote: So anyway that can do?
You have to find out what is causing it to expire first. This means adding some additional logging to your application (I presume you already have some logging already).
To start: In your Global.asax.cs/.bv file you'll have a method that handles the Application Start event. Log when ever that is called. If you notice that it is called around the same time as you lose your session then you know that your process isn't surviving long enough.
So, if your process isn't surviving very long you need to find out why. If you don't get lots of log messages in that area then you'll need to move onto the next step and log something else.
It is a process of trial and error with potentially many iterations.
|
|
|
|
|
Thanks.
I will try my best
Socheat
|
|
|
|
|
You can do one thing. Create a separate Application Pool For Your Web Application Only. Then test the web application. Make sure you are having only one Worker process (Not a web garden).
|
|
|
|
|
My questions is that I want to expand out a multiline textbox that could have anywhere from 1 to 100 lines of data so it will all show up when I print it? I have been trying for days and have had no luck, so any help would be great.
Thanks
|
|
|
|
|
What do you mean by expanding the multiline textbox? Are you trying to print the entire contents on the screen? If yes, you need to replace newline characters with <br> and \t with   to get the text in correct format.
|
|
|
|
|
I have a form that user is filling out, drop down boxes, radial buttons, text buttons and multiline text buttons. When user enters the data in the mutiline textbox and it scrolls down. I want to print the page in the same layout as the data was entered, but with the multiline textbox expanded out so when it printed out, all the data would be displayed like it was on the page from all the fields and from the multiline textbox would so everything.
Thanks for the reply
|
|
|
|
|
Follow what I said in my previous reply. Just do the replace.
|
|
|
|
|
That will autoexpand and auto-contract the size of my textbox depending on the number of lines of text?
|
|
|
|
|
Asalamoalekum All,
i am working with ASP.NET... i have a from with textbox and a button
when user press button the text of textbox is inserted into a sql table
the insert query behind button is:
string insert = "insert into myDB.dbo.Messages (text) values('"+textbox1.text+"')";
IF MY TEXTBOX CONTAINS COMBINATION OF ANY CHARACTERS (except single quote as aspostophe) there is no problem, it works properly but IF MY TEXTBOX contains any single quote.. for Example:
textbox1 text is :- its HER'S matter dont disturb her
here it encounters an exception that unclosed single quotation...
how i could avoid this... because single quote is very common, user needs to use thisss!
(if single double quotation mark(") is used there is no problem)
please tell me the solution.
thanks,
regards,
SANA AHMAD
$@N@
|
|
|
|
|
|
Really thankssss..
ALLAH bless you !
take care
regards,
SANA
$@N@
|
|
|
|