Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2005, 06:50 AM
Registered User
Join Date: Jun 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default timeouthandler??

Hi all!

It is a function, that searches for a predifined word.
If it is found, generate a predifined page.
The predifined word and the predifined page is in an array called wl.
The script ends up the function both locally and on a remote server.
Problem occurs only on the remote server, only if a word found.
The problem is that the actual browser window does not respond instead of generating the predifined page.
It should fail at this block:
I think it is syntactically correct, because it works locally.
The problem is in the array data, I think.
wl[c] is too big.
There should be a timeout.
Here is all the code i use:
//Search and mactch the query
function search01(){
wl = new Array()

wl[0]="julianna apartment:<br /><br /></td></tr><tr><td height='30' colspan='4' valign='middle' align='center'><form name='lastminutebooking_apartments_search12' action='javascript:search();'><input type='text' name='apartments12' class='quicksrchselectfields11' style='height: 25px; background-color: #FFFFFF; border-width: 3px;'> <input type='submit' name='search_apartment' value='search apartment!' class='quicksrchbuttons11' style='width: 150px; height: 25px; border-width: 3px;' ></form></td></tr><tr><td height='50' colspan='4' valign='middle' align='center' class='linebreak0'><a href='http://www.lastminutebooking.freeweb.hu/index.htm' target='_self' >«  back to the lastminutebooking apartments</a></td></tr><tr><td colspan='1' valign='middle' align='left'><form name='lastminutebooking_apartments11' id='lastminutebooking_apartments11' ><br /><select name='apartments11' id='apartments11' onchange='javascript:search();' class='quicksrchselectfields11' ><option selected='selected' > select apartment </option><option value='fiumei' > Fiumei </option><option value='julianna' > Julianna </option><option value='saint-stephen' > Saint-Stephen </option><option value='danube 1.' > Danube 1. </option><option value='danube 2.' > Danube 2. </option><option value='danube 3.' > Danube 3. </option><option value='danube 4.' > Danube 4. </option><option value='danube 5.' > Danube 5. </option><option value='danube 6.' > Danube 6. </option><option value='danube 7.' > Danube 7. </option><option value='danube 8.' > Danube 8. </option><option value='danube 9.' > Danube 9. </option><option value='danube 10.' > Danube 10. </option><option value='danube 11.' > Danube 11. </option><option value='danube 12.' > Danube 12. </option></select></form></td><td colspan='3' valign='middle' align='left'><span style='font-size: 14px;' >14.  APARTMENT  »  JULIANNA APARTMENT  »  </span><a href='lastminutebooking.htm' style='font-size: 14px;' >LASTMINUTEBOOKING</a></td></tr><tr><td height='100' colspan='4' valign='middle' align='center' class='pictureframe12'><a name='14'>A few steps from the Danube shore, at the leg of the monumental Parliament, a familiar apartment awaiting it\'s guests.<br />One of the rooms is this double room.<br />There is possibility to use the internet, computer programs and fax.<br />A lot of facility resorts are nearby, for example: <br />parking, restaurant, shopping, museums, pedestrian zone, discotheque, thermal bath, beach.</a></td></tr><tr><td width='236' rowspan='2' colspan='1' valign='middle' align='center' class='pictureframe12' name='app_roomid'>Julianna apartment<br />suite<br />4 seats<br />address : Alkotmany str. 20.<br />owner:<br />Mr. Zoltan Ludanyi<br />contact:<br /><a href='mailto:zlotyi@yahoo.com?subject=lastminutebooking' style='font-size: 13px;'>zlotyi@yahoo.com</a><br /><a href='lastminutebooking.htm' style='font-size: 13px'>lastminutebooking</a></td><td rowspan='2' colspan='1' valign='middle' align='center' class='pictureframe12'><img align='middle' width='220' height='200' border='0' src='A001/thumb/R001.jpg' /></td><td border='0' width='200' rowspan='2' colspan='1' valign='middle' align='center' class='pictureframe12'><a href='main_map_julianna.htm' target='_self'><img align='middle' border='0' src='map_julianna.jpg' /></a></td><td width='226' height='160' colspan='1' valign='middle' align='center' class='pictureframe12'><span class='pricelistheader10'>general pricelist</span><br /><span class='pricelistheader11'>1 person</span><br /><span class='pricelist11'>25 EU/apartment/night</span><br /><span class='pricelistheader11'>2 person</span><br /><span class='pricelist11'>35 EU/apartment/night</span><br /><span class='pricelistheader11'>3 person</span><br /><span class='pricelist11'>45 EU/apartment/night</span><br /><span class='pricelistheader11'>4 person</span><br /><span class='pricelist11'>60 EU/apartment/night</span><br /><span class='pricelistheader11'>cleaning, utilities, taxes included</span></td></tr><tr><td colspan='1' valign='middle' align='center' class='pictureframe12'><a href='lastminutebooking.htm'>lastminutebooking  »</a></td></tr><tr><td height='50' colspan='5' valign='middle' align='center' class='pictureframe12'><span class='facilitydescription13'>satellite tv, web access, telephone, an equipped kitchenette with fridge, owen, separate bathroom and toilet, together with a key to the apartment.</span></td></tr><tr><td colspan='5' height='50' valign='middle' align='center' ><span style='font-size: 16px; color= #0000FF;' ><br />The apartment can be seen here:</span><br/>[list]<a href='http://www.lastminutebooking.freeweb.hu/A001/A001_R001_PIC.htm' target='_self' style='font-size: 16px; color= #0000FF;' >>  julianna apartment</a></ul></td></tr><tr><td height='50' colspan='4' valign='middle' align='center' class='linebreak0'><a href='http://www.lastminutebooking.freeweb.hu/index.htm' target='_self' >«  back to the lastminutebooking apartments</a></td></tr>";

wl[1]="glossary: - an alphabetical list of technical terms in some specialized field of knowledge usually published as an appendix to a text on that field";

wl[2]="keyword: - A summarizing word or phrase in a document or record that is used in sorting and searching. (2) (n.) A word or symbol that has a specific meaning in a programming-language statement. Also called reserved word. ";

wl[3]="path: - A path can be described as a file's address on your file system, describing where the file lives: An absolute path gives the complete path, starting at the root directory, or the very top of the filesystem A relative path looks for a file from the directory you are currently in down.";

html1 = "<HTML><Head><meta http-equiv='Content-Language' content='en-gb'><meta http-equiv='Content-Type' content='text/html, charset=windows-1252'><title>WWW.LASTMINUTEBOOKING.FREEWEB.HU - LASTMINUTEBOOKING APARTMENT SEARCH</title><link href='lastminutebooking.net2.css' rel='stylesheet' type='text/css' /><Script Language='Javascript1.2' SRC='js/glossary1.js' type='text/javascript'></Script></Head><Body style='background-color:#FFFFCC'><table width='905' border='0' cellspacing='1' cellpadding='1' align='center' ><tr><td colspan='4' valign='middle' align='center' class='availheader12' style='font-size: 18px;'><br /><br />";

html3="<tr><td height='40' colspan='4' valign='bottom' align='center' ><a href='#top' target='_self' style='font-size: 18px; color: #0000FF;'>::  <  back to the top of this page  >  ::</a></td></tr><tr><td height='40' colspan='4' valign='middle' align='center' ><a href='http://www.lastminutebooking.freeweb.hu/index.htm' target='_self' style='font-size: 18px; color: #0000FF;'>www.lastminutebooking.freeweb.hu, the lastminutebooking company. All rights reserved.</a></td></tr><tr><td height='20' colspan='4' valign='middle' align='center'><img align='middle' src='http://freeweb.hu/counter?username=lastminutebooking&type=4'></td></tr></table></Body></HTML>";

flag = 0;

for(c=0; c < wl.length; c++){
                         currentWord = wl[c].split(" ");
                                   if(currentWord[0] == myWord1){

                                  // alert(" MyWord now = " + wl[c]);
                                   flag = 1;
                          alert("The access to the apartment is actually denied, please revisit the site later!");

                  }//end of fun
How can i solve it?

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
timeouthandler?? zlotyi Javascript How-To 0 June 20th, 2005 06:54 AM

All times are GMT -4. The time now is 01:03 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.