HTML - Listening For Click On Page
Hey all, i'm new to the forum so let me know if i've posted in the wrong place!
I'm looking for a script to listen out for clicks on the page, even if the page contains an iframe. So no matter where the user clicks on the page (even if its a link within an iframe) I can direct them to a specific page. If its easier to make it specific to iframes only, that would also do. I hope i've been clear enough! - TM Similar TutorialsWhy is my home page crashed every time i click the next page button at the very bottom if you look at the (FEATURED and NEWS categories) it will changes after you clicked the next page bottom Also when i click the next page bottom its not showing the right articles/posts according to the date wrote. any help of how i can fix this problem step by step will be much appreciated. What ActiveX element is on this webpage? Everytime I load it in Internet Explorer a pop up comes up saying "click here to run an ActiveX on this web page"... Any ideas? http://www.curiousclothing.com/test/ Hi... I got a question tht puzzeled me whole day and i dont know how to solve,Can you please help me? My main page is at /usr/local/share/HT/html/server/index.html. Now that inside my main page i want to do a link by a button click to the another page, say page 8. page 8 is at /data/website. But whenever i tyr to click on tht button, it says "PAge not found" Followimng is my coding <br><input type="submit" value=" Viewing " onClick="location.href='/data/websites/page8.html'"; onMouseOver="info('Viewing'); return true" onMouseOut="info(' '); return true" ></br> Can anyone guides me step-bystep, please :-) I'm really stuck on this one. So, I'm on a page, let's call it index1 and I need to open index2 with index3 displayed in a frame on index2 (All from just clicking one link). The problem is on index1 there are many links that will all take us to index2, but with different pages (index4, index5 etc.) needing to be displayed in the frame on index2. How can I achieve this? Sorry, my title is unclear see if I can explain it better he ok when I click from any of the other pages to the menu page, the name and address (which is on every page in the same place) moves to the left slightly. the name and address stay in the same place when clicking to and from any of the other pages, its just the menu page with this hiccup. This happens both in IE and Firefox. Any ideas on how to correct this?? HTML of home page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxx xxxxxxx xxxxxxxxx Tel: +00000000000 </pre> </div> </div> <br> <p class="center"> The Kabasa guest house and restaurant is situated just a<br> few metres from the worlds second largest fresh water<br> Lake Victoria. We welcome you to come and experience our<br> accommodation with excellent service at affordable rates.<br> </p> <br> <img src="Images/d4.jpg" class="center"/> <br> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> HTNL of the menu page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxxxx xxxxxxxx xxxxxxxxx Tel: +0000000000 </pre> </div> </div> <h2>Menu</h2> <div id="menucenter"><b>We offer a full continental buffet breakfast table service by order.</b> <b>We also offer room service.</b></div> <div id="menu"> <pre> <u>Full Breakfast</u> Our full breakfast gives you a choice of the following: Fruits : Pineapple, Watermelon, Sweet Banana, Pawpaw, Oranges Fresh Juice : Passion, Mango, ****tail Cereal : Weetabix or Corn flakes served with cold or warm milk Toast, sausages, eggs and bacon <u>Beverages</u> Drinking chocolate, Tea, Nescafe, Milo <u>Snacks</u> Sandwiches (by order), chips, sausages, beef rolls, samosas (chicken, beef and vegetables), meat pie, cakes. <u>Main meals/courses</u> Chicken Curry, Chicken Masala, chicken stew, butter chicken, boiled chicken, chicken biriani, chicken wet fry. All served with Rice, ugali, chapatti, pasta, spaghetti and vegetables with garnishing Beef Stroganoff, beef stew, beef curry, fried beef, boiled beef, beef masala Whole (stewed or fried) tilapia, Fish fillet in coconut source, Fresh (stewed Tilapia), Whole (masala) Tilapia All Served with rice, ugali, chapatti and vegetable garnishing <u>Soups</u> Vegetable cream, Tomato cream, French onion soup, Served with Crotons. Traditional Kenyan Vegetables served with Ugali, Rice, Mash Potatoe, Boiled Potatoes, Baked Potatoes and fried vegetable rice <u>Salads</u> Kachumbari, we also have a number of assorted fruits and vegetable salads. <u>Burgers</u> Cheese beef burgers, Egg beef burgers, Beef burgers <u>Choma Zone</u> T-bone steak (400gms), pork chops, barbeque chicken, prime fillet steak <u>Beers</u> Tusker, White Cap (Tusker Malt), Guinness, Smirnoff ice (black and red) <u>Juices</u> Soda, Alvaro, Novida, Mineral water, Passion, Avocado </pre> </div> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> CSS: Code: body { margin:2% 4%; font-family:'lucida grande',tahoma,helvetica,sans-serif; font-size:11pt; color:#006; background:#ffc; } #navbar { float:left; width:12%; margin:0; padding:0; font-size:20px; list-style-type:none; } #navbar li { margin-bottom:2px; } #navbar a { display:block; padding-left:8px; background-color:#cff; } #navbar a:hover { color:#000; background-color:#fff; } #header { margin-left:%; } h1 { text-align:center; margin-right: 10%; } #address { width:182px; padding:0 4px; margin: auto; font-family:arial,sans-serif; font-size:10pt; font-weight: bold; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } h2 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h3 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h6 { margin: auto; left:0; right:0; width: 655px; font-weight: bold; font-size: 10pt; font-family: arial, sans-serif; } #rates { padding:8px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #rates span { text-decoration:underline; font-weight:bolder; } #menu { margin: auto; left:0; right:0; width: 675px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #menucenter { text-align: center; } p.center { text-align: center; } img.center { margin-left: auto; margin-right: auto; display: block; } #footer { clear: both; width: 100%; font-family: Arial Unicode MS; font-size: 8pt; text-align: center; } Many thanks Jackie I can't figure out how to script an image so that it slides to another area on the page when clicked on. For example, a logo that appears in the center of a blank page (vertical-align: middle), but when clicked slides smoothly to the top (vertical-align: top). Alternatively, it could be that clicking the image changes the vertical-align property of the entire table or cell. Either way, I can't figure out how to do this with a smooth animation. A fantastic example of this--where I got the idea, in fact--is the front page of tumblr.com, where clicking "Log in" smoothly slides the tumblr logo from the top of the page to the center. How is this done? I'm sorry if the solution is mind-bogglingly simple, I'm kind of a noob. But I've racked the web and I can't seem to find a script that does this. Can somebody please help? Thanks so much. In a webpage, I have a link to a photo: <a target="_blank" href="myURL"> where myURL just points to a jpg image. When the jpg is presented, I'd like right clicks to be disabled. Is there a way to do this? I don't want right clicks disabled on the main page, just the target jpg. Thanks in advance for any help. Hi there, you might remember me from this thread. (which was resolved by Mandarin, thanks you!) Now Im back with another, kind of the same thing: "Click -> Locate page -> & then slide down?" Allow me to explain: So ive got this header.php right. And the header file is included at every page. All the links in the header.. link to 1 file. (diensten.php) BUT, each link links to different areas within that file... So what I would like to achieve is that when a link in the header is clicked, it slides down to the correct page-area. Porblem is.... after clicked, is doesnt even go the right page. I think the smooth slider jquery-plugin is interfering someway. I already laid down the groundwork inside the header. Please have a look here. Would my wish be possible? Or should I just lay it to rest? Thanks. i'm using 6 iframes in a page my page has scrolling whlie i click a link on top most iframe the page has been slide down the scroll bar comes to middle plz help me Ladies and gentlemen, I'm just a beginner to HTML. I'm trying to develop my own web page but there is still lots of things under construction. Now just the home page and some of hyperlinks are finished and available. Most of other hyperlinks are unavailable and under construction, that's why when I click over these unavail. hyperlink, the browser always tell me "the page can not be displayed"... My idea is that I would like to know how to displayed a specific page which has the message "Sorry, this page is currently under construction". So everytime I cick over any link that is unavailable, it will show me this particular page with the message on... Does anynbody know how to do this, could you please advise me how to write code to get this done. Please help me, your help is highly appreciated... Many thanks & best regards, Hao. I have a register and login page and would like to add an autoresponse email. The end result being when people register they have to click a link in their email before being able to login. Essentially to stop fake email addresses being used. All the coding works well but I'm having trouble adding the autoresponder part. The current code is below. Can anyone help? I'll buy you all kinds of cakes and fizzy pop if you can. :-D <?PHP ob_start(); //Connect to enter the information into the fields $link = mysql_connect('localhost','bangers', 'andmashme') or die("Could not connect"); mysql_select_db('bangers') or die("Could not select database"); //Todays date $date = time(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>BANGERS AND MASH: VIEW PICS LOGIN</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <link href="III.css" rel="stylesheet" type="text/css"> </head> <body ><center> <body bgcolor="white"> <img src="banner.png" width="597" height="159" border="0"> <!-- ----------------------------------------------PALN A PARTY--------------------------------------------------------------------------------------> <div class="leftcontent"> <div class="leftTop">.</div> <p class="boxtext"> <font color="black"><font face="Courier New"> <b>Welcome to the weekly updated... <br> BANGERS AND MASH GALLERY!</b> <br> Take a moment to register, & Existing users proceed to the enter gallery section</p> <p class="boxtext"> <font color="black"> <div class="leftbottom"></div> <div id="clear"></div> <div class="leftTop"></div> <? if ($type == 'login') { //LOG IN AREA $sql_check = mysql_query("SELECT * FROM `gallerytable` WHERE 1 AND `email` LIKE '$email2' LIMIT 0 , 30") or die ("Unable to get results."); $auth_list = mysql_fetch_array($sql_check); function CheckEmail($Email = "") { if (ereg("[[:alnum:]]+@[[:alnum:]]+\.[[:alnum:]]+", $Email)) { return true; } else { return false; } } if (mysql_num_rows($sql_check) > 0 && CheckEmail($email2)) { $email = $auth_list['email']; $cookie_data = $email.':'.$date; setcookie('galleryid', $cookie_data, time()+1118640); echo ' <p align="right" class="boxtext"> <h2>PLEASE WAIT....</h2> </p>'; echo "<meta http-equiv=\"Refresh\" content=\"0; url=gallery2.php?contentfolder=". date("Y") ."\">"; } else { echo ' <p align="centre" class="boxtext" font color="black"> <h2>FAILED</h2> <h2>This email has not been registered with us. <br>Please go back and register in order to view the gallery.</h2> <a href="javascript:history.go(-1)"><img src="back.jpg" width="104" height="41" border="0"></a> </p>'; } } else if ($type == 'register') { // CHECK EMAIL FUNCTION //*********************** function check_email_mx($email) { if( (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email)) || (preg_match('/^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/',$email)) ) { $host = explode('@', $email); if(checkdnsrr($host[1].'.', 'MX') ) return true; if(checkdnsrr($host[1].'.', 'A') ) return true; if(checkdnsrr($host[1].'.', 'CNAME') ) return true; } return false; } // Check if its in there $result=mysql_query("SELECT * FROM `gallerytable` WHERE `email` = '$email'"); // IF email is ok if (!check_email_mx($email)) { echo ' <p align="right" class="boxtext" font color="black"> <h2>EMAIL ERROR</h2> <h2>You have entered an incorrect email. <br> Please click the button below to go back and try again.</h2> <a href="javascript:history.go(-1)"><img src="back.gif" width="104" height="41" border="0"></a> </p>'; } elseif (mysql_num_rows($result) <= 0) { //Puts deatils into the bangers database $insert=mysql_query("INSERT INTO `gallerytable` (`id`, `fname`, `sname`, `email`, `telno`, `date`) VALUES ('', '$f_name', '$s_name', '$email', '$mobile', '$date')")or die('couldn\'t Insert record into bangers database :'.mysql_error()); echo ' <p align="right" class="boxtext" font color="black"> <h2>THANK YOU FOR REGISTERING!!</h2> <h2>Your details have been registered with us and will not <br>o the login section to view images.</h2> <a href="javascript:history.go(-1)"><img src="back.gif" width="104" height="41" border="0"></a> </p>'; } else { echo ' <p align="right" class="boxtext" font color="black"> <h2>REGISTERED</h2> <h2>YOUR DETAILS HAVE ALREADY BEEN REGISTERED WITH US. PLEASE PROCEED TO THE ENTER GALLERY SECTION.</h2> <a href="javascript:history.go(-1)"><img src="back.jpg" width="104" height="41" border="0"></a> </p>'; } } else { echo ' <table width="800" boder="0" align="center"> <table width="600" border="0" align="center"> <tr> <td valign="middle" colspan="2" align="center"><p><img src="register.gif" width="227" height="26" /></p> </td> <td valign="center" colspan="2" align="center"><img src="entergallery.gif" width="227" height="24" /> </td> <td> </td> <tr> <td width="300" valign="middle"> <p><strong><img src="required1.gif" width="227" height="31" /></strong></p> </td> <td width="300" valign="middle">  </td> <td width="300" valign="middle"> <form name="login" method="post" action="'.$_SERVER['PHP_SELF'].'"> <img src="email1.gif" width="227" height="24" /> <td width="300" valign="middle"> <input name="email2" type="text" size="16" class="Field" /> </td> <tr> <td> </td> <td> </td> <td> </td> <td width="300" valign="middle"> <input name="type" type="hidden" value="login"/> <input name="Submit" type="image" class="submit" value="Submit" src="submit.gif" align="right"> </form> </td> <tr> <td width="300" valign="middle"> <form name="register" method="post" action="'.$_SERVER['PHP_SELF'].'"> <p><img src="name1.gif" width="227" height="27"/> <td width="300" valign="middle"> <input name="f_name" type="text" class="Field" id="f_name" size="16"/> <tr> <td width="300" valign="middle"> <p><img src="surname1.gif" width="227" height="28" /> <td width="300" valign="middle"> <input name="s_name" type="text" class="Field" id="s_name" size="16"/> <tr> <td width="300" valign="middle"> <p><img src="email1.gif" width="227" height="24" /> <td width="300" valign="middle"> <input name="email" type="text" size="16" class="Field" /> <tr> <td width="300" valign="middle"> <p><img src="emailconfirm1.gif" width="227" height="25" /> <td width="300" valign="middle"> <input name="confemail" type="text" size="16" class="Field" /> <tr> <td width="300" valign="middle"> <p><img src="mobile1.gif" width="227" height="22" /> <td width="300" valign="middle"> <input name="mobile" type="text" size="16" class="Field" /> </td> <tr> <td width="300" valign="middle"></td> <td width="300" valign="middle"> <input name="type" type="hidden" value="register"/> <input name="Submit" type="image" class="submit" value="Submit" src="submit.gif" align="right"> </p> </form> <br/></td> <td width="5"/> </form> </td> </tr> </table> '; } ?> </p> <div class="leftbottom"></div> </div> <!--END NEWS --> </div> </div> </body> </html> This is the first website I've built and I've learned a ton using Dreamweaver. I'm having trouble with the "Start Now" button (left bar) at the home page for http://www.physicianlending.com. Not sure what I'm doing wrong. I thought I might need javascript, but that doesn't seem to work either. <td width="210" class="sidebarText" id="padding" align="center"> <a href="ContactMeForm.html" class="button"> <input type='image' src='startnow.gif' alt='startnow' /> <script type="text/javascript" src="ContactMeForm.html"></script> </a></td> The button appears to work fine with Firefox (mac) and Safari (mac), but on IE it's showing there's a syntax error. I'd be very grateful and much obliged for any assistance. Thanks! is there a way on clientside, to perform a "click" programmatically on a TD? if so, how? its kind of like doing the submit() on a button, except I want to perform a click/submit on the TD Hey can you help me how do you make clickable images on html Ok, I'm wanting to add a text box to my site and when you click a button it'll open the letters in the text box as a url for my site For example, in the text box I have hello when I click the button it'll open up http://htmlforums.com/hello.htm I also need to know how to add .htm to after the string in the text box when you click the button. I also want this to open in the same window. Any help please? Thanks. Hello there, I designed my site at www.officelive.com, and I'm having a heck of a time getting a "no right click" code installed. There's really no access to the site's HTML except for viewing the source code. Even when I simply copy the site's code and paste it back in an HTML module, it's all messed up. Can I have you take a look at a little sample site I did and see what you can do? Worse comes to worse, I can always put my site with a different host where I can use the no right click code. Please email me. L J Hi: My simple website has 4 .jpg pics on it (one in each corner of the page) and text all thru the middle. These pics (and test) show perfectly when my form is first loaded. However, when the user 'clicks' on the submit button, and I re-send the same page, those four pictures disappear and the 'alt=xxx' statement appears in place of the pics. THe text still shows perfectly. Question: Why don't the pics appear on the second and subsequent times ?? I'm puzzled, because the page I'm sending is identical in all cases. Thanks for any insights on this. -Mel Smith Mesa, Arizona Hi guys, I want to create a "one click - two action" link within my site, but I can't seem to find out how to do it... I've got some DJ mixes in RealAudio (.ra) and when someone wants to listen to the file I want a 'openwindow' or 'popup' to open at the same click (as the RealPlayer opens and starts playing). In the window that opens I want to display the track listing of the mix. I got some suggestions with something like this: <A HREF="javascript: openWindowSized('http://www.webpage.com/mix.html',300,350); http://www.webpage.com/mix.ra">Listen here</A> But that's not working and I'm not all that great at HTML and I can't seem to figure out how to do this... Anyone have an idea?! THANKS ! C. Free rating and commenting system! http://js-kit.com/ includes polls,navigator and reviews system if needed! just copy and paste the provided code into your HTML and thats it! i got mine set up! visit http://www.ninjamoviesonline.com/videos.html for an example!! Hello guys. I really need your help. I whant to put a clickable image i my wordpress blog and have a click counter under it. I also want that the images only is clickable x amount of times ex. 2000 times and after that a new image will take it place saying, Thank you we have reached the total limit bla bla, this image should not be clickable anymore. the same ip only once. How can i do this thank you |