Small Javascript function

Completed Posted Jul 23, 2003 Paid on delivery
Completed Paid on delivery

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([url removed, login to view]);

and analyse it to give a more meaningful response:

1. If the URL contains \inetpub\wwwroot, then show an alert box and redirect to <http://localhost/foldername/scriptname>

2. If it doens't contain \inetpub\wwwroot, ideally it would check if this path exists, and if it doesn't then do a [url removed, login to view] 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\[url removed, login to view]

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/[url removed, login to view]

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

ASP Engineering MySQL PHP Software Architecture Software Testing Web Hosting Website Management Website Testing

Project ID: #2955703

About the project

5 proposals Remote project Active Jul 23, 2003

Awarded to:

timk98

See private message.

$12 USD in 4 days
(54 Reviews)
4.7

5 freelancers are bidding on average $13 for this job

preyasvw

See private message.

$17 USD in 4 days
(34 Reviews)
4.4
misterlvw

See private message.

$15.3 USD in 4 days
(23 Reviews)
4.2
yedidyaweil

See private message.

$12.75 USD in 4 days
(4 Reviews)
2.6
mehivw

See private message.

$8.5 USD in 4 days
(0 Reviews)
0.0