JavaScript - Javascript Onclick Navigate Function
Hi there, I am wondering if it is possible to navigate anchor links using a button onclick event. I want next and previous hit buttons to navigate the already existing hits (#hit1, #hit2, etc.).
For instance, I have: Code: <script type="text/javascript"> var numHits = {HITS}-1; function nextHit(){ if(numHits > 0){ numHits--; } return("location.href=" '#hit" + numHits + " ' ");//added spaces for visibility } </script> <input type="button" value=">" onclick="nextHit()" /> I have tried onclick="nextHit();", onclick="nextHit(); return true/false", onclick=" return nextHit()" and a bunch of others, with no luck. I have seen working examples with the href tag (e.g. <a href="#" onclick="func();return false">), but nothing with buttons. I also can't seem to get the working href examples to work on my server. For instance, I cannot get this code to work, it just goes to js_required.html: <a href="js_required.html" onclick="doSomething(); return false;">go</a> function doSomething(){ alert("test"); } It seems so simple, I'm assuming I'm missing something very basic. I would greatly appreciate any help! ~Bobio Similar TutorialsHi guys. I have made a PHP script that queries a database and uses the reponse to display multiple radio boxes (using a while loop). What I would like to do is have the page URI updated when a radiobox is clicked, without the user having to press on a "Submit" button or something. This is where Javascript comes into play. As this is a while loop, there is no specific number of responses or prefixed names. I've found a lot of stuff on Google with functions calling ID's, and then if the ID matches do a predefined response. Of course that wouldn't work in this situation, and to be frank I don't need anything near as complex. What I'm looking to do is call a Javascript function to redirect the page to "...?location=<get location from PHP var>&id=<get ID from checkbox ID/name>". When the page reloads, I can then use the PHP $_GET["id"] function to display data. It sounds SO simple in theory! Can anyone help? What i've done (and failed): Code: echo "<form>"; while ($explode_count_dec > "0"): $while_query = mysql_query("SELECT * FROM printers WHERE ID LIKE '$explodedata[$explode_number]'"); $while_result = mysql_fetch_assoc($while_query); echo "<input type='radio' value='".$explodedata[$explode_number]."' name='printer' onClick='showmore(".$explode_number.")' />".$while_result["Model"]." <BR /> "; ++$explode_number; --$explode_count_dec; endwhile; echo "</form>"; and the JS: Code: <script type="text/javascript"> function showmore($text) { var room = "<?= $get_location; ?>"; window.location = "?location=" + room + "&id=" + <?php $text; ?> // Couldn't do just $text here? I wish I knew JS.. } </script> Hi, I want to call a javascript function without having a button click and it is nestled within php. I have the function OpenChat() in my main page - this works fine. I have the below sub page that is called by an onclick event (originally I had the script launch through a button but I am over loading my server at the moment and need to find a different way to call the function). So I tried the below, which doesn't work. The function just isn't working. My script is: PHP Code: <?php session_start(); if (!(isset($_SESSION['login']) && $_SESSION['login'] !='')){ header ("Location: Welcome.php"); } $SMyPId=$_SESSION['MyPId']; include("dbconnect.php"); $result = mysql_query("SELECT (chatterspace) FROM chat WHERE chatter='{$SMyPId}' AND EndDate IS NULL group by chatterspace"); while($row = mysql_fetch_array($result)){ $oak = $oak . ';' . $row['chatterspace']; } $beach=explode(";",$oak); $divonecount=$beach[1]; $divtwocount=$beach[2]; $divthreecount=$beach[3]; $divfourcount=$beach[4]; $divfivecount=$beach[5]; if($divonecount=='chat1'){ $chat1='full'; }else if($divtwocount=='chat1'){ $chat1='full'; }else if($divthreecount=='chat1'){ $chat1='full'; }else if($divfourcount=='chat1'){ $chat1='full'; }else if($divfivecount=='chat1'){ $chat1='full'; }else if($divonecount=='chat2'){ $chat2='full'; }else if($divtwocount=='chat2'){ $chat2='full'; }else if($divthreecount=='chat2'){ $chat2='full'; }else if($divfourcount=='chat2'){ $chat2='full'; }else if($divfivecount=='chat2'){ $chat2='full'; }else if($divonecount=='chat3'){ $chat3='full'; }else if($divtwocount=='chat3'){ $chat3='full'; }else if($divthreecount=='chat3'){ $chat3='full'; }else if($divfourcount=='chat3'){ $chat3='full'; }else if($divfivecount=='chat3'){ $chat3='full'; }else if($divonecount=='chat4'){ $chat4='full'; }else if($divtwocount=='chat4'){ $chat4='full'; }else if($divthreecount=='chat4'){ $chat4='full'; }else if($divfourcount=='chat4'){ $chat4='full'; }else if($divfivecount=='chat4'){ $chat4='full'; }else if($divonecount=='chat5'){ $chat5='full'; }else if($divtwocount=='chat5'){ $chat5='full'; }else if($divthreecount=='chat5'){ $chat5='full'; }else if($divfourcount=='chat5'){ $chat5='full'; }else if($divfivecount=='chat5'){ $chat5='full'; } $result = mysql_query("SELECT * FROM allusers WHERE PId='{$mulberry}'"); while($row = mysql_fetch_array($result)){ $nosegay=rand(). rand(). rand(). rand(). rand(); $nightshade="{$SMyPId};{$mulberry};{$row['fullname']};{$nosegay}"; $elm=$row['pphoto']; $helmlock=$row['fullname']; } $poplar=$_POST['chat']; if($chat1 !=='full'){ echo '<script type="text/javascript"> function This(){ OpenChat(\'chatheader1.php\',\'chat1\',\'chat=' . $poplar . '\',\'ChatID=0\',\'getDisplayChat1.php\',\'ChatDisplayOne\',\'getThisChat1.php\',\'displaytalkOne\',\'artemis=' . $poplar . '\')"; alert("chat1"); } </script>'; }elseif($chat2 !=='full'){ echo '<script type="text/javascript"> function This(){ OpenChat(\'chatheader2.php\',\'chat2\',\'chat=' . $poplar . '\',\'ChatID=0\',\'getDisplayChat2.php\',\'ChatDisplayTwo\',\'getThisChat2.php\',\'displaytalkTwo\',\'artemis=' . $poplar . '\')"; alert("chat2"); } </script>'; }elseif($chat3 !=='full'){ echo '<script type="text/javascript"> function This(){ OpenChat(\'chatheader3.php\',\'chat3\',\'chat=' . $poplar . '\',\'ChatID=0\',\'getDisplayChat3.php\',\'ChatDisplayThree\',\'getThisChat3.php\',\'displaytalkThree\',\'artemis=' . $poplar . '\')"; alert("chat3"); } </script>'; }elseif($chat4 !=='full'){ echo '<script type="text/javascript"> function This(){ OpenChat(\'chatheader4.php\',\'chat4\',\'chat=' . $poplar . '\',\'ChatID=0\',\'getDisplayChat4.php\',\'ChatDisplayFour\',\'getThisChat4.php\',\'displaytalkFour\',\'artemis=' . $poplar . '\')"; alert("chat4"); } </script>'; }elseif($chat5 !=='full'){ echo '<script type="text/javascript"> function This(){ OpenChat(\'chatheader5.php\',\'chat5\',\'chat=' . $poplar . '\',\'ChatID=0\',\'getDisplayChat5.php\',\'ChatDisplayFive\',\'getThisChat5.php\',\'displaytalkFive\',\'artemis=' . $poplar . '\')"; alert("chat5"); } </script>'; }else{ echo '<script type="text/javascript"> function This(){ alert("You have reached your IM capacity, please close a chat box"); } </script>'; } mysql_close($con); ?> Hi Guys, I am trying to make a change to my website so when someone clicks on the chinese flag image, for example, a function which put the clock forward a few hours. This is what the code I have got at the moment: <td><a href="<? echo $_SERVER[PHP_SELF].'?page='.$page.'&lang=en'; ?>"><img src="images/uk.gif" title="english" border=0></a></td> <td><a href="<? echo $_SERVER[PHP_SELF].'?page='.$page.'&lang=zh'; ?>"><img src="images/ch.gif" title="chinese" onclick="chinatime()" border=0></a></td> <td><a href="<? echo $_SERVER[PHP_SELF].'?page='.$page.'&lang=ja'; ?>"><img src="images/jap.gif" title="japanese" border=0></a></td> <td><a href="<? echo $_SERVER[PHP_SELF].'?page='.$page.'&lang=kk'; ?>"><img src="images/kaz.gif" title="kazakh" border=0></a></td> <td><a href="<? echo $_SERVER[PHP_SELF].'?page='.$page.'&lang='.$most_preferred; ?>">Browser Set</a></td> </tr> <tr> <td colspan="5"> <p class="meta"><span class="date"><script type="text/javascript"> var currentTime = new Date() var minutes = currentTime.getMinutes() var hours = currentTime.getHours() var month = currentTime.getMonth() + 1 var day = currentTime.getDate() var year = currentTime.getFullYear() function chinatime() { hours = hours + 5 } if (minutes < 10) minutes = "0" + minutes document.write(day + "/" + month + "/" + year + " " + hours +":"+minutes) </script> Many Thanks I'm currently working on a project and I am doing a bunch of image switching. I'm having a problem with the following... I have seven medium image objects and one small one. One is at the top and the other 7 are below. When one of the 7 is clicked, it then becomes the one up top and the one up top then takes the place of the image clicked. This needs to be able to happen no matter which of the seven i click. Also when you click one of the seven it runs a script to change 9 other images in the center of the page. this isnt too important because i have it working already. What i have is, each of the seven images run their function that changes the 9 center images and then it runs another function. What i need is for that function to determine which company for example(shaws, lowes, target) the top image belongs to and replace the image that was clicked with the top one. But i also need to replace the NAME="" and ONCLICK="function()" with the proper ones for the original company up top. Please if you can understand what im trying to do let me know, if you need further clarification i can do so. i can draw a picture of what im trying to do or the layout if needed but i cant necessarily show anyone the project due to a non-disclosure. i have an image with an onclick function and parameters 0,1 i want to change the parameters of the onclick function through the same function? Code: <img id="down0" onclick=swap(0,1) /> <javascript> function swap(a,b){ var imgda=document.getElementById('down'+a); imgda.onclick = swap(b,b+1); } </javascript> normally it should change the onclick to swap(1,2) but it remains 0,1 whats happening?? p.s. plz dont tell me about the javascript tag, its just for quick explaining... I guess it is because it is 2am and had a few beers but i cannot get this to work and i know its pretty simple to do - see the code below: Code: {if ""|fn_needs_image_verification == true} {assign var="is" value="Image_verification"|fn_get_settings} <p{if $align} class="{$align}"{/if}>{$lang.image_verification_body}</p> {assign var="id_uniqid" value=$id|uniqid} {literal} <script language="javascript" type="text/javascript"> function reloadCaptcha() { captcha = document.getElementById("captureURLID").src; return captcha += 'reload'; } </script> {/literal} {if $sidebox} <p><img id="verification_image_{$id}" class="image-captcha valign" src="{"image.captcha?verification_id=`$SESS_ID`:`$id`&`$id_uniqid`&"|fn_url:'C':'rel':'&'}" alt="" onclick="this.src += 'reload' ;" width="{$is.width}" height="{$is.height}" /></p> {/if} <p><input class="captcha-input-text valign" type="text" name="verification_answer" value= "" autocomplete="off" /> {if !$sidebox} <img id="verification_image_{$id} captureURLID" class="image-captcha valign" src="{"image.captcha?verification_id=`$SESS_ID`:`$id`&`$id_uniqid`&"|fn_url:'C':'rel':'&'}" alt="" onclick="this.src += 'reload' ;" width="{$is.width}" height="{$is.height}" /> {/if} <img src="{$images_dir}/icons/icon_reload.png" height="25" width="25" alt="Reload Captcha Image" onclick="reloadCaptcha();" class="valign image-captcha" /></p> {/if} now the following works totally fine, when you click the captcha code changes..... "onclick="this.src += 'reload'" you will notice i have added a custom reload button image below this with a onclick calling a custom function "reloadCaptcha(); which i want to reload the captcha image above it - however it is not working, i have done the function so it grabs the src from the element ID, i have added 2 ID's to the IMG but cannot remember if you can have multiple IDs or not which if not could be causing the problem but not 100% sure how to include the smarty code for the generated ID on that image. Any ideas on the code above from having a quick glimps? as the code stands i get the error: Error: captureURL is null Many Thanks I have an external js file which contains the function which for now opens an alert box. The div on the page should run the function when it is clicked but it isn't. I have tried changing the function to an alert to check the click event is working and i have tried running the javascript in the address bar Code: javascript:hasFocus(); to ensure it has loaded correctly. Both are working fine and i am getting no errors. Below is a snippet of the code: Code: function hasFocus() { alert("a"); } Code: <!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> <script type="text/javascript" language="javascript" src="scripts/cms.js"></script> </head> <body> <div id="tab_panel"> <div id="tabs"></div> <div id="content" contenteditable="true" onclick="hasFocus();"></div> </div> </body> </html> Thanks in advance I am creating a weather widget for the iphone. The program creates an xml request for a weather feed and then parses the response. Depending on the response different information is displayed. A different icon for each weather pattern. I have all of this working so far. What I want to integrate is the option to refresh the weather when a user taps on the icon. Here is my code: Code: document.getElementByID("weatherIcon").innerHTML="<img src=\"Icon Sets/"+iconSet+"/"+MiniIcons[obj.icon]+iconExt/" border=2 onclick=\"refresh();\">" Code: function refresh() { weatherRefresherTemp(); } I know that the function refresh works because it is called from another function that allows the refresh to happen automatically every 30 min. However, wanting to integrate an option to manually refresh I am trying to do it this way. The code never seems to fire, nothing happens. I've added the border option for testing and don't even see that. I've been using a javascript editor and I do not get any errors. Any suggestions would be greatly apprectiated. I'm having a small issue with being able to use the onclick more than once. When I load the page and click the link the request works fine the first time. But if I cancel the request then goto click the link again, nothing happens. Code: <a href="javascript:void();" onclick="sendRequest()">Send the request</a> <script> var request = { method: 'postrequest', message: 'You will like it', data: '123key' }; function sendRequest() { postReq(request, function (a) { if (a && a.post_id) { //Do something if sent } else { //Do something if cancelled } }) } </script> The following coding works in Konqueror 3.5.10 on Ubuntu 8.04.3 LTS but not on Firefox 3.0.10 Linux/3.5.7 XP, Opera 10.10 Linux or IE8 XP. I can't see why but it may be to do with the recursion (showtable calls onclick calls addit which calls showtable ...). Somehow it is not seeing the addit routine the second time round. It is meant just to add a line. Eventually it needs to be a complex table but this is for illustration. There are other ways to solve this but this would be the simplest - if it worked! What happens is that one line is added OK but then it chokes. This is what makes me think it is the recursion but I can't see otherwise how to make it write the updated text. I realise I should have a document.close() in it as well and I have tried adding <![CDATA[ ... ]]> as well. Other than in Konqueror, it gives an error message saying object not found (in IE8) or more explicitly: Code: function onclick(event){ addit(4); } with 'addit is not defined' in Firebug. In Konqueror it works sweetly. Code: <!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' xml:lang='en' lang='en'> <head> <script language='Javascript' type='text/javascript'> if(typeof(sections) == 'undefined'){ var sections=['Text 0','Text 1','Text 2']; } function addit(ilocal){ sections.splice(sections.length,0,'Text '+ilocal); showtable(); } function showtable(){ var i,j,ip1; for(i=0;i<sections.length;i++){ ip1=i+1; document.write('Section ',i,': ',sections[i],'<br>'); } document.write("<input type='button' value='Add' onClick='addit(",ip1,")' /><br>"); for(j=0;j<sections.length;j++){document.write(sections[j]," ");} } </script> </head><body> <script language='Javascript' type='text/javascript'> showtable(); </script> </body> </html> Clues would be very much appreciated - my baldness coefficient is increasing daily! Hello and thanks for letting me on this forum! Im pretty new to JScript and I am still getting used to it all. I am trying to make a Website that allows values to be selected from one form, transferred to the next form as a summary and then completed. The values are sent to the page fine but my Validation is broken. Here is my LINK code In the Form Code: <form id="Tickets" onsubmit="return ValidateForm()" action="Details.html"> And in the Submit Button Code: <input type="submit" id="OrderTickets" value="Order Tickets" onclick="return ValidateForm()" > My validation is as follows Code: <script type = "text/javascript"> function ValidateForm() { if( document.getElementById('DepartingStation').selectedIndex == " ") { alert( "Please provide a Departing Station!" ); document.getElementById('DepartingStation').focus() ; return false; } if( document.getElementById('ArrivingStation').selectedIndex == " ") { alert( "Please provide an Arriving Station!" ); document.getElementById('ArrivingStation').focus() ; return false; } var Depart = document.getElementById('DepartingStation').value; var Arriv = document.getElementById('ArrivingStation').value; if( Depart==Arriv){ alert( "Train cannot depart and arrive at the same station!" ); return false; } if ( document.getElementById('ReturnTravel').checked=true; { var valueDate = document.getElementById('OutwardDate').value; if ( valueDate== null || valueDate== '') { alert('Please provide an Outward Travel Date!'); return false; } } var valueRetDate = document.getElementById('ReturnDate').value; if ( document.getElementById('ReturnTravelType').checked==true && (valueRetDate== null || valueRetDate== '' )) { alert('Please provide a Return Travel Date!'); return false; } } Id appreciate any help anyone can share on this! Thanks. I've been doing some searching and I can't seem to find what I am looking for. I hope someone can help. I am trying to target a link to an iframe window. The catch is that I need to use an onClick function in a TD tag... Here is an example: <TABLE HEIGHT="40" WIDTH="780" CELLSPACING="0" CELLPADDING="0" BORDER="1"> <TBODY> <TR> <TD ALIGN="CENTER">HEADER 1</TD> </TR> <TR> <TD OnClick="location='http://www.ophil.com'" BGCOLOR="#FFFFFF">Ophil</TD> </TR> </TBODY> </TABLE> </TD> </TR> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td><a name="bidframe"> <IFRAME SRC="bid_item_instructions.html" TITLE="IFRAME" SCROLLING="no" NAME="bidpage" WIDTH="100%" HEIGHT="450" ALIGN="center" FRAMEBORDER="yes" > </IFRAME> </a></td> </tr> </table> </CENTER> </BODY> </HTML> I need the results of that onclick to appear in the iframe window I have called bidframe... Any ideas? this is my html page.. Code: <html> <head> <script type="text/javascript" language="JavaScript"> function general_formats() { window.open('http://www.test.com/general_formats.php'); } </script> </head> <body> <a href="general_formats.php"><onclick="general_formats(); return false">General Formats</a> </body> </html> When i click ' general Formats ' , a window is opened , i dont need that . What i need is , when i click the link , it should direct to general_fomats.php.. please help me to solve it . .any help will be appreciated . This is hopefully a simple fix and I hope someone can help me out, I'm pretty new at coding. I have a form on an html page and I want to make it so when a button is clicked, it adds one to the input to the right of it, and when a button to the right of the input is clicked, it will delete one to the left of that button. I don't want to resort to making a new function for each and every form, because there will be a lot. Here is the form and input parts: Code: <form name="calculate"> <input type="button" onClick="add()" /> <input name="result" type="input" readonly="readonly" value="0" /> <input type="button" onclick="sub()" /> </form> Here is what the function code looks like: Code: function add() { var add = 1 * calculate.name.value; add = add + 1; calculate.name.value = add; } function sub() { var add = 1 * calculate.name.value; add = add - 1; calculate.name.value = add; } Note: where I called the calculate.name.value, that obviously doesn't work, and I need some way, rather than making multiple functions and changing the name part, to be able to call to a name near the button, if at all possible. Any and all ideas are appreciated, Thanks! Well, I'm a beginner to coding, so I need some help. I'm trying to create a short, html/javascript mario text game. Now, in the beginning, he fights a goomba. He has a health and energy number as variables: Code: <p><img src="http://img253.imageshack.us/img253/9202/mariodisplayidlefront.png" align="middle" hspace=20> <font size=3 color="red"> Health: <script language= "javascript"> var mariohealth = '20'; document.write(mariohealth); </script> </font> <br><font size=3 color="green"> Energy: <script language= "javascript"> var marioenergy = '20'; document.write(marioenergy); </script> </align> </font> And the goomba has health: Code: <p><br><img src="http://img23.imageshack.us/img23/9438/goombafrontdisplay.png" align="middle" hspace=20> <font size=3 color="red"> Health: <script language= "javascript"> var goombahealth = '10'; document.write(goombahealth); </script> </font> And then, there will be different buttons for different attacks. However, the only one created is "Punch", with this code: <FORM> <INPUT type="button" value="Punch" name="Mario Punch" onClick="?"> </FORM> What would I put in the onClick function to make it subtract 4 health from the goomba and 2 health from Mario Hi everybod, i have on my website http://www.musi9a.coma flash mp3 player that opens in a popup. The user can then add songs to it by clicking on a link "add song". When the popup is already open and the user is on the same page the if(popup) or if (popup && popup.open) works but when the user navigates to other pages if(popup) doesnt seem to work anymore. can you help me. You can test on my website choose an artist click on "launch top 30" or "launch all" then go to another artist. You will notice that you have to click twice to get it work (the playlist in the player will change). Any general improvements are also welcome. ty in advance Hi, Question: How can I use a submit button to do two things? 1) return the value which is a url link, and 2) go to the url link. I use radio buttons with two selections. Each value is equal to different links (http://...). A select button calls a javascript function to see which one is selected. In java script, I set a variable to link text (http://....) HERE'S THE HTML Code: <FORM NAME=payment > Select Payment Option: <label> <input type="radio" name="RadioGroup1" value="http://www.1Search5CC.html" checked="checked" /> Credit Card or </label> <label> <input type="radio" name="RadioGroup1" value="http://www.1Search5check.html" /> Check</label> <input type="submit" value="CHECKOUT" onclick="GetSelectedItem()"> Code: function GetSelectedItem(){ chosen = "" len = document.payment.RadioGroup1.length for (i = 0; i <len; i++) { if (document.payment.RadioGroup1[i].checked) { var chosen = document.payment.RadioGroup1[i].value; alert ("Chosen= " + chosen) document.payment.chosen.value = chosen }}} I know I can just link to a page immediately when a choice is selected, but I want to use a submit button instead. Any help would be appreciated. I'm an experienced programmer (c, perl , python, bash) but absolutely newcomer with Javascript. The code I'm experimenting with is shown below. What I'm trying to do at this point is define a function in a script section in the head of my html page, then call that function in the onclick action of a form button. Sounds trivially simple, but for some reason it isn't doing what I expect. The eventual result will be that the Javascript will launch a Silverlight video player using the values supplied by the end user, but for now I just want to get the basic buttons to work <code> <html> <head> <title>Silverlight player</title> <script type="text/javascript"> var vProto; var vServer; var vStream; function showMe() { alert("In the function"); vProto = document.getElementById('proto').value; vServer = document.getElementById('server').value; vStream = document.getElementById('stream').value; return false; } function alertMe() { alert(document.getElementById('server').value); return false; } </script> </head> <body> <div id="dataEntry"> <form name="dataForm"> <table align='center'> <tr> <td>Protocol:</td> <td><input type="text" id="proto" title="HTTP, RTSP, MMS"></td> </tr> <tr> <td>Server:</td> <td><input type="text" id="server" width='45'></td> </tr> <tr> <td>Stream:</td> <td><input type="text" id="stream"></td> </tr> <tr> <td colspan='2' align='center'> <input type='button' value='Monitor' onClick="showMe(); return false"> </td> </tr> <tr> <td colspan='2' align='center'> <input type='button' id='alert1' value='Alert!' onClick="alert(document.getElementById('server').value);"> <input type='button' id='alert2' value='Alert!' onClick="alertMe();"> </td> </tr> </table> </form> </div> <div id='report'> <script type="text/javascript"> document.write("Playing Silverlight stream at " + vProto + "://" + vServer + "/" + vStream + "<br />"); </script> </div> </body> </html> </code> So, what embarrassing simple thing did I leave out? My problem is that i have multiple math calculations within different functions that have multiple switch statements that get calculated with an onclick="functionOne()" for each radio button and before i can calculate the outcome for some reason i must fully insert a value for every input as well as check every raidio button before i get to the end of my list. I wish to simply allow the user to fill out as many fields as he wishes leaving some bank without being restricted to do every single one.. Thank you in advance
I am pretty much learning Javascript as I am building my website so I apologize for this being such a simple question. I am trying to put on my homepage a dropdown list of 4 options where each option would bring you to a different page on my website. So far, I have this: <option value=""></option> <option value ="1">I would like to process credit cards face to face with my customers.</option> <option value = "2">I would like to process credit cards online.</option> <option value = "3">I would like to process credit cards on the road, wherever my customers are.</option> which I built in Dreamweaver. What I would like it to do is when the user clicks on an option, it brings them to one of the pages on my site. Can someone please give me some direction as to how to do this? Thank you in advance for the help. |