|
Well I use MS Visual Studio 7 to write my markup and modified the colors.
Well it takes me have an hour to post a code snippet like this one .
Currently I'm writing at a XSLT stylesheet to format markup, cause it takes way to long to do it by hand. Maybe I'll write a C/C++ converter but that's not that easy (who would have thought that?)
Here a little guide:
Put all code in these tags
<nobr><div
style="background-color: rgb(225, 240, 255); color: black; font-family: 'Courier New', monospace; padding: 2px 2px 2px 2px; margin: 5px 5px 5px 5px; border: solid 1px silver;" >
<nobr>
* Place your code here *
</nobr>
</div>
Use 2 s to indent every step.
And this is the hard one: color every element by hand with <span style="color: [color];">* Element *</span>
|
|
|
|
|
Can anyone point me in the right direction in regards of how to develop a file manager system?
I would like to create one for my website so I can share files, upload/download.
I don't want to buy one.
Is this possible in ASP w/ VBScript or JavaScript??
much thanks ,
|
|
|
|
|
Yep, of course it is possible. You should use FileSystemObject for this purpose (make sure it is available on your site). It has all needed capabilities - creating, moving, coping, deleting, renaming, listing directories and files
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
http://www26.brinkster.com/mvark/scramble.html is my attempt at rot N encryption similar to rot13 encryption in which each char of submitted text is replaced by the 13th char ahead of it. to decode the encrypted text, u need to provide the negative value of the number u used to encrypt. the instructions to use the app are on the page itself. it uses javascript and works with ANY [?] user specified number.
i could not conclusively arrive at
1] the largest number that can be used
2] why certain characters don't show up properly on decryption while
other characters do. for instance character 'i' when encrypted with
number 55 generates a
char which when decrypted back with -55 does'nt give back 'i'
To take corrective action and convert this into an article I look forward to any feedback on this....
this is the function that does the encryption/decryption
function scramble(num){
ascram= new Array();
bscram= new Array();
scram=document.myform.original.value;
ascram=scram.split('');
for (itemp=0;itemp
|
|
|
|
|
The rot N algorithm is one of the oldest methods to encrypt text (maybe 3000 years old). Take the english alphabet for eaxample, which has 26 characters.
If you move every character 5 digits above your 'a' would become an 'f'. Easy. Now what about the 'v'? Adding 5 digits to 'v' would result in the 27th character of your alphabet, wich is not defined. Now how can you solve this? Quite easy, because you moved the 'a' five digits up, you get a space of 5 digits at the beginning of your alphabet, so all shifted characters above 26 resume at the beginning of the alphabet.
Every ASCII character has 256 possible values, so you have to set the cutting edge to 256.
This function rotates your text n wise:
<nobr>function rot(text, n)
{
var result = "", character, position;
n = (n % 0xFF < 0) ? (0xFF + n % 0xFF) : (n % 0xFF); // rotating -10 is the same as rotating +245
for (position = 0; position < text.length; position++)
{
character = text.charCodeAt(position);
character = (character + n) % 0xFF;
result += String.fromCharCode(character);
}
return result;
}
I wonder how you get an 'a' by adding something to 'i'. 'a' has the value 97 and 'i' the value 105?!
Ok, after sleeping over it twice I found 2 errors in my first try:
1. Negative n values, that resultet in a character value < 0 created garbage.
2. Numbers > 255 (0xFF) could also create problems.
Both fixed.
|
|
|
|
|
Congrats!!!
That was the most visually pleasing reply I have ever seen...
I'm now officially jealous...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Thanks !
|
|
|
|
|
Question:
Why is it such a bad thing to keep my connection string inside any *.php file...??? I've read from differ sources that so long as your database password/username are used inside PHP and your webserver is setup correctly this posesses no problems... (assuming because any PHP is exeuted on the server before being sent to the browser as PLAIN HTML?). However I have also read that you should store your database connection routines in an external PHP file somewhere other than your docroot and include into your main PHP code using require() or include()
What the hell does that mean...??? my doc root I am assuming is the directory on the server which is mapped to my IP/domain name???
example:
home/domain/mainwebsite_html
home/domain/mainwebsite_bin
However I don't think I can transfer files anywhere other than child folders I create or in the two listed above...or can I...??
If I FTP'ed a file under just home/ would this be considered somewhere other than docroot..?? if so why is this the safer method...??
Thanx in advance
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Hockey wrote:
If I FTP'ed a file under just home/ would this be considered somewhere other than docroot..??
Yes. On a Unix box running Apache, you may see something like www , public_html , etc. where the actual document root is. It's rarely the same as your home directory for a virtual domain.
Hockey wrote:
if so why is this the safer method...??
Because it's not publicly accessible to everyone - which has to be done in order for web pages to show up in the browser.
If you can admin the system on your own, I would suggest keeping everything related to your webpage in the document root, however, to make it easier to move around. Create a "passwd" subdirectory and chmod that sucker to 750 and put the include file in there and chmod it to 640.
Note that the user Apache/PHP runs as will affect its access. Apache may be ran as the user nobody , or something similar. Which means there's a chance it might not have access to that folder you just created. So, either chgrp the "passwd" directory you created or change the user/group combo that Apache/PHP runs in - if it doesn't match.
If you can't admin the system, then just keep it outside of the document root as a quick fix. This still will stop anyone from the web from seeing it.
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
any 1 have idea how too use the tree view in asp
i want too show all the files in tree view
and when the user click on any file open
the file
how can i use tree view in asp
looking forward for reply
|
|
|
|
|
hey all,
I've been writing some ASP.NET with VB.NET recently. So far I have *not* been able to publish things by copy/paste to my ISP, brinkster. So what I've ended up doing is modifying the VS.NET generated page, taking out the code behind and inherit directives and writing everything in one single page with embedded ASP.NET (a at the top).
This seems to do the trick.
When I'm running things locally though I've also noticed that a "View in Browser" doesn't work with the codebehind etc... and istead I have to use the "set start page" and let VS.NET compile everything first.
Am I just not deploying things correctly to my ISP? How can I compile things locally and then just copy them over to the server?
Thanks much,
*->>Always working on my game, teach me
*->>something new.
cout << "dav1d\n";
http://hobbitwerk.brinkster.net/blog
|
|
|
|
|
Is there any way to detect when a form is submitted using the form.submit() method? Thanks.
|
|
|
|
|
From the client side...???
I've never tried it myself but
<br />
<input type="submit" onSubmit="alert('onSubmit detected');"><br />
should do the trick
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
and if you return false from the function you call in the onclick() event handler it wont do the submit
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
Hi All
Im using a DSN To connect to my SQL Database.And i thought when u use a DSN we dont have to give out the username and password in the connection string and that the DSN name would do..
But on the contray my application is working when i give the dsn name but also the username and password that i sued to create the DSN.
Now this is confusing me..
Dim Connection
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "DSN=myDSN"
this does not work..
But
Dim Connection
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open "DSN=myDSN;UserID=john;pwd=joker;"
now this works.
Any Suggestions..
Regards
PradhiP.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
Well, yes you need, lol
Database drivers are not using username and password stored in DSN. Actually password is not stored in DSN, only the last used username.
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
I'm currently using PHP but I imagine ASP wouldn't be much different.
Everytime I call a script to process some form data...that script always either chnages the current windows HTML or opens a new window and generates HTML there...the problem I have with this is if you send 150 forms a day...it's really annoying having to click back or close the Thank you for responding window each time you send data to the server.
So I have come to the conclusion I have 2 options, but would like to know if another exists...
1) I could use the META tag to redirect the PHP back to the original HTML page after so many seconds.
2) I could program some trivial JScript to reload the HTML page after the onLoad event has been fired.
My question is this...CO in it's URL's often has the filename of another ASP script in it's URL encoded paramters...what are the scripts doing with this filename paramter..??? Anything like the above..? or is there a way for your server scripts to redirect browsers using a function call...?? I'm thinking this can't happen, but I could be wrong...
[modify] - Actually...what I would like to know is acn PHP act like Perl so that nothing changes and scripts are just exectued on the server side of things..???
Thanx
Cheers!
Cool we finally have HLEing for html...;P
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
One solution would be to have just a single php page. When it's opened normally it displays your form. If it's given post information it processes the information, displays some kind of thankyou message, and re-displays a new form
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I thought of that also, but I was hoping I could somehow avoid this. Looks like thats not gonna happen using PHP...ah well.
Thanx again.
Cheers
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
How do I use Oracle functions from my ASP code???
what doesnt work.....
sSQL = "<fn_sme_insert>(12,'blynch@gasoplus.com.mx','','Test','from asp','','','','220702 000000',0,0) FROM dual"
I need help badly with this...
|
|
|
|
|
Anonymous wrote:
How do I use Oracle functions from my ASP code???
what doesnt work.....
sSQL = "(12,'blynch@gasoplus.com.mx','','Test','from asp','','','','220702 000000',0,0) FROM dual"
I'm not sure that I can help you directly if this has anything to do with Oracle because I use MS SQL Server professionally, however because Oracle is a relational database you will need to create a SQL statement that is valid. Does Oracle support stored procedure like MS SQL Server? I guess I am not really sure of what you are doing here, could you explain?
Nick Parker
|
|
|
|
|
I have a form that when the user presses <enter> the form is submitted. I don't want to stop this.
What I would also like to do is in particular edit/input boxes, I'd like to trap the <enter> keypress and run a javascript function.
Anyone know how to do this please?
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Jeremy Davis wrote:
I have a form that when the user presses the form is submitted. I don't want to stop this.
I assume you mean you do want to stop this. If so then just put onsubmit="return false;" in your FORM element.
Jeremy Davis wrote:
What I would also like to do is in particular edit/input boxes, I'd like to trap the keypress and run a javascript function.
Use the onkeypress event. e.g. <input type="text" onkeypress="return dojavascriptfunction()" />
Then whenever a key is pressed in that edit box, it will call the JavaScript function called dojavascriptfunction.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
The greatest thing you'll ever learn is just to love, and to be loved in return - Moulin Rouge
Alison Pentland wrote:
I now have an image of you in front of the mirror in the morning, wearing your knickers, socks and shoes trying to decided if they match!
|
|
|
|
|
Thanks. In particular I want to trap the <enter> key and no others. How could I use the onkeypress method to do this?
I feel like I'm diagonally parked in a parallel universe
Jeremy Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Sorry! If you write <ENTER without <code> tags, it obviously disappears in the message. In particular I want to trap the <ENTER> key and no others. How could I use the onkeypress method to do this?
|
|
|
|