|
There are some funny tags that Word adds to its HTML files to specify them as belonging to Word. Create a dummy Word file and save it as HTML then take a look at what meta tags it adds (or any directives at the top of the page)
|
|
|
|
|
Hi All,
I need to calculate Age from today's date in the specific format:
Today's Date: 08/03/2007
BirthDate: 16/11/2005
Age: 01 yrs 03 months 20 days
It should consider leap year also.
Thanks in advance...
|
|
|
|
|
varshavmane wrote: I need to calculate Age from today's date in the specific format
Ok. So, what's your question?
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
This is growing tiresome isn't it....
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
|
Hi....
To All....
I have face One Problem in asp.net 2.0 with C#.
I have developed one registartion page in which there is one Text box control.
So i have to check this text box control with data base data when user enter the data without post back.
for example::
when user enter the "email id " in text box control and if there is same email id in data base then user has propmt that "email id " is already there without post back of page
with regards
Lad Ashish
|
|
|
|
|
You must post back unless you want to download the entire list of emails to the browser which would take up a lot of bandwidth and be a privacy concern.
Your best approach would be to use AJAX where the postback takes place without disrupting anything else on the page.
|
|
|
|
|
Hi there,
I am trying to check that if the file is already there in a folder of ftp or not with following:
file_exists("ftp://ftpUserName:ftpPassword@ftpAddress/ftpUploadFolder/folderName/fileName.doc")
but I can not get the result and the same for 'filesize()' function.
If you know the way then please tell me.
Thank you in Advance.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Those functions mainly will only work on the local file system. You can use the:
is_readable('LOCATION');
function which should work for FTP but other than that you may need to use the PHP functions to determine the size.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
I wrote following code in php :
$uploadDir = "ftp://$ftpUserName:$ftpPassword@$ftpAddress/$ftpUploadFolder/$folderName/$fileName";
if(is_readable($uploadDir))
$msg = "$fileName is already exist. Your File is Not Uploaded";
else
$msg = "File Uploaded";
I am uploading a file that is already exist yet it is showing me the secons message that is "File Uploaded"
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Try using the built in FTP functionality then, this is what it is meant for.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Even I used is_file("fileName") function too but the result is not proper.
--------------------------------------------------------------------------------------------------
Hiral Shah
India
If you think that my question is good enough and can be helpful for other then don't forget to vote.
|
|
|
|
|
Ok here is what a quick toss around of ideas in my head brought up:
$fileList = ftp_nlist($con, "/upload/Directory/etc");
if(in_array($fileName, $fileList)){
echo 'File already exists!';
exit();
}
Last modified: after originally posted --
Brad
Australian
- Bradml on "MVP Status"
If this was posted in a programming board please rate my answer
|
|
|
|
|
Guys,
First I used the event OnChange on an INPUT/text object. This one only fires when you move the focus away from the field and our client wants the application react immidiately. I found the onKey Up/Down/Press events, but apparently only the onKeyPress seems to work. This is however also not exactly what we want, because it only fires if you type a second character.
Do I need to do something special when using the onKey Up/Down events? They don't seem to fire...
Many thanks!
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
If you want the application to react immidiately that you need to use javascript. I don't know if that is an option for you or not. If you are already using javascript I am not sure why it isn't firing right away with the first character.
Ben
|
|
|
|
|
kubben wrote: If you are already using javascript
yes I am...
thanks.
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|
|
keyup / keydown should work. Please post:
- A small piece of code that illustrates the problem.
- The browser(s) and operating system(s) you're testing with.
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
<input size="30" maxlength="15" id="txtbox_license" onKeyDown="OnTextbox_Changed('vehicle', 'txtbox_license');" />
I've tried onKeyDown, onKeyUp and onChange .
onChange works, but only if the textbox looses focus. (which is not what they want)
onKeyPress works, but only if you type a second character. onKeyUp and onKeyDown also don't seem to work immidiately.
The function that handles the event works correctly.
many thanks.
|
|
|
|
|
Can you post the event handling method?
|
|
|
|
|
I'm not sure if I may.
If it is any help, my first statement is debugger which fires when I use the onchange event, but not when I use the other ones...
these are the first lines:
function OnTextbox_Changed(page, id){
debugger
var txtboxid = page+id;
document.getElementById(id).value = document.getElementById(id).value.toUpperCase();
switch(txtboxid){
}
note that this works perfectly when using the onchange method !
anyway thanks for the effort in any case !
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|
|
Ok... Let's try something else. Throw this in a little test HTML file. It should display what you type, as you type it. Let me know how this fails.
<script>
function ShowText()
{
var input = document.getElementById("input");
var output = document.getElementById("output");
var txt = input.value;
if ( output.textContent != null )
output.textContent = txt;
else if ( output.innerText != null )
output.innerText = txt;
}
</script>
<textarea id="input" style="width:90%;height:6em;" onkeyup="ShowText()"></textarea>
<div id="output"></div>
----
It appears that everybody is under the impression that I approve of the documentation. You probably also blame Ken Burns for supporting slavery.
--Raymond Chen on MSDN
|
|
|
|
|
Dude,
this seems to work.
I'll analyze what you did and try to implement it.
I'm curious though, at first site, it looks like you did the same I did.
thanks for this effort !
|
|
|
|
|
I found the problem .
I checked my code in the webbrowser itself instead of embedded in the application ... it works.
thanks for your help.
|
|
|
|