Results 1 to 10 of 10

Thread: javascript - should but not working on host server

  1. #1
    Join Date
    May 2010
    Posts
    34
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default javascript - should but not working on host server

    Hi,
    Is there any javascripts to make a site,
    not working on hosting but it should work perfectly in locally?
    OR
    should give some errors, when the site is going to hosting.

    can it be happened ??? Is there any javascripts ???

    .
    Last edited by hansan; 06-08-2010 at 11:51 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You post is not clear. I do not understand the question, and you should try to phrase things more clearly. For example, "???" and "!!!!!" don't help make things clear-- use more words, give us links, and explain the SPECIFIC problem.

    As a short answer (I think this is what you're asking), yes, some things can be different locally and on a server. But this isn't because of the server: it's because of the browser and security settings.
    Last edited by djr33; 06-08-2010 at 07:03 PM.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    hansan (06-09-2010)

  4. #3
    Join Date
    May 2010
    Posts
    34
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    well, djr33 this is my requirement.
    • I have designed a site. It's working properly in locally.

    • Now I want to insert a special javascript on my home page.

    • The job of that special javascript is, makes some errors in the site when site is going to publish on internet.

    The site should run on locally but not on server

    Is there any, this kind of special javascript...

  5. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ok. You want to DISABLE the site using Javascript, when the site is online?

    I don't understand the reasons, but you should be able to check the URL and use location.href to redirect the browser if needed.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    If you are trying to use javascript to disable your site, you should be aware that javascript can be turned off by the user. This makes it completely unreliable for any security purposes.

    Also - and I assume I must be misunderstanding something - why would you want to put your site online, but make it inoperable? If you only want it to function locally, why put it on the internet at all?

  7. #6
    Join Date
    May 2010
    Posts
    34
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    hmmmm, I know that's a strange requirement . But that's a test for me...
    Then someone will check this code whether i'm correct or not under that strange requirement.
    so please help me.

    if it is hard find a javascript, please tell me a another method to do it.

  8. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    well, as I said, javascript won't be reliable because it runs on the user's computer. The user has complete control, and can just turn it off if desired.

    To really secure anything, you need a server-side script. You can use PHP to deny access to unauthorized users, or use .htaccess to redirect all requests for the page so it's completely inaccessible.

  9. #8
    Join Date
    May 2010
    Posts
    34
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Yes! you are correct traq. the script can be removed by the user.But it's doesn't matter. no need to use sever side language.
    As i said this is a test for me.They are not going to remove it.Because they only want to test me.
    so it's more than enough if you can help me with javascript.

    thank you very much.

  10. #9
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    javascript isn't really my specialty. Is this a school assignment?

  11. #10
    Join Date
    May 2010
    Posts
    34
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    this is not a school assignment. but it like a assignment for me....
    i'm a beginner to web design. hope you'll help me.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •