|
I want to get the size of the responce from a web service and compare this with the size of a responce from a local function.
Does anybody know how i might do this?
Code samples appreciated
Thanks in advance
Colin McAdam
(.NET wanabe)
|
|
|
|
|
I am trying a javascript typing effect.
I am facing problem in giving delay between printing of two characters.
I tried setTimeout but is not working as shown below:
show();
Please help
Ranjan Goyal
|
|
|
|
|
Hi,
This is what you need to do :
function show()<br />
{<br />
var typeLength= str.length<br />
document.typewriterScreen.typepage.value= <br />
document.typewriterScreen.typepage.value + str.charAt(i)<br />
i++<br />
var timeID= setTimeout("show()",50)<br />
}
In my case typewritescreen is my form and typepage is my textarea. But you could use your document property.
What's happen is that the code var timeID= setTimeout("show()",50) sets a time out for the script of 50/1000 of a second before it runs through the function again.
Hopes this helps you out
|
|
|
|
|
I tried following and it is not working.
But I can write on the status bar as shown below in commented portion.
Moreover I don't want to write in the textbox but on the document.
Please Help.
Ranjan
|
|
|
|
|
|
Can anyone give me a simplest possible example for using ftp with php technology?
I will be very much thankful.
Ranjan Goyal
|
|
|
|
|
look in the php manual. the best documentation i have ever seen.
--
Raoul Snyman
Saturn Laboratories
e-mail: raoul.snyman@saturnlaboratories.co.za
web: http://www.saturnlaboratories.co.za/
linux user: #333298
|
|
|
|
|
I want a very basic working example.
e.g
Reading a file from remote machine,
displaying it on my textbox
and then on a button click to save that file in the same place.
At present I am not able to read file.
My machine no is 192.168.0.6
Below is the code that I am using
";
$fp=fopen("ftp://******:*****@192.168.0.60/ranjan/downDb.php",r);
$contents = fread ($fd, 100);//100 is file size here
echo"$contents";
echo"";
?>
Below is the error generated
Warning: fopen(ftp://...@192.168.0.60/ranjan/downDb.php): failed to open stream: FTP server reports 550 Could not get file size. in /home/small_projects/ranjan/ftp.php on line 3
Warning: fread(): supplied argument is not a valid stream resource in /home/small_projects/ranjan/ftp.php on line 4
|
|
|
|
|
from the php manual:
--
Raoul Snyman
Saturn Laboratories
e-mail: raoul.snyman@saturnlaboratories.co.za
web: http://www.saturnlaboratories.co.za/
linux user: #333298
|
|
|
|
|
Hi Raoul,
First very sorry for this delayed response.
Today, I tried the following code and I got the following error:
Fatal error: Call to undefined function: ftp_connect() in /home/small_projects/ranjan/ALLFILES/ftp.php on line 12
192.168.0.112 is IP of a folder on NT server
Code is this:
// set up basic connection
$ftp_server="http://192.168.0.112/Ranjan";
$conn_id = ftp_connect($ftp_server);
// login with username and password
$ftp_user_name="********";
$ftp_user_pass="********";
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// check connection
if ((!$conn_id) || (!$login_result))
{
echo "FTP connection has failed!";
echo "Attempted to connect to $ftp_server for user $ftp_user_name";
exit;
}
else
{
echo "Connected to $ftp_server, for user $ftp_user_name";
}
Ranjan
|
|
|
|
|
> // set up basic connection
> $ftp_server="http://192.168.0.112/Ranjan";
> $conn_id = ftp_connect($ftp_server);
first problem i see is that "http://" - remember, you are trying to connect to an FTP server... not an HTTP server...
try changing that and see what you get...
--
Raoul Snyman
Saturn Laboratories
e-mail: raoul.snyman@saturnlaboratories.co.za
web: http://www.saturnlaboratories.co.za/
linux user: #333298
|
|
|
|
|
have two div ,one is big another is small.small on the big!
the small div is under the big div when click the big div.
please help me to take small div on top for ever!
thank you !!!!!
|
|
|
|
|
you may increase z-index of smaller div, with e.g style="z-index:5000" . Bt I don't understand how you change anything with click on div... There must be something more you keep for yourself If trick with z-index doesn't help, show us some markup
regards,
David 'DNH' Nohejl
Never forget: "Stay kul and happy" (I.A.)
|
|
|
|
|
What is the difference between the two?
I know they produce the same result but why different way of doing the things and whch one is better.
<a href="#" onclick="window.open('test.html',,'width=100,height=100,scrollbars=No')">Test</a>
<a href="javascript : void(0)" onclick="window.open('test.html',,'width=100,height=100,scrollbars=No')">Test</a>
Ranjan Goyal
|
|
|
|
|
There is actually a slight difference, it just isn't that apparent. If you link to #, the page will refresh as the new window opens. Depending on the browser, the parent page may scroll back up to the top as well. If you link directly to the javascript command, the parent window is "untouched".
-
Rock on!
|
|
|
|
|
|
I have a couple of submit buttons for email and displaying and updating data in a database. Anytime I post back to the same page, a new view is created and I would have to click on the back button to go back to the previous page (which is essentially the same). Is there any way to disable this so that all postbacks to the same page just refresh the page? Thanks.
"For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
|
|
|
|
|
As far as I know, you can't do this. You have to write the code yourself, so the inputboxes are filled in again with your submitted data. You could check if the request.form("yourinput") is empty or not. If not, then fill in the value property.
Hope this helps you out.
|
|
|
|
|
What if I don't care about the data being filled? All I want is for the page to stay where it is and not create a new view. I know I can call the History.Back() command when it posts, but I'm told there is a more efficient way of doing this.
"For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
|
|
|
|
|
Hi Friends,
I am developing a web site
In one web page there are 2 dropdownlist
and containg save data
for example
select1
1)abc
2)xyz
3)pqr
and for Select2
1)abc
2)xyz
3)pqr
If user select abc in select1
and then he select same abc in select2
a error messege through to user that You choose Abc in select1 so please select diffrent item
no this time i can give index no to select2 but
i want the last value of select2
suppose selet2 has pqr selected
and then he try to select abc
then after error he atomatacally select the last value
i.e. pqr
In short Undo in javascript for dropdownlist
Thank You In Advance
|
|
|
|
|
I'm trying to wire up support for both Enter and Return keys on Macs to postback an ASP.NET form when they keys are pressed within a text box.
At the moment, this is done through simulating a click on an ASP.NET button server control. This JavaScript function is called during the text box's onKeyPress event and looks as follows (with e being the event passed in):
function checkEnter(e, buttonId)
{
var characterCode;
if(e && e.which) {
characterCode = e.which;
} else {
characterCode = e.keyCode;
}
if(characterCode == 13 || characterCode == 3) {
return clickButton(e, buttonId);
} else {
return true;
}
}
The weird thing is, this works fine on PC keyboards (where it seems both the enter and return keys use the same key code), but on Macs only pressing return causes the form data to be posted back, pressing enter just causes the page to postback but without any data. Thinking about it, is this actually a limitation of the Mac itself, is this kind of behaviour normal?
Thanks as always,
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
Ok, turns out that this error is caused by an IE bug when a form contains a single text box.
It can be solved in JavaScript, but an easier workaround is to place an additional text box on the form that is not visible.
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
HI
I just downloaded the VB.Net power tools and succesfully added the dll to a C# windows application - worked well - very impressed!
I then added it to a web application i am working on and added to system.windows.forms reference. Everything comiled and seemed to work. when i tried invoking the .notify() method nothing was displayed, just the usual page re-load!
Is there anything else i have to do or any underlying reason why this will not work within a web application
Thanks a lot
Colin
|
|
|
|
|
The following code is supposed to submit the form to the process page. It works fine in IE, but not in Netvigator. When I hit the Submit, it just returns to the top and won't go.
What should I add to make it work in Netvigator?
function chkform()
{
var message = "";
/*if there is error in the form, append error string to the message*/
if(message.length > 0)
{
alert(message);
return false;
}
else return true;
}
...
...
...
...
Submit
|
|
|
|
|
The following code is supposed to submit the form to the process page. It works fine in IE, but not in Netvigator. When I hit the Submit, it just returns to the top and won't go.
What should I add to make it work in Netvigator?
<script language="javascript">
function chkform()
{
var message = "";
/*if there is error in the form, append error string to the message*/
if(message.length > 0)
{
alert(message);
return false;
}
else return true;
}
</script>
...
...
...
<form name="form" method="POST" action="process.jsp">
...
<a href="#" onclick="if(chkform()) submit();">Submit</a></form>
|
|
|
|