|
Hi all,
I have a datagrid with a checkbox item in the header and i'm implementing a "select all" function which when select would select all other checkboxes on the form...
i am implementing the selectall function in javascript as such
function selectAll(obj)
{
if (obj.checked==true)
{
for(i=0; i<(document.forms[0].elements.length); i++)
{
...
all is working fine but i would like to change the text of the obj checkbox but i cant...
i tried obj.text = 'removeAll' but that doesnt work
any ideas?
|
|
|
|
|
A checkbox doesn't have any text. If there is text next to the checkbox, you have to find a way to access it separately.
---
b { font-weight: normal; }
|
|
|
|
|
Hi everyone,
I have a countChars function (javascript) for my textarea box: The functions uses a textarea, and textbox. User is only allowed to type up to "maxLength" characters in the textarea and the characters remaining is displayed in the textbox.
function countChars(controlToValidateRef, maxLength,outputControlRef, errorMessage, enableClientSideRestriction,showJavascriptAlert,showCharacterCount)
{
var countString = maxLength - controlToValidateRef.value.length;
if (countString < 0) {
if (enableClientSideRestriction) {
controlToValidateRef.value = controlToValidateRef.value.substring( 0, maxLength );
if (showJavascriptAlert) {
alert(errorMessage);
}
return false;
}
} else {
if (showCharacterCount) {
outputControlRef.value = countString;
}
}
}
I'm using this function for the following events (onkeyup,onChange,OnFocus,OnBlur) of the textarea
This works in every scenario, except when a user uses the browser to paste in text. Any way to detect this???
Thanks,
Paul
|
|
|
|
|
The OnBlur should help, cus this defenitely will be fired when the focus is lost on the control, and will fire the event.. This is what I used in one of my page only on the onblur event
<br />
function CheckLength(obj)<br />
{<br />
if (obj.value.length > 400)<br />
{<br />
window.alert("Length of Description should be less than 400")<br />
obj.focus()<br />
}<br />
}<br />
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
I am setting up an English-language website on a system that mostly serves pages in Korean. Accordingly, when I hit the site, the server sends back headers like this:
Date: Mon, 22 Aug 2005 19:54:30 GMT
Server: Apache/2.0.49 (Unix) PHP/4.3.7
X-Powered-By: PHP/4.3.7
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=EUC-KR
Before displaying the page to my browser, Internet Explorer asks me if I want to install the Korean Language Pack. That's because of the Content-Type header, which specifies the Korean charset, which I don't have on my system.
This behavior isn't what I want, so I added a tag to the section of my page:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Unfortunately, this doesn't prevent the "Load Language Pack" popup from appearing. I cannot override the HTTP header with a <meta> tag.
Thinking I had found a bug in Internet Explorer, I quick went to the W3C, and what do you know? IE has it right: http://www.w3.org/TR/REC-html40/charset.html[^]:
conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest):
1. An HTTP "charset" parameter in a "Content-Type" field.
2. A META declaration with "http-equiv" set to "Content-Type" and a value set for "charset".
3. The charset attribute set on an element that designates an external resource
Now this just seems plain wrong to me! Shouldn't fine-grain settings override global or course-grain settings? I think I should be able to specify a character set for an individual element, which overrides a page setting, which in turn overrides a "global" HTTP header. But no!
So my question is, can I specify character sets in this bottom-up fashion?
|
|
|
|
|
Hey all,
We have an option on our website to allow propects to download an evaluation copy of our software. In order for the the customer to install the software, they must input the proper activation keys which allow the software to run for 30 days.
Currently, when a prospect downloads the software, we have a .PHP script which email notifies Customer Support, who will then update our databases, and send the prospect an email with the activation codes.
We're finding this manual process to be a bit of a pain for obvious reasons (time zones primarily), and would like to goto a more automated system. I'm experienced in .PHP/.HTML .. (server supports .ASP too) But willing to venture down other avenues to solve our little problem. We would like a script to run that would generate an email with all the information they require to activate, without our interaction.
I'd prefer to keep the activation code generation in some kind of binary form, for security reasons. But I'm easily convinced of a better way.
Question: Does your company work in a similar way? How is this done? What would you recommend?
Any information/suggestions would be greatly appreciated.
Mike
|
|
|
|
|
I've never used PHP, but if PHP can call an executable and then get a result from it ( perhaps via a file on disk ? ) then I'm sure it can do what you want.
Personally, I'd use ASP.NET, but that's because I have, and I would never go back to asp, or any other pure scripting environment that doesn't give me native code and object orientated design.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have created one menu using javascript, after that I have put a dropdown combo of html but when menu drop down then dropdown combo will overlap to menu so how to put combo back side & menu upward side, give me a solution
anita
zzzzz
|
|
|
|
|
I already answered this question when you posted it two days ago.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I want to download a .csv file whenever user clicks on a button.
Can u help me.
Regards
Manikant Kasumwal
Software Engineer
R Systems International Ltd.
|
|
|
|
|
You can use the WebRequest class to download files from the web.
---
b { font-weight: normal; }
|
|
|
|
|
Hi Guffa,
i have gone through the WebRequest class but didn't find any method
to download a file.My requirment is when user click on a button it
should display a file download dialog box where user can choose the
location , just like we download any file from internet.
Thanks & Regards
Manikant
|
|
|
|
|
Aha, it's not you who will download the file, but the end user. That is something completely different.
Just link to the file, or use a button that redirects to the file:
<input type="button" value="Please don't click me." onclick="window.location='url to the file';">
---
b { font-weight: normal; }
|
|
|
|
|
I can authenticate my users using WSE and passing a security token in, but once I've done that, how does the executing function access those user credentials so it can run with the correct DB privalages?
Thanks
Ric.
|
|
|
|
|
I managed to get an answer from another board.
I need to create a CustomPrincipal from a GenericPrincipal which contains my user credentials and attach it to Thread.CurrentPrincipal in my authentication code.
Ric
|
|
|
|
|
can someone tell me if theres a way to notify another php page when a page unloads without opening a new window or stopping the user from goin to the site he wants to?
im asking this because i need to make a php script that logs people out when the close the window or leave a page.
if seen automatic logout things on other websites but i can't figure out how they work?
i cant just have cookies that expire when they close the window, because i want to have it so it echo's what users or how many users are currently viewing the page. not just if they have viewed the page.
ive seen forums tell u what users are currently logged in.....
P.S. if i need to use SQL or sumthing i have access to that on my server also
|
|
|
|
|
When the page unloads...???
I don't think thats possible...I think by the time onbeforeunload() fires it prevents you from doing anything but maybe sending an alert() to the end user..
If memory serves correct I've tried this before, but saving cookies instead of sending HTTP requests...same thing...I got no where...
I can tell you that how most systems accomplish this who's logged in/logged out is by actually using a temp session table with records that expire every 15, 20 mins or so.
The display of whose online and who isn't...isn't really real time...even if you set the session expiration time to 1 minute...if the session record is created a split second before the person leaves the page/site...that person will apear logged in for another 59 seconds...which is only an illusion
So to sum it up...you can't do real time, but you can do it so that it gives a good idea as to who is online.
HTH
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
thanks again hockey
|
|
|
|
|
ok now i cant figure this out:
how do u make a temporary table in an SQL db that expires automatically
|
|
|
|
|
The only way to notify the server is to catch the onunload event and open a new window that logs the person out. The event fires when the page unloads for any reason, so you have to keep track of where you are going.
This of course only works if javascript is enabled, and no popup blocker stops the code from opening the window.
---
b { font-weight: normal; }
|
|
|
|
|
what is the lines <script language='javascript' src='http://127.0.0.1:2342/js.cgi?pca&r=9040'></script> and the <script language=javascript>postamble()</script> tags mean... ive wearched the web but no explanation...
|
|
|
|
|
The first line includes a javascript file from the url specified. As the file is a cgi script, the script will be run on the server to return the contents to be included. As javascript files are cached in the browsers, the script might only run the first time if you load the page again, though.
The second line contains javascript code to call the postamble function, that has been defined in another script block.
The lines use HTML 3 syntax. For a more up to date (HTML 4) syntax, use:
<script type="text/javascript" src="http://127.0.0.1:2342/js.cgi?pca&r=9040"></script>
and
<script type="text/javascript">postamble()</script>
---
b { font-weight: normal; }
|
|
|
|
|
There is no way that you can put an element on top of a dropdown, so the solution is to hide the dropdown when you open the menu.
---
b { font-weight: normal; }
|
|
|
|
|
I have created one menu using javascript, after that I have put a dropdown combo of html but when menu drop down then dropdown combo will overlap to menu so how to put combo back side & menu upward side, give me a solution
Email: anitamistry84@yahoo.co.in
anita
|
|
|
|
|
Anita,
This is a known IE issue. Certain widely used workarounds being
(*) In mouseOver, when you show the menu, you can temporarily hide the dropdowns and in MouseOut, when you hide the menu, you can restore the dropdowns.
(*) Have an Iframe to contain the menu. Iframe has a zIndex which can supersede the visibility to dropdown.
Did this attend to your query?
Vasudevan Deepak Kumar
Personal Web: http://www.lavanyadeepak.tk/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|