473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

About checking an existing URL

539 512MB
Is there a function on JavaScript that checks the specified url if it exists or not?

ergo,

while loading a page, the script must check first the other page if it exists, redirect if not exists.

The purpose is for the maintenance.....
If we will do changes etc for the website, we should remove that page(always checked) so that, any users that tries to access the site or its sub directories will be redirected to a specific page ( Site under maintenance ).....

This is what im thinking now..... any suggestions or links for tutorial will be appreciated....

looking forward to your replies experts,
sukatoa
Jul 10 '08 #1
5 1284
acoder
16,027 Expert Mod 8TB
Yeah, sure, just make an Ajax head request.
Jul 10 '08 #2
sukatoa
539 512MB
Yeah, sure, just make an Ajax head request.
Thanks for your reply, i don't know AJAX yet....

Can you post some recommended URLs that could teach me how to deal with it?

Im not sure on google's suggestions.....
Jul 11 '08 #3
acoder
16,027 Expert Mod 8TB
For Ajax tutorials, see the Offsite Links sticky thread. For your specific problem, see this link (section "Does a URL exist?").

Note that this is the option client-side since you asked in this forum. You could also make an HTTP request server-side.
Jul 11 '08 #4
sukatoa
539 512MB
For Ajax tutorials, see the Offsite Links sticky thread. For your specific problem, see this link (section "Does a URL exist?").

Note that this is the option client-side since you asked in this forum. You could also make an HTTP request server-side.
I never thought that the content of that sticky thread have more tutorials about JavaScript
That URL really helped me.... thanks acoder.... :)

I got this Prototype API , is this the nice one to be used for beginners like me? or can you recommend another one that fits my level?

Thanks again for the url acoder....

sukatoa
Jul 11 '08 #5
acoder
16,027 Expert Mod 8TB
You could use that. Another popular one is jQuery and there are others. If you're a beginner to JavaScript, be sure to use one with good documentation/tutorials.
Jul 11 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
67
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
18
by: David Buchan | last post by:
Hi guys, This may be a dumb question; I'm just getting into C language here. I wrote a program to unpack a binary file and write out the contents to a new file as a list of unsigned integers....
18
by: Nebula | last post by:
Consider enum Side {Back,Front,Top,Bottom}; enum Side a; Now, why is a = 124; legal (well it really is an integer, but still, checking could be performed..) ? Wouldn't enums be more useful if...
3
by: Eeediot | last post by:
I am trying to write code that will go through the existing list items in a listbox and perform a string comparision with a supplied string. That particular item will automatically selected if...
75
by: Steven T. Hatton | last post by:
No, this is not a troll, and I am not promoting Java, C-flat, D, APL, Bash, Mathematica, SML, or LISP. A college teacher recently posted to this newsgroup regarding her observation that there has...
2
by: Bart | last post by:
Hi, i use the FileUpload control but if the uploaded file already exists, i want let the choice between overwriting or not the existing file. Therefore i use a radiobuttonlist with 'yes' and...
125
by: jacob navia | last post by:
We hear very often in this discussion group that bounds checking, or safety tests are too expensive to be used in C. Several researchers of UCSD have published an interesting paper about this...
11
by: George2 | last post by:
Hello everyone, How do you understand the Bjarne's comments about exception specification? Especially, "not required to be checked across compilation-unit" and "violations will not be caught...
4
by: winningElevent | last post by:
Hi everyone, I have a question would like to ask. So far I know how to retrieve files from device, but sometimes device takes so long to produce file so I want my desktop to keep checking every...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.