HTML - Need Help With Some Function!
Hi all,
Currently i'm setting up a website for my company, and the website require a function whereby need to do a monthly donation using credit card. This is the part where u don't know what to do. Do I need any software or juz pure coding will do ah? Any kind soul willing to help me out? Thanks Similar Tutorialshi friends, I have problem with tag <div>,i don't know how to use this tag. can u tell me how to use this tag and give me some examples. thanks before Regards Hendra Hello all (this is my first post). I have recently completed an online portfolio for myself which contains a contact form using form validation in Javascript. Testing (and showing off the site) at work the form didn't run the Javascript on the computer there (in IE 'whatever the new one is'). I was wondering if someone could help with the noscript function so, if Javascript is disabled, then the submit button on my form was replaced with some text along the lines off 'Javascript disabled, enable it to use this form'. Here's my code for the form: HTML Code: <form name="contact_form" method="post" action="mail.php" onsubmit="return validate_form();"> <p>Full Name <em>(required)</em>:<br /> <input class="tb-focus" type="text" name="name" id="name" size="40" value="" /></p> <p>Email Address <em>(required)</em>:<br /> <input class="tb-focus" type="text" name="email" id="email" size="40" value="" /></p> <p>Business Name <em>(if applicable)</em>:<br /> <input class="tb-focus" type="text" name="business" id="business" size="40" value="" /></p> <p>Contact Number <em>(required)</em>:<br /> <input class="tb-focus" type="text" name="number" id="number" size="40" value="" /></p> <p>Message <em>(required)</em>:<br /> <textarea class="tb-focus" name="message" id="message" rows="6" cols="40"></textarea></p> <p><input class="button" type="submit" value="Submit Form" /></p> </form> Sorry for reposting this; I accidentally put it in the wrong section. Hi all, this is my first post on this forum, and I hope you'll excuse my ignorance for the time being. I am by no means an expert of HTML, but my friend and I are attempting to get a few sites up and running, and we need some help. I can imagine this question has been asked dozens of times, but I'm hoping you can help. What we want for our site is a search function, where the user can input any word or series of words, and, our site being filled with links, get a list of links that have ever been on the site. We want to make sure the links pop up in the same template as our home page, as well. I understand I may need to use some PHP or JavaScript code to get this done, but I was wondering if there was an easy way to do this, for a web designing ignoramus. Also, we want to have subscribers, and have registered log-ins. Something where people can put in their user name, and then be able to leave comments. Please let me know what I can do. Thanks in advance! I need a button that when i click it, it will change the text of a textbox, like when i click the button it will change the text in the textbox to "hi" (i need several button's, and each button will change the text to somethign different) It would be better if the script was in html because the site i use doesnt support many javascript or css tags, but it will support any html tags. Please help! Hi I have loging screen it invokes a html output via php coding. < Code: script type="text/javascript" src="tablesel.js"></script> </head> <body> <menu><ul ondbclick = "process()">BILLITEM</ul> <ul ondbclick = "process()">BILLMAIN</ul> <ul ondbclick = "process()">BILLOFMATL</ul> <ul ondbclick = "process()">BUYER</ul> <ul ondbclick = "process()">CHASSISMASTER</ul> <ul ondbclick = "process()">CODEMAST</ul> <ul ondbclick = "process()">CONTRACTMAST</ul> <ul ondbclick = "process()">CONTRACTOR_CANTEEN</ul> <ul ondbclick = "process()">CONVMASTER</ul> <ul ondbclick = "process()">COSTCENTRE</ul> <ul ondbclick = "process()">COST_PRODUCTMAST</ul> <ul ondbclick = "process()">COST_SPEC</ul> <ul ondbclick = "process()">CUSTMAST</ul> <ul ondbclick = "process()">DEPTMAST</ul> <ul ondbclick = "process()">EMPLMAST</ul> but ondbclick is not working on this element. first i dont know whether this event will work or not in that element so please help me. kanish I am building a prototype for a retailer, with show-hide layers and swap and restore images. I have 3 DIVs with different images in each (first is for color swatches, second is for size range and third one is for size). When I mouseover and mouseout I have it set up to show and hide layers. When I click an image it will swap to show what is not available for it (size, color or size range). I have 3 states for the images (active, onclick and out of stock). Right now when I click say in a color (it shows that is selected and it is showing what is not available for that color) then when I click on size range the color I clicked before it will restore to the not selected option. And then when I click on the size the size range image will restore to it's original state. What I need to do is set it up in a way that when I click a color then a size range and then a size all 3 images will show the onclick state and will show what is not available for that particular image. You can go to http://www.oldnavy.com/browse/produc...scid=598256012 and see how when you click in each section (color, waist and legth) will restore, but if you click a color then a waist and then a length everything will be selected. I know this is done in javascript and probably is calling a database, and what I have is with images and in another process but hopefully I can get it done. Hopefully someone can help me with this, here is part of the head code: HTML Code: function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } Here is part of the body code: HTML Code: <div class="spaceafter"><b>select color:</b> <div id="apDiv2">black</div> <div id="colorcardiganblack">black</div> <div id="colorcardigangray">medium heather gray</div> <br /> <a href="#Here"><img src="images/swatch_cardiganblackON.gif" name="cardblackon" class="swatches" id="cardblackon" onclick="MM_swapImage('blackcardigan','','images/B2_cardiganblack.jpg','cardblack','','images/swatch_cardiganblackON.gif','plus','','images/X6_sizerangePlus_DA.gif','1x','','images/X6_size_1x_DA.jpg','2x','','images/X6_size_2x_DA.jpg','3x','','images/X6_size_3x_DA.jpg',1);MM_setTextOfLayer('apDiv2','','black')" onmouseover="MM_showHideLayers('layplusDA','','show','lay1xDA','','show','lay2xDA','','show','lay3xDA','','show','SOLblkcardigan','','show')" onmouseout="MM_showHideLayers('layplusDA','','hide','lay1xDA','','hide','lay2xDA','','hide','lay3xDA','','hide','SOLblkcardigan','','hide')"/></a></a><a href="#Here"><img src="images/swatch_cardigangrey.gif" name="cardgrey" class="swatches" id="cardgrey" onclick="MM_swapImage('blackcardigan','','images/B2_cardigangray.jpg','cardblackon','','images/swatch_cardiganblack.jpg','cardgrey','','images/swatch_cardigangreyON.gif','lg','','images/X6_size_large_DA.jpg','2x','','images/X6_size_2x_DA.jpg',1);MM_setTextOfLayer('apDiv2','','medium heather gray')" onmouseover="MM_showHideLayers('lay2xDA','','show','laylgDA','','show','layB2cardgray','','show','cardblack','','show','SOLgrycardigan','','show')" onmouseout="MM_showHideLayers('lay2xDA','','hide','laylgDA','','hide','layB2cardgray','','hide','SOLgrycardigan','','hide')"/></a></div> <div class="spaceafter"><b>select size range:</b> <div id="apDiv3">none</div> <div id="apDiv3m">misses</div> <div id="apDiv3pt">petites</div> <div id="apDiv3pl">plus</div> <br /> <a href="#Here"><img src="images/X6_sizerangeMisses_EAgif.gif" name="misses" border="0" usemap="#missesMap" class="options" id="misses" onclick="MM_swapImage('misses','','images/X6_sizerangeMisses_ON.gif','1x','','images/X6_size_1x_DA.jpg','2x','','images/X6_size_2x_DA.jpg','3x','','images/X6_size_3x_DA.jpg',1);MM_setTextOfLayer('apDiv3','','misses');MM_setTextOfLayer('apDiv5','','<font size="2" color="#666666"><b>original $50.00; <font color="#FF0000">now $34.99</font></b></font>')" onmouseover="MM_showHideLayers('lay1xDA','','show','lay2xDA','','show','lay3xDA','','show','apDiv3','','hide','apDiv3m','','show','apDiv3pt','','hide','apDiv3pl','','hide')" onmouseout="MM_showHideLayers('lay1xDA','','hide','lay2xDA','','hide','lay3xDA','','hide','apDiv3','','show','apDiv3m','','hide','apDiv3pt','','hide','apDiv3pl','','hide')" /></a><a href="#Here"><img src="images/X6_sizerangePetites_EA.gif" name="petites" class="options" id="petites" onclick="MM_swapImage('petites','','images/X6_sizerangePetites_ON.gif','xl','','images/X6_size_xlarge_DA.jpg','1x','','images/X6_size_1x_DA.jpg','2x','','images/X6_size_2x_DA.jpg','3x','','images/X6_size_3x_DA.jpg',1);MM_setTextOfLayer('apDiv5','','<font size="2" color="#666666"><b>original $50.00; <font color="#FF0000">now $34.99</font></b></font>');MM_setTextOfLayer('apDiv3','','petites')" onmouseover="MM_showHideLayers('lay1xDA','','show','lay2xDA','','show','lay3xDA','','show','layxlgDA','','show','apDiv3','','hide','apDiv3m','','hide','apDiv3pt','','show','apDiv3pl','','hide')" onmouseout="MM_showHideLayers('lay1xDA','','hide','lay2xDA','','hide','lay3xDA','','hide','layxlgDA','','hide','apDiv3','','show','apDiv3m','','hide','apDiv3pt','','hide','apDiv3pl','','hide')"/></a> <a href="#Here"><img src="images/X6_sizerangePlus_EA.gif" name="plus" class="options" id="plus" onclick="MM_swapImage('blackcardigan','','images/B2_cardigangray.jpg','cardblack','','images/swatch_cardiganblack_DA.gif','plus','','images/X6_sizerangePlus_ON.gif','sm','','images/X6_size_small_DA.gif','m','','images/X6_size_medium_DA.jpg','lg','','images/X6_size_large_DA.jpg','2x','','images/X6_size_2x_DA.jpg',1);MM_setTextOfLayer('apDiv5','','<font size="2" color="#666666"><b>original $54.00; <font color="#FF0000">now $39.99</font></b></font>');MM_setTextOfLayer('apDiv3','','plus')" onmouseover="MM_showHideLayers('lay2xDA','','show','laylgDA','','show','laycardblackDA','','show','laysmDA','','show','laymDA','','show','apDiv3','','hide','apDiv3m','','hide','apDiv3pt','','hide','apDiv3pl','','show')" onmouseout="MM_showHideLayers('lay2xDA','','hide','laylgDA','','hide','laycardblackDA','','hide','laysmDA','','hide','laymDA','','hide','apDiv3','','show','apDiv3m','','hide','apDiv3pt','','hide','apDiv3pl','','hide')"/></a></div> Am I asking too much? Is there anyone out there can help me with this? I only know basic javascript, this is way out of my league! Thank you MC not sure how to integrate this code, I have tried a couple of different ways but I have failed and now I am here looking for help the current code on my site is which is only for looks Code: <tr> <td width="35%" align="right"> <img border="0" src="images/search.gif" width="94" height="13" /></td> <td width="37%" valign="bottom"> <input type="text" name="search" class="inpbox" size="16" /> </td> <td width="24%" valign="bottom"> <a href="#"> <img border="0" src="images/go.gif" width="27" height="16" /></a></td> </tr> </table> </td> and i want to add to make it function is Code: <form action="/cgi-sys/entropysearch.cgi" target=searchwindow> Search Query <input type="text" name="query" value=""> <input type="hidden" name="user" value="dm1817"> <input type="hidden" name="basehref" value="http://disneymagic.ca"> <input type="hidden" name="template" value="default"> <input type="submit" value="Search"> </form> Hi everybody. Can someone come up with code that will give me the same back function that Internet Explorer has at the top of their page ? Thanks Launchnet Hey. I'm not much of a coder really, but I got a slight idea of how it works. I got this script from a friend of mine, as a solution for opening two targets at once by clicking on just one link on the page. I'm using tables and a couple of iframes, with both their two different name-tags in it. My problem is that whatever the target seems to be, it allways opens in two blank windows. My impression so far, is that the script in the head might seem to do a little bit too much regarding the hrefs itselves. Seems like it overruns the targets specified in those two lines. So, if anyone understands the contents of the script (which I don't) I'd be very pleased for any possible solution on this one. I've "pasted" some of the code (the part that matters) he <html> <head> <script type="text/javascript"> function openOtherLinks(id1, id2) { var link1 = document.getElementById(id1); var link2 = document.getElementById(id2); if(!link1.href || !link2.href) return; window.open(link2.href); document.location.replace(link1.href); } </script> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <a href="java script: openOtherLinks('tannoy1', 'tannoy2')">Tannoy</a> <a id="tannoy1" href="tannoy_overview.html" target="main"></a> <a id="tannoy2" href="tannoy_left.html" target="left"></a> <table> <tr> <td><iframe src="blank.html" width="152" height="455" align="center" frameborder="0" name="left" scrolling="auto"></iframe> </td> </tr> <tr> <td><iframe src="news.html" width="677" height="478" align="center" frameborder="0" name="main" scrolling="auto"></iframe> </td> </tr> </table> </body> </html> ... This wasn't exactly pasted directly from the file, so the table positions and sizes aren't real. The things that matters I believe, is the iframe tags and the href and the script in the header. And believe me, I've trid different things regarding positioning, tried to move the lines before and after each other etc. Even tried to put the IDed hrefs in after the </body>, and so on. Both before and after the iframe-tags as well. Won't make any difference. I've seen this used but I can't find any info on what it's meant to do. example: <<style>#saleDiv{display:none;}</style>> It's a user entered css on a social site. how do i run the function ddtreemenu:createTree("treemenu", true) in my XSLT file? Hey everyone, can anyone help me. i need to have a function on my web page which when you enter a word or sentence into a text box it will automatically appear in the subject line of your email. can anyone help me on that? thanx louise HI, I want to design the website throw the html without use the javascript and use the zoom function in my site can i do this function without use the javascript. Either this is possible and you know html code about the zoom function then you reply this problem. Thank you for advance. Hello there! I hope any HTML expert can assist me on the following matter: I am trying to place some rotating ads on my website. Those ads are located on the "ads.php" file. If my website was written in php I would know how to call that file with the function: <?php include("ads.php"); ?> Unfortunately, my website is in HTML (cannot be changed to PHP for other reasons) and I don't know any HTML function equivalent to the INCLUDE function for PHP. Does anyone know how could I call the ads.php file in HTML? Thank you! Unfortunately my website has to work in an offline mode too so no online solution is possible. The javascript engine cchana linked is unfortunately very limited and pretty much useless. Hi, Why isn't the following code calling the validateForm function? I am new to this so I am lost. And please excuse the messyness of the code as it is a work in progress. N.B. I have obviously taken out a lot of code but I think this is all I need to show you for you to be able to help <script language="JavaScript" type="text/JavaScript"> function validateForm(pform) { checkFirstNames(pform.firstNamesField.value); checkLastName(pform.lastNamesField.value); checkCurrentEmp(pform.currentEmpField.value); checkEmailAddress(this.emailAddressField.value); checkJobTitle(pform.jobTitleField.value); checkDegrees(pform.degreeField.value); checkApplication(pform.applicationField.value); checkAddLanguage(pform.addLanguageField.value); checkWebPage(pform.webPageField.value); } </script> <title> Job Application </title> </head> <body background="images/Border1.png" bgcolor="#ffffff"> <table width="500" cellspacing="2" border="0" id=menuTable> <tr><td> <table width="320" cellspacing="2" cellpadding="2" align="left" border="0"> <tr><td colspan=2><h3>Menu</h3></td></tr> <tr><td><a href="default.html" >Homepage</a></td></tr> <tr><td><a href="Application_Submit.htm" onclick="alert('Apply for a Job button clicked. Reloading page')"/>Apply for a Job</a></td></tr> <tr><td><a href="back.html" onclick="alert('Job Submission button clicked but is unoperative at this time')"/>List all Job submissions</a></td></tr> <tr><td><a href="back.html" onclick="alert('Lastest Submission button clicked but is unoperative at this time')"/>Show latest submission</a></td></tr> <tr><td><a href="help.html">Help</a></td></tr> </table> <table width="380" cellspacing="2" cellpadding="2" align="right" border="0"> <tr><td><form name="JobApplication" action="javascript:alert('Submit button clicked')" onsubmit="return validateForm(this.emailAddressField.value)"> Hi. I have a little problem. This is line of XHTML inside <form> tags: Code: <td> <label> <input type="button" name="submit" id="submit" value="Start" onClick="run()"/>Start</label></td> It invokes this Javascript function: Code: function run(){ setCategory(document.form1.Category.value) setLocation(document.form1.siteId.value) setMessage(document.form1.message.value) alert(document.form1.Category.value+" "+document.form1.siteId.value+ " "+document.form1.message.value) } This is part of REST web service web interface. The program works fine. But I need to submit form, thus I updated <input> in this way: Code: <td> <label> <input type="submit" name="submit" id="submit" value="Start" onClick="run()"/></label></td> The form is submitted but for some reasons part of program's business logic does not work any longer. I can't understand how this simple change can change anything. Regards |