|
Dear Friends,
I have a doubt in using split function in ASP. My prb is:
I have a string str="Technology Business Finance Music"
Now i want each word in one variable, like
a1="technology" b="Business" c="Finance" like this. I know that I have to use Split function. but i don't know how to use it. Can any1 help how to write the code for this in ASP with the same function or with any different function.
Thanx in advance
Gopi
|
|
|
|
|
Documentation on Split()
Basically, you give it a string, give it a delimiter (in your case " "), and it will return a one-dimensional array that contains each token found in the string.
Jon Sagara
"Ninety percent of baseball is mental, the other half is physical." -- Yogi Bera
|
|
|
|
|
Hi,
I have never done this, but heard this is possible:
Remove comments for actual line.
When I try this, nothing happens and the results are the dreaded X-boxes (boxes with Xs) where the image should have appeared. I also tried just to execute the DLL by running the DLL with the arguments listed -- do I just replace '?' and '%' with blanks?
The .dll and .htm file are in the same directory. What gives????
Help.
Thanks,
Johnny
|
|
|
|
|
Have you registered the DLL yet? Right-Click(while holding Shift) and click Open With... Then, press the browse button and:
if using Win 9x, go under C:\Windows\System\regsvr32.exe
if using Win2k/NT go under C:\Winnt\System32\regsvr32.exe
Then, Un-Check the "Always use this program to open this type of File" and click OK. That should register it. Now try it again. Hope this helps.
-------------------------
I love Yuzu-Chan! =P
Have u eaten ur chicken 2day?
|
|
|
|
|
Hello guys,
I recently read a question in the forum regarding a server-side program to upload a file.
I have a question from the Client side point of view.
I'm developing an application to automate the filling of a particular form. This is a program in which there is no user interface at all (i.e. browser) but just communications (tcp/ip and http).
The problem is that there is a field which is an input element of type file. As you know, the value's attribute of this element is read-only from the scripting point of view (there is no way to fill this field's value through a scripting function).
My question is, does somebody knows how to tell the server application that there is a file ready in a specific location without typing in the field manually?
In other words, there is a way to set the value of this element through a function?.
Thanks much.
A.R.
|
|
|
|
|
With file select controls, the client is supposed to send the contents of the file in the body of the HTTP request resulting from submitting the form, it doesn't just "tell that there is a file ready". See Form Submission section of the HTML 4.01 spec
|
|
|
|
|
Yes Mark, that is exactly what I need to do. Send the contents of the file in the HTTP address request, but in an automated way.
To make myself clear, let's say that I need to send my users one page after the file has been uploaded in the server, trying to "emulate" a user's keyboard typing.
I already read the Form Submission topic, and all about the element specification.
Thank you.
|
|
|
|
|
What you are asking for is specifically blocked by browsers for security reasons. Otherwise it would be easy to try and get files from users machines without them knowing.
(ex. c:\Winnt\...)
One thing you can do is have an ActiveX control loaded into the browser. Then you can use the control programactically to send the file to the server. Such a control can be easily built using Dundas Software's TCP/IP product.
|
|
|
|
|
Troy thank you for taking the time.
I am working without a browser, but just at the communications level (i.e. no user interface at all). On the other hand, I'm not trying to get a file from a user's machine.
This is the scenario: I'm running an e-commerce site server. In this sense, I have my own server-side processes. One of my services is a report file generator, so when one of my users have been logged and requested this report, my server-side program creates this report and presents it in a PDF format. However, there is a special client which needs that my site (back-end process) could upload this report to his server. Unfortunately, he doesn't know anything about FTP. In his site, once you have logged in, there is a form which presents this to type or through the browse button specify the file to be uploaded.
Okay, with this in mind, what I want to do is just automate this process, to eleiminate the need of loggin with username/password and go step by step just to upload the file.
Up to this point, my program loggs in and passes every page perfectly (again, without a browser) but in this specific page it fails. I do not know how to send the content of the file through the HTTP request. If you know some literature about multipart/form-data submissions I will appreciate teh reference.
I develop all my server-side programs in C++, and just the client-side is JavaScript, DHTML & HTML.
Thank you again.
|
|
|
|
|
Is there a way to disable the Back and Forward buttons when a page is first loaded, without having to launch a child window?
Happy programming!!
|
|
|
|
|
There really isn't a way to totally disable Back and Forward. You can expire pages using the following:
<meta http-equiv="Expires" content="Fri, Jun 12 1981 08:20:00 GMT">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
Doing this can sometimes frustrate the user. If you are having trouble with users backing up then resubmitting...which can cause duplicates in the database or something, try setting a 'trigger' in session which is set when the page loads. On submit, if the trigger is present, remove the trigger, process the request and move the user on. If the user backs up, and resubmits, there is no trigger, don't process again (or edit the previous entry however you want to handle it) then move the user on.
Hope this helps.
ed
'Love is an obsessive delusion that is cured by marriage.' Dr. Karl Bowman
|
|
|
|
|
I was wondering about some functionality with asp code. Does asp have the availability for drag-n-drop functionality? When I drag and drop do I need some sort of stored procedure to update the table? Also, can you make things double click with asp? If so I would appreciate the code that would make this work. Thanks!
Matt
|
|
|
|
|
Drag and drop to where?? ASP is a server-side language, it is not a language I'd say. You just pick up your scripting language (VBScript as a default) and go ahead.
But drag and drop... The ASP code is working when the user (client) is NOT seeing the resutlant HTML page... So nothing to drag and nowhere to drop.
But with CLIENT-side script you can do it of course, using any of scripting languages (JavaScript, JScript or VBScript)... but this is not ASP
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Hi,
I wanna put a link at the front page of web site that the user should click to set my website as his IE Start Page. I know how to do it using .reg files, but i do wanna use it.
Can anybody help me?
Thank u very much,
Dirso
|
|
|
|
|
I suggest U use java script to do that. This is the script.
Farhan Faisal Zakaria
Malaysia
|
|
|
|
|
|
I am very very new Babie in Java Script. I want to disable the Maximize Button of the newly open Window through window.open(" "," ", options) In Microsoft Internet Explorer 5.
I already used resize = no. but it dose not work.
Thanks in advance.
|
|
|
|
|
Try resizable=no instead of resize=no . Also no spaces are allowed in the optionstring (I think IE5 can handle spaces though).
This works on IE6:
Window.open("myPage.htm","myExample","menubar=no,resizable=no,width=200,height=200");
/moliate
|
|
|
|
|
Thanks For Reply But . . .
It dose not work. It actually makes the window size not changeable through dragging with Mouse. But I clicked Maximize Button of the Window it maximize to the Screen Size.
Thanks for reply but also looking forward . . .
Thanks in advance.
|
|
|
|
|
Apparantly it works differently on IE5. The wonderful world of JavaScript implementation conformity...
Anyway, check out:
http://www.kipp.smith.net/javascripts/noresize.htm
Don't have IE5 installed so I cannot try it, but I hope it might help.
/moliate
|
|
|
|
|
Is there a way, other than by using an Image file, to display text on an HTML page, rotated at 90dgrees. This is turn a word in its side. I would like to do this in a table cell, and as it is generated in an embedded environment I don't have much memory to play with for storing heaps of images.
Happy programming!!
|
|
|
|
|
As far as I know there is not way to rotate text except in ie5.5 (http://www.webreference.com/js/tips/000814.html). To save space you could store each letter seperate and have it show it that way. I believe you could make some javascript that would allow you to just type text and it would convert.
|
|
|
|
|
I recall reading somewhere the you can use the Label activeX control for such a purpose. I can't remember if it's the MS Form label or not though, so you might have to do some homework.
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
Thanks for your suggestion.
I have found out the NS6 supports the DIV tag now so at that won't have to be different.
I've managed to get something working under IE, by add a little script
function onDownloadDone( s )
{
oText.innerHTML = s;
}
oText is the ID for a DIV in the form and in the HTML with a button to trigger it
<download id="oDownload" style="behaviour:url(#default#download)">
I fear though that this will also be IE specific. I'm still searching for info on what NS6 actually supports.
Happy programming!!
|
|
|
|
|
Hi !
Does anyone know how I can get hold of the domain and user account of the client, after authentication with Windows mode has been completed?
I would like to use them to get Full Name for the user from the PDC, and also the Email-address from our Exchangeserver. Any tips on these topics are greatly appreciated!
Consultant, system/web developer.
IMS Consulting AB, Sweden
|
|
|
|