JavaScript - Fixing Forum Through Java: Adding Picture Button And Html Button
Hey guys.
I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS Similar TutorialsHey guys. This is vague because I dont know what exactly to tell you but please reply with me so I can fix this. I want to add something to my forum. Specifically, I want to add a HTML and Picture button for when you go to reply. Like posting an article here, there are also these options (font, alignment, insert image) I do not know how to achieve this but shouldnt be too hard. Here are the two sources you will need to look through to help me fix the forum. http://neoweather.com/FWFORUM.JS http://static.websimages.com/JS/fw.js THANKS i got javascripts button : Code: <input type="button" value="select" onClick="document.getElementById('input').select()" /> how can i transform "button" to image button (gif) Hi Guys, I was wondering if I could have some help. Its coding for the left side of a frame set to display in the right side. Im pulling my hair out! Thanks Code: <html> <head> <script type="text/javascript"> function go() { var go="none"; if (document.buttons.option[0].checked) go=button.option[0].value; if (document.buttons.option[1].checked) go=buttons.option[1].value; if (document.buttons.option[2].checked) go=buttons.option[2].value; parent.rightframe.location=go; } </script> </head> <body> <form name="buttons" id="buttons"> <input type="radio" name="option" value="cit.html" checked="checked">CIT</input> <br /> <input type="radio" name="option" value="currency.html">Currency</input> <br /> <input type="radio" name="option" value="staffsurvey.html">Staff Survey</input> <br /> <input type="radio" name="option" value="game.html">Game</input> <br /> <input type="button" value="Go" onClick="go();"</input> </form> </body> </html> Hi, I was trying to add some simple javascript (toggle visibility function of a div) to the FB 'like' button and 'Google +1' button. This to simply create some more visitor interactivity by showing a thank you message for doing so. I've tried by just adding 'onclick=' to the element that actually shows the button, with a <a href="#" onlcick="..."> --element--</a> manner, and with a <span> and a <div> element around it. Neither of them work. The toggle script is 100% correct (using it actively with <a href="javascript:void(0);" onclick="javascript:toggleVisibility('feedbackform')">feedback</a> ) Of course I made sure the div id had correct name and it is unique for the toggle function. Anybody got any ideas on how to go with this? JS: Code: function toggleVisibility(controlId) { if (document.getElementById) { // DOM3 = IE5, NS6 var control = document.getElementById(controlId); if(control.style.display == "") control.style.display = "none"; else control.style.display = ""; } else { if (document.layers) { // Netscape 4 if(document.controlId.display == "") document.controlId.display = "none"; else document.controlId.display = ""; } else { // IE 4 if(document.all.controlId.style.display == "") document.all.controlId.style.display = "none"; else document.all.controlId.style.display = ""; } } } Hello I am new to javascript (4 months), I would like to add an hour to the current time each time a button is clicked. I have this code: ------------------------------------------------------------------ var hourstbutton=document.getElementById("button3"); hoursbutton.onclick=function() { var divlink=document.getElementById("math3"); var newtime2=new Date(); var currenthours2=newtime2.getHours()+1; var currentmins2=newtime2.getMinutes(); var currentsecns2=newtime2.getSeconds(); var ampm2= (currenthours2>=12) ? "P.M." : "A.M."; if (currenthours2>=13) { currenthours2-=12; } if(currenthours2<1){ currenthours2=12; } if(currentmins2<10){ currentmins2= "0" + currentmins2; } if(currentsecns2<10){ currentsecns2="0" + currentsecns2; } divlink.innerHTML=currenthours2+":"+currentmins2+":"+currentsecns2+ " "+ampm2; ------------------------------------------------------------------------ How do I tie the number of button clicks into the number of times this code is executed? Any help is appreciated thanks. I have some asp:radiobutton lists that need to update a label with the sum of their values each time a user selects a new value. I am brand new to javascripting and would like some insight on how to get this done. I have inserted my code below. Code: <asp:Label runat="server" Text="Greeting:" /> <asp:Label runat="server" ForeColor="Red" ID="lbl_GreetingScore" Text="0" /> <asp:RadioButtonList ID="rdb1_1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Selected="True" Text="N/A" Value="4" /> <asp:ListItem Text="Yes" Value="4" /> <asp:ListItem Text="No" Value="0" /> </asp:RadioButtonList> Good morning! Hopefully somebody can help me with this javascript question. (No knowledge of Google Anayltics needed for this.) I'm adding Google Analytics 'Event Tracking' javascript to a typical 'Add to Cart' button. The customer enters desired quantity in the text box and clicks the 'Add to Cart' button to order. I would like to use the Event Tracking javascript to record the button click - plus the Value entered in the text box - as one event. Here's the code for the form (the text box and 'Add to Cart' button code lines are bold): Code: <form method="post" action="http://www.yoursite.com/mm5/merchant.mvc?"> <input type="hidden" name="Screen" value="BASK" /> <input type="hidden" name="Product_Code" value="yourproductcode" /> <input type="hidden" name="Action" value="ADPR" /> <label for="quantity">Quantity:</label> <input type="text" name="quantity" value="0" /> <input type="submit" value="Add To Cart" /> </form> I came up with this javascript for the Event Tracking (to be inserted somewhere above): Code: onClick="_gaq.push(['_trackEvent', 'OrderForms', 'AddToCart', 'yourproductcode', document.getElementByName('quantity').value]);" I'm wondering where I would enter this javacript code inside the form code to pick up both the button click - plus the quantity? You'll notice that I'm using 'getElementByName' to extract 'quantity' from the text box and record its 'value'. If I enter this javascript on the 'Add to Cart' line - right after "Add to Cart", would 'quantity' still get picked up upon button-click - since it's all on the same form? Or would it be a problem because 'quantity' is contained in a different <input> container? Thanks! Any help is greatly appreciated. IB Hey javascript newbie, Im trying to figure out how to add different radio if its selected or not example: Radio_Button1 value="5": Selected Radio_Button2 value="15": Not Selected Radio_Button3 value="25": Selected Radio_Button4 value="35": Selected var addingitup = ??? and im lost???? Good day all, I was hoping someone could help me out with the following. I currently have a slideshow that as thumbnails under a main image. The thumbnails slide left and right with hover on a button and with a click changes main image without any problems. Few things I am looking to change/add: 1. The ability to mouse over the main image and have the caption appear than disappear when the mouse is moved off. Currently I have the caption as a static text under the main image. 2. Start the thumbnail position in the middle instead of the left 3. Add mouseover buttons to the main image to give the ability to cycle through the images instead of having to always use the thumbnails. Below I've include the Javascript code: Is this the best way or is there a better way? Example of slideshow: http://neileverosborne.com/portfolios/manatees.html JAVASCRIPT: Code: var displayWaitMessage=true; // Display a please wait message while images are loading? var activeImage = false; var imageGalleryLeftPos = false; var imageGalleryWidth = false; var imageGalleryObj = false; var maxGalleryXPos = false; var slideSpeed = 0; var imageGalleryCaptions = new Array(); function startSlide(e) { if(document.all)e = event; var id = this.id; if(this.id=='arrow_right'){ slideSpeedMultiply = Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = -1*slideSpeedMultiply; slideSpeed = Math.max(-10,slideSpeed); }else{ slideSpeedMultiply = 10 - Math.floor((e.clientX - this.offsetLeft) / 5); slideSpeed = 1*slideSpeedMultiply; slideSpeed = Math.min(10,slideSpeed); if(slideSpeed<0)slideSpeed=10; } } function releaseSlide() { var id = this.id; slideSpeed=0; } function gallerySlide() { if(slideSpeed!=0){ var leftPos = imageGalleryObj.offsetLeft; leftPos = leftPos/1 + slideSpeed; if(leftPos>maxGalleryXPos){ leftPos = maxGalleryXPos; slideSpeed = 0; } if(leftPos<minGalleryXPos){ leftPos = minGalleryXPos; slideSpeed=0; } imageGalleryObj.style.left = leftPos + 'px'; } setTimeout('gallerySlide()',20); } function showImage() { if(activeImage){ activeImage.style.filter = 'alpha(opacity=50)'; activeImage.style.opacity = 0.5; } this.style.filter = 'alpha(opacity=100)'; this.style.opacity = 1; activeImage = this; } function initSlideShow() { document.getElementById('arrow_left').onmousemove = startSlide; document.getElementById('arrow_left').onmouseout = releaseSlide; document.getElementById('arrow_right').onmousemove = startSlide; document.getElementById('arrow_right').onmouseout = releaseSlide; imageGalleryObj = document.getElementById('theImages'); imageGalleryLeftPos = imageGalleryObj.offsetLeft; var galleryContainer = document.getElementById('galleryContainer'); imageGalleryWidth = galleryContainer.offsetWidth - 20; maxGalleryXPos = imageGalleryObj.offsetLeft; minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft; if (navigator.userAgent.indexOf('MSIE') >= 0) { var arrowWidth = document.getElementById('arrow_left').offsetWidth; var el = document.createElement('div'); el.style.position = 'absolute'; el.style.left = arrowWidth + 'px'; el.style.width = (galleryContainer.offsetWidth - arrowWidth * 2) + 'px'; el.style.overflow = 'hidden'; el.style.height = '100%'; document.getElementById('galleryContainer').appendChild(el); el.appendChild(document.getElementById('theImages')); } var slideshowImages = imageGalleryObj.getElementsByTagName('IMG'); for(var no=0;no<slideshowImages.length;no++){ slideshowImages[no].onmouseover = showImage; } var divs = imageGalleryObj.getElementsByTagName('DIV'); for(var no=0;no<divs.length;no++){ if(divs[no].className=='imageCaption')imageGalleryCaptions[imageGalleryCaptions.length] = divs[no].innerHTML; } gallerySlide(); } function showPreview(imagePath,imageIndex){ var subImages = document.getElementById('previewPane').getElementsByTagName('IMG'); if(subImages.length==0){ var img = document.createElement('IMG'); document.getElementById('previewPane').appendChild(img); }else img = subImages[0]; if(displayWaitMessage){ document.getElementById('waitMessage').style.display='inline'; } document.getElementById('largeImageCaption').style.display='none'; img.onload = function() { hideWaitMessageAndShowCaption(imageIndex-1); }; img.src = imagePath; } function hideWaitMessageAndShowCaption(imageIndex) { document.getElementById('waitMessage').style.display='none'; document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex]; document.getElementById('largeImageCaption').style.display='block'; } window.onload = initSlideShow; Hi, I am a small problem with the combo boxes in my web page.I have created a web search portal for travelling in that i have used combo boxes for selecting the no.of.passengers (Adults, Childs & Infants) along with the ages of the children.Take for example i have a hotel search page in that i have used combo box to select the no.of.rooms. And i have kept the same concept in selection of passengers too(i.e., when u select Room count as '2' there will two rows displayed separately for choosing adults & child) and when u choose child as '1' another combo box will appear to select for 1 child this is unique for each rooms. Now i can able to do the first part clearly that is when select room count the rows are displaying as per the no. But when i select for child the age combo box is coming same for all the rooms and not as unique (separate) for each room. Can anyone help me to fix this problem! Thanks, Hi, I am not entirely sure what I am doing wrong here, and I have been looking at this for ages, so apologies in advance if I have become so bleary eyed I can't see something simple. I use php to create buttons based on values pulled for a table. The problem I have is when you click on the first button the javascript function works great, when you click on the next button you get the same output even though it should be different results. I am working in ff and I can see on my firebug console that the javascript function is being called, but it is not passing the new value of the second or third button, it just keeps repassing the value of the first button. So not entirely sure where I am going wrong here. My page is: Code: <script type="text/javascript"> function loadXMLDoc2(File,ID,Msg){ if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { try{ xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ document.getElementById(ID).innerHTML=xmlhttp.responseText; } } var params=Msg; xmlhttp.open("POST",File,true); xmlhttp.setRequestHeader("Pragma", "Cache-Control:no-cache"); xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(params); } </script> <head> <body> <?php $con = mysql_connect("localhost","user","password"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("mydb", $con); $result = mysql_query("SELECT DISTINCT theme FROM goods WHERE category='{$_POST['category']}' ORDER BY theme DESC"); while($row = mysql_fetch_array($result)){ echo '<input type="text" class="hidden" name="theme" id="theme" value="' . $row['theme'] . '" ><input type="button" class="button3" name="product" id="product" value="' . $row['product'] . '" onClick="loadXMLDoc2(\'getShow.php\',\'txtHint\',\'theme=\'+encodeURI(document.getElementById(\'rtheme\').value))" > '; } echo '<br /><br /> <div id="txtHint"><div> <br /> <br />'; mysql_close($con); ?> And getShow.php produces a table with a list of product images, names and prices, based on theme. So basically not sure where I am going wrong here? i'm still a relative noob and this has me stuck - i have a save button with a "save as copy" in the save dropdown list. add new item directs to a premade/formatted project that is used as a template, so on that item i only want/need the "save as copy" but on all other items that use the form i need to only have the "save" function. is there any way to either change the function of the button depending on item that is being viewed in the edit screen OR hide the "save" button and only show the button associated with "save as copy - and vis versa for the rest of the items?? current button code is - protected function getToolbar() { $options = array(); $user = JFactory::getUser(); $create_ms = $user->authorise('core.create', 'com_pfmilestones'); $create_task = $user->authorise('core.create', 'com_pftasks'); $options[] = array( 'text' => 'JSAVE', 'task' => $this->getName() . '.save'); $options[] = array( 'text' => 'Save as new project', 'task' => $this->getName() . '.save2copy', 'options' => array('access' => ($this->item->id > 0))); PFToolbar::dropdownButton($options, array('icon' => 'icon-white icon-ok')); item used as template is id=8 any help or suggestions would be greatly appreciated.. Hello! A client of mine wanted a picture slideshow like this website. http://themeforest.net/item/dark-atl..._preview/50415 I have looked through many different slideshows and carousel and have had no luck trying to find just a nice simple one like this. Can anyone help? I did find this: http://sorgalla.com/jcarousel/ but it deals with JQuery and I'm not sure how to use it. If it's simple and I can change that script to the one above then that's great. Any feedback is greatly appreciated Kristen http://www.twitter.com/kris10ized Site in question: www.yourvancouvermortgagebroker.ca/apply On the 3rd step of this form, I want to add a "SKIP" button that will send the user to the 5th step. No clue how to do this, as someone else helped me code. Thank You! Relevant code javascript file: Code: //step 3 $('#submit_third').click(function(){ //remove classes $('#third_step input').removeClass('error').removeClass('valid'); //ckeck if inputs aren't empty var fields = $('#third_step input[type=text]'); var error = 0; fields.each(function(){ var value = $(this).val(); if( value.length<1 || value==field_values[$(this).attr('id')] || ( $(this).attr('id')=='cemail' && !emailPattern.test(value) ) ) { $(this).addClass('error'); $(this).effect("shake", { times:3 }, 50); error++; } else { $(this).addClass('valid'); } }); if(!error) { //update progress bar $('#progress_text').html('60% Complete'); $('#progress').css('width','204px'); //slide steps $('#third_step').slideUp(); $('#fourth_step').slideDown(); } else return false; }); //step 4 $('#submit_fourth').click(function(){ //remove classes $('#fourth_step input').removeClass('error').removeClass('valid'); var fields = $('#fourth_step input[type=text]'); var error = 0; fields.each(function(){ var value = $(this).val(); if( value.length<1 || value==field_values[$(this).attr('id')]) { $(this).addClass('error'); $(this).effect("shake", { times:3 }, 50); error++; } else { $(this).addClass('valid'); } }); if(!error) { //update progress bar $('#progress_text').html('80% Complete'); $('#progress').css('width','272px'); //slide steps $('#fourth_step').slideUp(); $('#fifth_step').slideDown(); } }); // step 5 $('#submit_fifth').click(function(){ //remove classes $('#fifth_step input').removeClass('error').removeClass('valid'); I need to figure out the on page button code, what I need to add to the javascript file AND what I need to add in the CSS. (css is here) Thank you SO much to whoever can help. Hello, I'm trying to make it so that when a user clicks a <li> it opens a marker on my map. The map and markers work fine within the map...but I can't seem to get my selector outside of the map to work. Thanks in advanced, this has been bugging me for days now! here is the javascript i have for the map so far... Code: var infowindowLevel = 0; function initialize() { var companyLogo = new google.maps.MarkerImage('images/googlemaps/logo23.png', new google.maps.Size(154,76), new google.maps.Point(0,0), new google.maps.Point(50,50) ); var companyShadow = new google.maps.MarkerImage('images/googlemaps/logo_shadow2.png', new google.maps.Size(154,60), new google.maps.Point(0,0), new google.maps.Point(30, 35) ); var footSolutionsLogo = new google.maps.MarkerImage('images/googlemaps/fslogo2.png', new google.maps.Size(154,76), new google.maps.Point(0,0), new google.maps.Point(50,50) ); var footSolutionsShadow = new google.maps.MarkerImage('images/googlemaps/logo_shadow2.png', new google.maps.Size(154,60), new google.maps.Point(0,0), new google.maps.Point(30, 35) ); var myLatlng = new google.maps.LatLng(38.030034,-121.214445); var myOptions = { zoom: 9, center: myLatlng, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.DEFAULT}, mapTypeControl: true, scaleControl: true, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var fs1 = new google.maps.LatLng(37.971961, -121.300540); var fs = new google.maps.Marker({ position: fs1, map: map, icon: footSolutionsLogo, shadow: footSolutionsShadow, title:"Foot Solutions - Stockton(CLICK ME)" }); var stf2 = new google.maps.LatLng(37.664285,-120.953553); var stf2 = new google.maps.Marker({ position: stf2, map: map, icon: companyLogo, shadow: companyShadow, title:"Shoes That Fit - Modesto(CLICK ME)" }); var stf3 = new google.maps.LatLng(38.409277, -121.383330); var stf3 = new google.maps.Marker({ position: stf3, map: map, icon: companyLogo, shadow: companyShadow, title:"Shoes That Fit - Elk Grove(CLICK ME)" }); var contentString = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/fslogo.jpg" alt="Logo" /> '+ '<h3>Stockton</h3>'+ '<p><img src="images/googlemaps/store1.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=2210+Pacific+Ave,+Stockton,+CA+95204&hl=en&geocode=&mra=ls&sll=37.0625,-95.677068&sspn=51.841773,57.744141&ie=UTF8&z=16">Get Directions! (Google Maps)</a></p> '+ '</div>'+ '</div>'; var contentString2 = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/stflogo.jpg" alt="Logo" /> '+ '<h3>Modesto</h3>'+ '<p><img src="images/googlemaps/store2.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=2401+E+Orangeburg+Ave,+Modesto,+CA+95355&hl=en&geocode=&mra=ls&sll=38.409009,-121.383419&sspn=0.012644,0.014098&ie=UTF8&z=16"> Get Directions! (Google Maps) </a></p> '+ '</div>'+ '</div>'; var contentString3 = '<div id="windowContent">'+ '<div id="bodyContent">'+ '<img src="images/googlemaps/stflogo.jpg" alt="Logo" /> '+ '<h3>Elk Grove</h3>'+ '<p><img src="images/googlemaps/store3.jpg"/> ' + '</p> '+ '<p class="link"><a target="_blank" href="http://maps.google.com/maps?f=d&source=s_d&saddr=&daddr=8649+Elk+Grove+Blvd,+Elk+Grove,+CA+95624&hl=en&geocode=&mra=ls&sll=37.971882,-121.300619&sspn=0.01272,0.014098&ie=UTF8&z=16">Get Directions! (Google Maps)</a></p> '+ '</div>'+ '</div>'; var infowindow = new google.maps.InfoWindow({ content: contentString, //maxWidth: 300, }); var infowindow2 = new google.maps.InfoWindow({ content: contentString2, // maxWidth: 300, }); var infowindow3 = new google.maps.InfoWindow({ content: contentString3, // maxWidth: 300, }); google.maps.event.addListener(fs, 'click', function() { infowindow.open(map,fs) }); google.maps.event.addListener(stf2, 'click', function() { infowindow2.open(map,stf2) }); google.maps.event.addListener(stf3, 'click', function() { infowindow3.open(map,stf3) }); } here is the <li>'s I want to use as the "buttons".. Code: <ul class="locations"> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> <li> <strong>Address</strong> <strong>Phone</strong> : <strong>Fax</strong> : </li> </ul> I need some help making a button function do what I want it to do. I have a index page that shows all my projects in a table with tabs you can click on that shows certain parts of all projects (ie tab for finance, project title). For now, every single project is shown on the website when you bring up the index page. Also the top part of the page, where I have the issue, there is a drop down list of all the projects with a "GO" button next to it. I want a user to be able to scroll down that list and click the button and the page would only show that particular project, ie choosing the tabs to go back and forth dealing with the one project only. The tabs are each its own .php file with the exact coding in all of them. Here is what I have on my index page that I need help on in order to make this button work. Any help will be appreciated. My main issue is this coding Code: <input type="button" value="GO" name="proj_list" /> But here is the whole index page Code: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>2009 Events</title> <link rel="stylesheet" type="text/css" href="../css/dddropdownpanel.css" /> <link rel="stylesheet" type="text/css" href="../css/sortable.css" /> <link rel="stylesheet" type="text/css" href="../css/datepicker.css" /> <link rel="stylesheet" type="text/css" href="../css/main.css" /> <link rel="stylesheet" type="text/css" href="../css/chromestyle.css" /> <link rel="stylesheet" type="text/css" href="../css/ajaxtabs.css" /> <script type="text/javascript" src="../includes/datepicker.js"></script> <script language="javascript" src="../includes/tablesort.js"></script> <script language="javascript" src="../includes/tableActions.js"></script> <script language="javascript" src="../includes/chrome.js"></script> <script language="javascript" src="../includes/ajaxtabs.js"></script> </head> <body> <div id="container"> <div id="header"> <?php include("../header.php"); ?> </div> <div id="navbar2"> <?php include("../menu.php"); ?> </div> <div id="content"> <div id="breadcrumb"> <script language="javascript" src="../includes/breadcrumbs.js"></script> </div> <?php // If the user wants to add a project if (isset($addproject)): else: $dbcnx = @mysql_connect("xxxxx", "xxxxxx", "xxxxxxxx"); if (!$dbcnx) { echo( "<P>Unable to connect to the xxxxxxxxx" . "database server at this time.</P>" ); exit(); } mysql_select_db("techweb", $dbcnx); if (! @mysql_select_db("techweb") ) { echo( "<P>Unable to connect to the xxxxxxx" . "database at this time.</P>" ); exit(); } // If a project has been submitted, // add it to the database. if ("SUBMIT" == $proj_submit) { $sql = "INSERT INTO projects SET " . "proj_priority='$priority', " . "proj_title='$title', " . "proj_bdlead='$bdlead', " . "proj_englead='$englead', " . "proj_objective='$objective', " . "proj_capability='$capability', " . "proj_approach='$approach', " . "proj_venue='$venue', " . "proj_tradeshow='$tradeshow', " . "proj_funding='$funding', " . "proj_src-ds='$src-ds', " . "proj_src-cap='$src-cap', " . "proj_src-irad='$src-irad', " . "proj_status='$status', " ; if (mysql_query($sql)) { echo("<P>Your project has been added.</P>"); } else { echo("<P>Error adding submitted project: " . mysql_error() . "</P>"); } } echo("<h1 style='text-align:left'> 2009 Projects </h1>"); // Request the text of all the projects $result = mysql_query( "SELECT * FROM projects"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } ?> <form id="projects" method="post" action="project.php"> <select id="project_list" name="proj_list"> <optgroup label="projects"> <?php // Display the details of each event in a table while ( $option = mysql_fetch_array($result) ) { echo("<option label=" . $option["proj_title"] . "value=" . $option["ID"] . ">" . $option["proj_title"] . "</option>"); } ?> </optgroup> </select> <input type="button" value="GO" name="proj_list" /> <? endif; ?> <div id="tabcontainer"> <ul id='tabs' class='shadetabs'> <?php // Populate tabs with data related to the selected project echo ("<li><a href='project.php' rel='container' class='selected'>Project</a></li>"); echo ("<li><a href='capability.php' rel='container'>Demo Capability</a></li>"); echo ("<li><a href='approach.php' rel='container'>Approach</a></li>"); echo ("<li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li>"); echo ("<li><a href='financials.php' rel='container'>Financials</a></li>"); ?> </ul> <!-- <ul id='tabs' class='shadetabs'> <li><a href='project.php' rel='container' class='selected'>Project</a></li> <li><a href='capability.php' rel='container'>Demo Capability</a></li> <li><a href='approach.php' rel='container'>Approach</a></li> <li><a href='venue.php' rel='container'>Venue/Trade Shows</a></li> <li><a href='financials.php' rel='container'>Financials</a></li> </ul> --> <div id="divcontainer" style="border:1px solid gray; width:600px; margin-bottom: 1em; padding: 5px"> <p>Please select a project using the drop-down menu above. Use the tabs to view information about the selected project.</p> </div> <script type="text/javascript"> var countries=new ddajaxtabs("tabs", "divcontainer") countries.setpersist(true) countries.setselectedClassTarget("link") //"link" or "linkparent" countries.init() </script> </div> how do i make a html button stay down when pressed, until another button within a specified group of buttons is pressed, at which point it is released and the other button stays pressed?
Hi all, I would like to have an HTML button which, when clicked by the user, contacts the server and runs a Python script on the server. When the Python script finishes running, the current HTML page automatically reloads a file from the server. Is that possible? YJ Hi, this is my first post on the forum. I was just wondering whether there is a way to hide an element on another page after clicking on a button? Basically, I have a login page, and for testing purposes, I want it so when you click a button, it runs some javascript in a file called ajax.util.js, and I have a jQuery file attached to the HTML file as well (http://ajax.googleapis.com/ajax/libs.../jquery.min.js), and I am using Google App Engine, which im not sure whether thats relevant. I tried using the show and hide functions provided by the jQuery file, but no luck, i want to hide an element which is a link with ID admintools. I have also tried getting the element by ID and changing the display style to none and hidden but still no luck. Im not sure whether its only possible to hide elements in the login.html page. What I want it to do basically is click on the submit button in the login page, it will then run a javascript function which redirects you to index.html (which i am doing using window.location), and then hides an element in the index.html page (id=admintools). Any help would be great, Thanks in advance |