HTML - Text That Calls Javascript? (without Triggering Ie's "click" Sound)
I've run into a problem. I've got hyperlinks triggering a JS function, using this code:
Code: <A href=javascript:MyFunc()>Clickable text</A> The JS function I'm triggering is used to artificially update the browser history. (This is because of AJAX requests, and I'm doing it using the Really Simple History library.) Now, unfortunately, updating the browser history triggers IE's "click" sound. That would be fine except the hyperlink also triggers that sound, so you get two clicks in close succession! If possible I'd like to disguise one of them so you only hear one click. I can do this by triggering the JS function with a FORM button instead of a hyperlink. But then you lose the CSS attributes that you can decorate hyperlinks with. I want it as much as possible to look like a normal website. So what I'm after is a way to make clickable, "decoratable" text that triggers JS without triggering the click sound. In other words, a silent hyperlink. Is there such a thing? Thanks in advance, Seymour. Similar TutorialsHey, I'm trying to write some code for expanding and concealing text You can see this in action at youtube when you click the (more) button to expand text. Suppose I had a heading: MyHeading and a body of text: MyTextHere How do I make it so that when you click MyHeading it makes MyTextHere (initially not visible) appear, and when you click MyHeading again, it makes MyTextHere disappear? Thanks Alot. Hi all, I am currently working on a website using Dreamweaver CS3. Whenever I view the (currently very basic) site in Firefox I get the line of code I entered as the title of this thread at the top of the page (directly above the banner) as if I had just typed it into the canvas area (correct term?). Whenever I view it in IE it appears just fine, not sure about other browsers though. I began by creating a template and adding it to the page you see he HTML Code: http://www.geocities.com/makotronic/indexx.htm Here is the code for the template: Code: <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- TemplateBeginEditable name="doctitle" --> <title>Template for Parish Website</title> <!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --> <!-- TemplateEndEditable --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } body,td,th { font-family: Arial Narrow, Verdana, Arial, sans-serif; } .style5 {font-size: 14px} --> </style></head> <body> <table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><img src="../Images/welcomebanner.gif" width="750" height="125" /></td> </tr> <tr> <td width="160"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="590" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td valign="top"><!-- TemplateBeginEditable name="Main Body" -->Main Body<!-- TemplateEndEditable --></td> </tr> </table></td> </tr> </table> </body> </html> And for indexx.htm (I added a second 'x' because I already had a 'index.htm' file in GeoCities): Code: <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/template.dwt.asp" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Welcome to the Greencastle Parish Website</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style8 { font-size: 36px; font-weight: bold; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } body,td,th { font-family: Arial Narrow, Verdana, Arial, sans-serif; } .style5 {font-size: 14px} --> </style></head> <body> <table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><img src="Images/welcomebanner.gif" width="750" height="125" /></td> </tr> <tr> <td width="160"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="590" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td><!-- InstanceBeginEditable name="Main Body" --> <span class="style8">Header</span> <p class="style3">Main Body</p> <!-- InstanceEndEditable --></td> </tr> </table></td> </tr> </table> </body> <!-- InstanceEnd --></html> Cheers for any help! Niall 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! http://www.colletts.co.uk/winter_dolomites.htm I have the above page that redirects users to my Winter Website - the HTML below isn't valid W3C does anyone know of a better and valid way to get this done? Cheers, Mas HTML Code: <META HTTP-EQUIV="Refresh" CONTENT="2.5;URL=http://www.colletts.co.uk/winter/winter_dolomites.html" /> A customer gave me a Word doc that they want turned into a printer friendly web page. I understand that there are tons of ways to do this but I really want the answer to the subject. What i'm referring to is a form that someone can print from the browser and "fill in the blanks" on the page where there are "underscores". My question is how to code those underscores. I tried manipulating the <hr> tag but it's putting way too much space in between each <hr>. I've already coded a "fill in the blank" line using <u> nbsp;</u> but that looks very messy. What do you guys/gals think? I was hoping someone could clue me in as to whether or not this would be possible. I'm thinking it isn't but I need to make sure. I'd like to provide a file for people to download on my website, but when they click on the link and the download window appears I don't want them to have the option of opening it. Is it possible to only give them the option to save the file? Sounds incredibly unlikely but I gotta know. Hello, I want to load a page in a iframe, and when i do this, i want that page to be displayed not at the begining of that page, i want that page to be displayed at a "x" and "y" position specificated by me. How can i do that? Thank you. hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. Code: <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; } function hideme(){ document.getElementById("hid").style.visibility="hidden"; } </script> </head> <body> <form name="myform"> <table width="100%" border="4" cellpadding="2" cellspacing="2"> <tr> <td class="tableheader" colspan="9">TS </td> </tr> <div style="visibility:hidden" id="hid"> <tr> <td width="17%" class="labeltext">Tran Code</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext">Name</td> </tr> <tr> <td width="17%" class="labeltext">Product Type</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext"> </td> </tr> </div> <tr> <td> </td> </tr> </table> <input type="button" onclick="callme()" value="show"> <input type="button" onclick="hideme()" value="hide"> </form> </body> </html> thx in Adv, Hanm. I am having a problem with a web page that when I use the echo statement and try to output data to the web page in a table the data in the table pushes the data from another row down the page. What should I do to stop this from happening. I am using adobe dreamweaver. Thanks a lot!! hello friends, I want to display the text in a textbox. But I dont want the user to edit it. How can the remove this editing feature in the text box. If possible can you please give me a sample code. Hi, I have a problem with validating Strict XHTML 1.0 ... The tag: "option" doesn't have an attribute: "onchange" in currently active versions.[XHTML 1.0 Strict]... Is there a way around this? Here's the code:. <select name="birth_month" onchange="form_d('yes');" size="1" style="width:8em"> <option<?php echo empty($a_birth_month)?' selected="selected"':''?> value="" onchange="form_d('yes');" >Month</option> Thanks Only another million pages to go. Rather than write them out i took a screenshot. So how do i get past those? Hello again. Hope you had a wonderful Christmas. =) I think I have a better way to ask my question. I'm trying to do something similar to this webpage. ....If you copy ANY PART of the lyrics, you'll see the website's name and URL "magically" appear when you paste it. I want to do something like this. When I looked at the source code for the webpage, I got REALLY confused. Not sure if they're using a script or some CSS to do this. And I doubt I'll get a response if I emailed them, because (1) this site looks REALLY big, so they might not reply to emails, and (2) I don't speak fluent Japanese. Really hope someone can figure out how I can do this. Thanks in advance!!! Hello all, I am looking for help with something that I know is pretty simple. http://www.somesite.com/refer.htm?4 Upon loading the page, I want to take the value following '?' and post it inside a text area form on the page. Im very new to html and javascript so im not sure exactly how to achieve this. Thanks for the help. Hey Guys, Firstly I'm very new to using HTML and "programming" general, so I'm sorry if I come across as dumb New to the forum also and signed up as I couldn't fine help elsewhere on this problem. I'm attempting to write a simple HTML form that will eventually print to a .txt file. The basics of it is d: <input type="text" name="hnmr_shift1" /> H's: <input type="text" name="h_s1" /> Multiplicity: <input type="text" name="multiplicity1" /> J coupling:<input type="text" name="j_coupling1" /> <br /> which is repeated and repeated over and over (about 25 times) I was wondering if there's a to have the user select how many of these they would like (in a drop down box or something along those lines) and it will pop up with x amount of rows of the above boxes. i.e if the user selects 3 you would see something like d : (box) H's : (box) Multiplicity : (box) J coupling : (box) d : (box) H's : (box) Multiplicity : (box) J coupling : (box) d : (box) H's : (box) Multiplicity : (box) J coupling : (box) I've seen similar things on forms were it asks you something like "how many people...." and when you select a number it will pop up with separate boxes for each persons name and details (first name, second name phone number etc.). was thinking of using javascript or something along those lines hope this makes sense. cheers Aaron ps. I want to avoid php as this form will be running on school computers and I cbf setting up a server etc. for it to run. the idea of the form is that it can be booted easily from a USBDrive without any problems or permission issues. Here is the code: <marquee behavior="scroll" scrollamount="1" scrolldelay="15" direction="up" width="250" height="87" style="font-family: Verdana; font-size: 9pt;"> <font color = #ffffff><h5> Komatsu NTC Ltd. Launches Special <br> Machining Center Promotion<br> </h5> <i>Promotion Ends December 6th.<br> To Learn More, Click </font><font color= #b8382d> NEWS. <href="news.html"></font></i> </marquee> Now, how do I have it stop at the last (and stay)? Thanks! Hi, I am required to save entries from 3 text boxes into a text file on clicking a submit button. Can anyone help please. Regards Shrekpete Hi Folks, I've got my form dynamically generating text fields (which are contained in a form which is in another) and other objects and now I want to give them the "onchange" attribute. I have a lot of code so I'll keep it as small as possible. Here is the function that generates text fields function createText( inputForm, txtName, txtValue, txtWidth ) { var newTxt = document.createElement( "INPUT" ); inputForm.appendChild( newTxt ); newTxt.name = txtName; newTxt.setAttribute( "STYLE", "position:relative; left:20px; width:" + txtWidth + "px;"); newTxt.type = "TEXT"; newTxt.value = txtValue; newTxt.id = txtName; newTxt.onchange = "some_function( this.value )"; return newTxt; } The function for responsible for creating the form is: function createNewForm() { // Main form is a global reference to the main body mainForm = document.getElementById( "adminForm" ); var profileForm = document.createElement( "FORM" ); mainForm.appendChild( profileForm ); profileForm.method = "POST"; profileForm.name = "Profile"; profileForm.id = "ProfileForm"; return profileForm; } This function calls the profile creation form and specifies the objects that will appear on the form. function profileForm() { // Delete and reassign current form if( currentForm != "") deleteForm( currentForm ); currentForm = "ProfileForm"; var newProForm = createNewMenuForm(); newProForm ( menuForm, "Item1", "data1", 140 ); newProForm ( menuForm, "Item2", "data2", 140 ); newProForm ( menuForm, "Item3", "data3i", 140); return newProForm; } I've seen examples of objects being created by JavaScript and they work just fine. Anyone have any suggestions or have an idea where I can find some more info? Thanks! I have this: Code: <script language="Javascript1.2"> document.write('<a href=onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('nav_email','','images/nav_email-over.gif',1)" "javascript:void(0)" onclick=window.open("/recommend/recommend.php?loc='+window.location.href+'","","height=280,width=230,top=150,left=300,toolbar=no,menubar=no,location=no,status=no,resizable=0")><img src="images/nav_email.gif" alt="email page" name="nav_email" width="29" height="24" class="imgborder1"></a>'); </script> but the image wont show up. I have an image that has a mouseover/out rollover effect. I also have it pop up a new window with a "recommend this page to a friend" script. I can't figure out why the image wont show up, it's like it's invisible. Hello folks, I have written some html, xhtml possibly, which has an href to another page, the second page being in frames and in a new window. It worked fine on an Me but now in XP it won't open the 2nd window (from the link in the first) saying it can't locate file bla bla bla, check the address.... The odd thing is where there were gaps in the address which I blocked in with a " %20 " for the browser to recognise, its saying its looking for the right address but with a 25 where all the %20's are, as well as the twenties themselves, so they now appear as "html%2520code" for example. When I open the file that is the target of the link I get the typical white file not found page, but it is dividing the screen as the frames of that file tell it to do. I would appreciate somebody telling me what the error could possibly be |