Show Bid Request
Small Javascript function
Bid Request Id: 74690
|
|
|
Posted by: |
CBL (92 ratings)
(Software buyer rating 9.98)
|
Non-action Ratio: |
Very Good - 14.00%
|
Buyer Security Verifications: |
Excellent
|
Approved on: |
Jul 23, 2003 8:33:09 AM EDT
|
Bidding Closes: |
Jul 25, 2003 8:31:23 AM EDT
|
Viewed (by coders): |
100 times
|
Deadline: |
7/27/2003 1:00:32 PM (4 days after 7/23/2003 1:00:32 PM)
|
|
|
|
Description:
I need a little Javascript function that I can place at the top of my ASP files to warn the user if they have accessed it via c:\... rather than http://localhost/
I currently have something like this:
<% if 1<>1 %> If you are reading this then you have not gone through PWS/IIS <% end if %>
But I want a javascript function that will use myURL = new String(window.location); and analyse it to give a more meaningful response:
1. If the URL contains \inetpub\wwwroot, then show an alert box and redirect to <A href="http://localhost/foldername/scriptname">http://localhost/foldername/scriptname</A>
2. If it doens't contain \inetpub\wwwroot, ideally it would check if this path exists, and if it doesn't then do a document.write telling the user to install it (not sure if this is possible in clientside javascript - please mention in your bid).
3. If the path does exist (or we are unable to detect either way) then write a message telling them where they should move the folder to.
e.g. if the user has entered c:\program files\mytest\default.asp then it should say something like:
This folder does not appear to be in your web tree. Please move the mytest folder (currently located at c:\program files\) to c:\inetpub\wwwroot. Once you have done this, click on this link: http://localhost/mytest/default.asp
4. If there is a way of warning the user if Javascript has been turned off (i.e. a message that would be supressed by Javascript in the same way as my ASP works) then that would be very useful. Again please mention in bid if you can do it.
Deliverables: 1) Complete and fully-functional working script. 2) Complete ownership and distribution copyrights to all work purchased.
Platform:
Cross Browser Javascript
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
This bid was accepted by the buyer!
|
$15 (USD)
|
Jul 23, 2003 12:01:33 PM EDT
|
9.23
(Superb)
|
|
|
What we can and cannot do:
1) Alerting if accessed by C:\... instead of http://... can be done pretty simply, and is no problem.
2) We really can't do this from client-side javascript becuase of security issues. (You would need to have a scripted HTA file, and even then it would only work from IE. Under netscape, this is 100% impossible in all situations, presently.)
3) This we can do pretty quickly also.
4) I think we can make use of the <NOSCRIPT> tag to display a messaage on the page. I've never actually tried turning off script entirely on a web page, though, so I can't say for sure what will happen. On browsers that don't support JavaScript, this will definitely work.
Thank you very much for your consideration, I'm looking forward to working with you.
-Tim
|
|
|
|
|
|