Jump to content

Search the Community

Showing results for tags 'jquery'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi all, I'm new to backbone and JQuery and I'm trying to get my head around it. I'm doing exercise 2 from this book: http://addyosmani.github.io/backbone-fundamentals/#getting-set-up It says "You may notice that the file input for the cover image isn’t working, but that is left as an exercise to the reader." I've tried uploading an image and I get this in the console: GET file:///C:/fakepath/dan_brown.jpg This should be easy enough to do. Anyone got any ideas? Thank you
  2. I have a form with elements of the jquery autocomplete, it is possible to look up clients this way. however, I'd like other form elements below such as address or telephone number to be filled in automatically when a client is selected. Is this possible with jquery? I can't seem to find anything documenting it.. Thanks
  3. Hi I'm an Illustrator with little knowledge of web development, i'm experienced in HTML, CSS. I'm ok in PHP and Jquery and SQL I was wondering if it was possible to make a website where i can upload my illustrations to the database and view them on the website (while also having a jquery style on the images). like this: http://www.twospy.com/galleriffic/example-2.html if yes would you be able to give me any tutorial to teach me how to do it. if you can't find any toturials would you be able to give me tips. e.g. will it be easier to use a different language (i'm willing to teach my self), is there any opensource web development software that will help me do this Thank you very much for your help
  4. I have used this tutorial site for a lightweight blogging system. http://tutorialzine.com/2013/03/simple-php-blogging-system/ The only problem I have with this, is that I have to create an archive table.I would like to show the most recent 5 written articles. I believe that you can get an array to show of a directory. The articles are written using a software called markdown pad. They are saved as markdown files in a folder. How can I create the archive table using this blogging system ? Any help would be much appreciated
  5. You guys always help. I'm NOT a javascript programmer but am learning slowly. Here's the situation: I'm loading dynamic content I originally created for PHP and MySql for this sites main page. No problems there. I savvy PHP. But now I'm building a phone app using juerymobile (mostly... lot's of custom javascript in there as well). So I'm calling for the dynamic content to be loaded via AJAX and JSONP. No problems there either. (basically getting that info from a PHP file of course that gets the info from the database). Now in PHP once I have that ID for the content I want I can manipulate things to my hearts desire. Since I'm not a javascript programmer it's hard for me to wrap my head around the way to accomplish what I can with PHP. I'm truncating data. I want to slide to a new view when an arrow is clicked. So I don't have to call for the data again, I'm hiding a div that slides into view when clicked. But I need the content of that particular row (in MySql) and only that row to appear in that div. I have that data in a var but since it's in a loop.... I can pass the ID on to javascript if that helps. Some good reading would be nice to increase my learning. Stupid class I took online didn't get into these kinds of details. Thanks!
  6. The HTML is below. I'm struggling to find an easy jQuery way to scroll to a given row (classes abc, def, xyz). I've tried various versions of scrollTop, offset, offsetParent, and more. All to no avail. The cart_item_wrapper is 150px tall, and it exists to allow the "cart_items_table" to show its items in a scrollable manner. What is the best way to scroll to a div in a div? <div id="cart_item_wrapper"> <table id="cart_items_table"> <tbody> <tr class="abc" style=" "> <td class="icon_col"></td> </tr> <tr class="def"> <td class="icon_col"></td> </tr> <tr class=”xyz”> <td class="icon_col"></td> </tr> <tr> <td class="icon_col"></td> </tr> <tr> <td class="icon_col"></td> </tr> </tbody> </table> </div>
  7. Ok. Have it truncating the way I want. Problem is now when I click "More" I get Less Less Less Less Less Less then the final Less is a link. The others are not. This is in the loop I get back from my PHP file using JSONP. I've looked at it 6 ways to Sunday but can't seem to figure out how to make less less's :-) Odd that only the last one is a link the rest are just text. $.each(data, function(index, user){ var minimized_elements = $('p.minimize'); minimized_elements.each(function(){ var t = $(this).text(); if(t.length < 90) return; $(this).html( t.slice(0,90)+'<span>... </span><a href="#" class="more">More</a>'+ '<span style="display:none;">'+ t.slice(100,t.length)+' <a href="#" class="less">Less</a></span>' ); }); $('a.more', minimized_elements).click(function(event){ event.preventDefault(); $(this).hide().prev().hide(); $(this).next().show(); }); $('a.less', minimized_elements).click(function(event){ event.preventDefault(); $(this).parent().hide().prev().show().prev().show(); });
  8. Ok. I have the jsonp working the way it should and I get the info back from a cross domain url. I copied the truncate portion of this code but it doesn't seem to be working for me. What's wrong with this code? I know it will be obvious but I'm new to javascript. :-) <script type="text/javascript"> $(function(){ var minimized_elements = $('p.minimize'); minimized_elements.each(function(){ var t = $(this).text(); if(t.length < 100) return; $(this).html( t.slice(0,100)+'<span>... </span><a href="#" class="more">More</a>'+'<span style="display:none;">'+ t.slice(100,t.length)+' <a href="#" class="less">Less</a></span>' ); }); $('a.more', minimized_elements).click(function(event){ event.preventDefault(); $(this).hide().prev().hide(); $(this).next().show(); }); $('a.less', minimized_elements).click(function(event){ event.preventDefault(); $(this).parent().hide().prev().show().prev().show(); }); $.get("http://www.somedomain.com/app_ajax.php?callback=?", function(data, textStatus){ $.each(data, function(index, user){ var newDiv = '<div class="prayer_received">' var newName = '<div class="name"><h2>' + (user.name) + '</h2></div>'; var newRequest = '<div class="prayer"><p class="minimize">' + (user.request) + '</p></div>'; var newDate = '<div class="date"><p>Posted on' + (user.date) + '</p></div>'; var newTimes = '<div class="times"><p>Prayed for' + (user.times) + ' times</p></div>'; var newRule = '<div class="rule"><hr></div></div>'; $("#request").append(newDiv + newName + newRequest + newDate + newTimes + newRule); }); }, "json" ); }); </script>
  9. I have the code that dynamically generates textboxes and select boxes upon a button click. I want to fetch the data from DB and display in the dynamically generated select box. Fiddle http://jsfiddle.net/hEByw/10/ shows how the text and selectboxes are generated dynamically. Jquery code var counter = 1; $(document).ready(function () { $("#addButton").click(function () { if(counter>7){ alert("Only 7 textboxes allow"); return false; } //To Display the tax types from DB $(function(){ var items=""; $.getJSON("get_tax_type.php",function(data){ $.each(data,function(index,item) { items+="<option value='"+item.id+"'>"+item.name+"</option>"; }); $("#tax_type' + counter + '").html(items); }); }); var newTextBoxDiv = $(document.createElement('div')) .attr("id", 'TextBoxDiv' + counter); newTextBoxDiv.after().html('<label>Product #'+ counter + ' : </label>' + '<input type="text" size="60" name="product[]"\n\ id="product' + counter + '" value="" > \n\ <label>Quantity #'+ counter + ' : </label>' + '<input type="text" size="2" name="qty[]" \n\ id="qty' + counter + '" value="" > \n\ <label>Rate #'+ counter + ' : </label>' + '<input type="text" size="2" name="rates[]"\n\ id="rates' + counter + '" value="" > \n\ <label>Tax #'+ counter + ' : </label>' + '<select id="tax_type' + counter + '" ></select> \n\ <label>Tax% #'+ counter + ' : </label>' + '<select id="tax_type' + counter + '" ></select> \n\ <label>Total #'+ counter + ' : </label>' + '<input type="text" size="3" name="total[]" id="total' + counter + '" value="" onchange="calculate();"> '); newTextBoxDiv.appendTo("#TextBoxesGroup"); counter++; }); $("#removeButton").click(function () { if(counter==0){ alert("No more textbox to remove"); return false; } counter--; $("#TextBoxDiv" + counter).remove(); }); }); HTML Code <table> <tr> <td><strong>Select the products</strong> <input type='button' value='Add Products' id='addButton'> <input type='button' value='Remove Products' id='removeButton'> </td> </tr> </table> <table> <tr> <td> <div id='TextBoxesGroup'> </div> </td> </tr> <tr> <td> <input type="hidden" id="countervalue" name="countervalue" style="display:none;"> </td> </tr> </table> PHP Code <?php include('includes/db.php'); $q = "select TaxID, TaxName from tax"; $sql = mysql_query($q); $data = array(); while($row = mysql_fetch_array($sql, true)){ $data[] = $row; }; echo json_encode($data); ?> I have tried the following part of code to fetch the data from DB and Put into dynamically generated select box but its not working for me. //To Display the tax types from DB $(function(){ var items=""; $.getJSON("get_tax_type.php",function(data){ $.each(data,function(index,item) { items+="<option value='"+item.id+"'>"+item.name+"</option>"; }); $("#tax_type' + counter + '").html(items); }); }); Can any one suggest where am I going wrong or the correct way of doing it. I am new to jquery. Any help is appreciated.Thanks in advance.
  10. Hi all Am trying to combine two JQuery functions, but without any success. if (querySt("photoid")) { var value = querySt("photoid"); alert(value); } with window.onload = function() { if(window.location.hash) { $(window.location.hash).trigger('click'); } }; Have tried the following: if (querySt("photoid")) { var value = querySt("photoid"); window.onload = function() { if(window.location.value) { $('#' + window.location.value).trigger('click'); } } }; Hash requires to be replaced with the actual '#' symbol. photoid returns the image id value like 415. Any suggestion will be much appreciated. Kind regards, Charl
  11. Hi, As the title states, I am encountering a weird bug in javascript. In my php I am echoing out javascript that renders a jquery popup alert box to the screen. echo '<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script src="../functions.js"></script> <script type="text/javascript"> $(document).ready(function() { JQueryAlert("POO!", 120); }); </script>'; functions.js function JQueryAlert(message,windowHeight){ if (!windowHeight) var windowHeight = 470; $("#msgdialog").remove(); $("body").append("<div id=\'msgdialog\'></div>"); thatmsg = $("#msgdialog"); $("#msgdialog").dialog({ resizable: false, draggable: false, width: 770, height: windowHeight, context: thatmsg, modal: true, autoOpen: false, buttons: { "Cancel" : function (){ thatmsg.dialog("close"); }, "OK" : function (){ loadPage("combat.php"); } } }); $("#msgdialog").html(message); $("#msgdialog").dialog(\'open\'); } However, it only displays the pop up alert box sometimes. The rest of the time the screen just flashes and doesn't display the pop up box. Any ideas why it is behaving this way?? Thanks for your time.
  12. Hi, As the title states, I am encountering a weird bug in javascript. In my php I am echoing out javascript that renders a jquery popup alert box to the screen. echo '<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"/> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script src="../functions.js"></script> <script type="text/javascript"> $(document).ready(function() { JQueryAlert("POO!", 120); }); </script>'; functions.js function JQueryAlert(message,windowHeight){ if (!windowHeight) var windowHeight = 470; $("#msgdialog").remove(); $("body").append("<div id=\'msgdialog\'></div>"); thatmsg = $("#msgdialog"); $("#msgdialog").dialog({ resizable: false, draggable: false, width: 770, height: windowHeight, context: thatmsg, modal: true, autoOpen: false, buttons: { "Cancel" : function (){ thatmsg.dialog("close"); }, "OK" : function (){ loadPage("combat.php"); } } }); $("#msgdialog").html(message); $("#msgdialog").dialog(\'open\'); } However, it only displays the pop up alert box sometimes. The rest of the time the screen just flashes and doesn't display the pop up box. Any ideas why it is behaving this way?? Thanks for your time.
  13. Topic: custom jquery/ajax form in a sidebar template page The website Hi everyone, I made a custom form in a sidebar template page – a plugin is not an option. I got the validation working but the processing runs foul. Next I will explain in more detail what I did. Let me start off by saying: I am noob (and that’s probably stretching it). My problem – in short – is that a contact form validated with the jquery validation plugin, and submitted through ajax does not end up in my mailbox. And yes, I have a form processor php scrip attached but something goes wrong. But I don’t know what. Now I have been searching the internets for an answer. Of course I don’t thoroughly understand the javascript and php stuff. None the less I did put the necessary scripts together in accordance with the many explanations that I have read. My own guess Before I will show you the custom scripts I want to address what I think is going foul. I made a valid html form. I used the jquery validation plugin to use the validate function on the various fields. And I added some custom jquery to tell the validation plugin exactly what fields are required. On top of that I added ajax, via the jquery form plugin, so that the form doesn’t reload upon submittal. Now the validation works – see for yourself here. And as soon as all fields are filled out correctly, and I press submit ajax kicks in because I see the button value change as intended. After a short load – sending sequence – the button changes to ‘message send’. But I receive no email. And I have checked my spam folder: it’s empty. In previous tests – with a different script – I did receive emails with the contact form values (but there were other issues). I am using this contact form in a WordPress template. Perhaps it is the php processor? But I can’t see what’s wrong with that file. Also in Firebug, under ‘console’ I see a GET string with the form values after submittal. My question is. Can someone take a look at the form (because I think the post action might be wrong, the form processor is located in the template file), the custom jquery script and the php script? Plus after the form is successfully submitted, via ajax, I would like the form to reset, to clear all fields; how would I do that? Btw I read somewhere I can use a WordPress function to add the admin e-mailaddress in the php form processor – where you would normally put down the receivers emailaddress. Is this true? And how would I do this? Any help is seriously appreciated. Thank you for your time. You can check the script and code over at Pastebin: Sidebar template page containing the htlm form http://pastebin.com/0Ucn306n Custom jquery form validation script http://pastebin.com/xxPdV7eL Php form processor http://pastebin.com/1LKVPx2v
  14. Hi guys, I am currently going through the Lynda Learning Jquery Essential training course. I have completed all the lessons in the first chapter however on the last lasson in the chapter that puts everything together in a practical example I cant get it to work properly. This is really anoying as i have spent all my free time this week studying. Anyway, the lesson/code should work like this, display a small PDF icon next to every href element in the document the has the .pdf extension. However when i preveiw the code below none of the pdf images are displayed. This is the 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> <title>Automatic PDF Icons</title> <style type="text/css"> li { margin: 5pt 0 0 5pt; } </style> <script type="text/javascript" src="js/jquery-1.9.1.js"></script> <script type="text/javascript"> $("document").ready(function() { $("a[href$=.pdf]").after("<img src='images/small_pdf_icon.gif' align='absbottom' />"); }); </script> </head> <body> <h1>Example: Automatic Insertion of Icons for PDF Links</h1> <p>This example demonstrates how to examine the contents of a link to see if it points to a PDF file and automatically insert a PDF icon if it does.</p> <ul class="navlist" id="navlinks"> <li><a href="someurl.html">Link #1</a></li> <li><a name="#anchor1">Named Anchor Link</a></li> <li><a href="someurl.html">Link #2</a></li> <li><a href="someurl.pdf">Link #3</a></li> <li><a href="someurl.html">Link #4</a></li> <li><a href="someurl.html">Link #5</a></li> <li><a href="someurl.pdf">Link #6</a></li> <li><a href="someurl.html">Link #7</a></li> <li><a href="mailto:joe@joe.com">Email Link</a></li> </ul> </body> </html> Hope you guys can help me out on this one, I was really enjoying learning Jquery up until now. Many thanks in advance.
  15. I have an index.php that loads a page.php into a #result div. Page.php in turn has its own links and I have it so that when you click on one of these links it loads the respective page into the SAME #result div. Similarly that loaded page might have its own links and I want to continue loading content into the same div. The code for this is as follows: function loadPage(url){ $("#wrapper").load(url, function(){ $("#wrapper").find($('a')).each(function(){ $(this).on('click', function(e){ loadPage($(this).attr('href')); e.preventDefault(); }); }); }); } Say page.php has a link to page2.php. At the moment when I open the link to page2.php in a new window, it opens as page2.php. Same if I type the url to page2.php directly into my browser. I want it so that it opens as index.php but with page2.php loaded into its #result div(a duplicate of clicking the link normally in the original window). How do you do this?? I have tried lots of things including setting a session variable and passing to loadPage, but nothing seems to work.
  16. Hi, I'm trying to make a infinite picture cycle in jQuery; I know how to do it in Javascript but cross-referencing languages would be a little bit more harder so I'm wondering if they're a way I can do this in jQuery? Here's what I've attempted to do but doesn't work :/ Any ideas? Thanks. <script> $.seq = function() { $(this).fadeIn(2000); $(this).delay(5000); $(this).fadeOut(300, function() { $(this).next().seq(); }); return this; }; $(document).ready(function() { $("#picture_main_1").seq(); $("#picture_main_2").seq(); $("#picture_main_3").seq(); $("#picture_main_4").seq(); }); </script>
  17. Hi Guys I have got a datepicker on a site and have set the minDate to be tomorrow. <script> $(function() { $( "#delDate" ).datepicker({ dateFormat: 'd MM yy', changeMonth: true, changeYear: true, minDate: "+1D", constrainInput: true, beforeShowDay: noWeekendsOrHolidays }); }); </script> What I want to do is set the minDate to +2 if the time is after 5pm, anybody got any guidance on how to achieve this.
  18. So I am sure it is a common issue, but right now I am having trouble with a slideToggle effect. When I hover over the element, the hidden element slides down, but if I hover over the elemenet several times, and dont move my cursor, the hidden element will slide down, up, down, up, etc several times also. Am I supposed to use stop() function here or something? How can I disable all effects in a queue for this element, and only make the latest one happen.
  19. $('.cart_item').hover(function(){ $('.remove_cart_item').fadeToggle(); }); So the issue is that when I hover over the div class cart_item, all the divs with class cart_item show the hidden div class remove_cart_item. How do I get it to just show for the div its hovering over?
  20. Here is a snippet of the code for an assignment for my web programming class. I have to use PHP and JQuery to read a delimited text file and display the products in one row of a table. I have to use JQuery's toggle function to be able to show/hide details (price, image, and name) of a few products. Everything seemed to work until I started entering the JQuery code in the division. I have to use $productId as the id for the <div> and I seem to be having some trouble passing the variables to JQuery. I would appreciate any help anyone could offer as I'm at an impasse. I've attached a screenshot of the desired outcome. Thank you. echo "<h3>OUR PRODUCTS</h3>"; echo "<form name=\"shoppingCart\" action=\"checkOut.php\" method=\"post\"> <input type=\"button\" value=\"CHECK OUT\" onclick=\"document.shoppingCart.submit()\"> <input type=\"button\" value=\"MAIN MENU\" onclick=\"location='/'\"> <!--For aesthetic purposes only--> <button type=\"button\">INSTRUCTIONS</button> </form>"; echo "<p>Click a product name for details and to order it. After selecting products click CHECK OUT.</p>"; echo "<table>"; echo "<tr>";// open data file in read only mode $productsData = fopen("products.txt","r");// parse file in while loop and generate product info while(!feof($productsData)) { $row=fgets($productsData); $row=trim($row); $productArray = explode("^",$row); $productId = $productArray[0]; $productName = $productArray[1]; $productPrice = $productArray[2]; $productImageUrl = $productArray[3]; echo "<td width=\"220\" valign='top'>"; echo "<span style=\"font-weight: bold; font-size: 20px;\" onclick=\"$('#$productId').animate({height: 'toggle'}, 'slow' );\">$productName</span>"; echo "</td>"; echo "<td valign='top'> <div id=\"<?php echo($productId); ?>\" style=\"padding: 10px; display: none; font-weight: bold;\"> <img style=\"width: 200px;\" src=\"<?php echo($productImageUrl); ?>\"> <br> Send me: <select name=\"<?php echo($productId); ?>\"> <option value=\"0\">None</option> <option value=\"1\">1</option> <option value=\"2\">2</option> <option value=\"3\">3</option> </select> </div>"; echo "</td>"; };// close data file fclose($productsData);echo "</tr>"; echo "</table>";
  21. I have been trying to create a rollover effect that enlarges a div in the results page. Identical to the old google image results, when you rollover an image it would enlarge. I am currently doing this through jquery animate $('.product_result').hover(function(){ $(this).css('position', 'relative') $(this).animate({ 'width': '220px', 'height': '286px', 'margin-left': '-6px', 'margin-top': '-6px' }, 'fast'); },function(){ $(this).animate({ 'width': '200px', 'height': '260px', 'margin-left': '6px', 'margin-top': '6px' }, 'fast'); }); The problem is with this code is that it distorts the position of all other elements I want it to do the equivalent effect of being position absolute, when the height and width are increased, as to not affect layouts.
  22. There are a lot of solutions out there as to how to save the position of draggable DIVs but I haven't found any that will help with using a While loop in php. I have a database of "needs" and I want to display all the "needs" that match the persons username and status=inprogress. This could be 1 need or 1,000,000 needs depending on if the criteria is met. I want to save the position of the need (DIV) automatically when it's moved. Is this possible? Here the code I currently have that displays the "needs" (divs) <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <style> #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; } #set { clear:both; float:left; width: 368px; height: 120px; } p { clear:both; margin:0; padding:1em 0; } </style> <script> $(function() { $( "#set div" ).draggable({ stack: "#set div" }); }); </script>
  23. Hi there I have the following page, which includes a php mail function and sends a few of the fields via email successfully. Once the form is submitted, another page is displayed called 'Thank you'. (?page_id=2561) Question 1: Is there a way to reference all of the fields from the html tables at once in the php script (to email all the fields) or is it necessary to call each fields as I have done with 'companyName' etc? Question 2: How would I include all of the fields 'submitted contents' to display on the 'Thank you' page (?page_id=2561) - as I would like to add a 'print to pdf' button on this page, whereby the user can print the submitted form contents. I would greatly appreciate any advice / direction :) Thank you so much <?php { //send email $email = $_REQUEST['email'] ; $confName = $_REQUEST['conferenceName'] ; $companyName = $_REQUEST['companyName'] ; mail("myemail@yahoo.com", $confName, $companyName, "From:" . $email); } ?> <form method="post" id="quote" action="?page_id=2561"> <script type="text/javascript">// <![CDATA[ jQuery('#quote').keyup(function (){ doTotal(this); calcMenu(this); }); // ]]></script> <table id="table1" border="0" cellspacing="3" cellpadding="3"> <tbody> <tr> <td>Enquiry Date</td> <td> <div align="center"><input type="text" name="dateToday" size="25" /></div></td> </tr> <tr> <td>Conference Name</td> <td> <div align="center"><input type="text" name="conferenceName" size="25" /></div></td> </tr> <tr> <td>Company Name</td> <td> <div align="center"><input type="text" name="companyName" size="25" /></div></td> </tr> <tr> <td>Special Requests</td> <td><textarea name="comment" rows="5" cols="26"></textarea></td> </tr> </tbody> </table> <table id="table2" border="0" cellspacing="3" cellpadding="3"> <tbody> <tr> <td>First Name</td> <td> <div align="center"><input type="text" name="firstName" size="25" /></div></td> </tr> <tr> <td>Last Name</td> <td> <div align="center"><input type="text" name="lastName" size="25" /></div></td> </tr> <tr> <td>Tel No</td> <td> <div align="center"><input type="text" name="telNo" size="25" /></div></td> </tr> <tr> <td>Cell</td> <td> <div align="center"><input type="text" name="cellNo" size="25" /></div></td> </tr> <tr> <td>Email</td> <td> <div align="center"><input type="text" name="email" size="25" /></div></td> </tr> <tr> <td><input onclick="formReset()" type="button" value="Reset form" /></td> </tr> <tr> <td><input type='submit'></td> </tr> </tbody> </table> <table id="tablex" border="1" cellspacing="3" cellpadding="3"> <tbody> <tr> <th scope="col" width="30"> <div align="center">Date</div></th> <th scope="col" width="128"> <div align="center">Amount of Delegates ½ Day Conference @ R 240 pp</div></th> <th width="112"> <div align="center">Amount of Delegates Full Day Conference @ R 260 pp</div></th> <th width="112"> <div align="center">Menu No</div></th> <th width="112"> <div align="center">Price pp for Menu (1-7: R70, 8-10 R85, 11: R105, 12: R85)</div></th> <th width="112"> <div align="center">Total Persons for meals</div></th> <th width="112"> <div align="center">Amount of Single Rooms @ R 480 pp</div></th> <th width="112"> <div align="center">Amount of Double Rooms @ R 720 pp</div></th> <th width="134"> <div align="center">Total for the day</div></th> </tr> <tr> <td> <div align="center"><input type="text" name="date1" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday1" size="5" maxlength="10" /></div></td> <td> <div align="center"><input type="text" name="fullday1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice1" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons1" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms1" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms1" size="5" /></div></td> <td> <div align="center"><input type="text" name="total1" size="5" /></div></td> </tr> <tr> <td> <div align="center"><input type="text" name="date2" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday2" size="5" /></div></td> <td> <div align="center"><input type="text" name="fullday2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice2" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons2" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms2" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms2" size="5" /></div></td> <td> <div align="center"><input type="text" name="total2" size="5" /></div></td> </tr> <tr> <td> <div align="center"><input type="text" name="date3" size="10" /></div></td> <td> <div align="center"><input type="text" name="halfday3" size="5" /></div></td> <td> <div align="center"><input type="text" name="fullday3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuNo3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MenuPrice3" size="5" /></div></td> <td> <div align="center"><input type="text" name="MealPersons3" size="5" /></div></td> <td> <div align="center"><input type="text" name="SingleRooms3" size="5" /></div></td> <td> <div align="center"><input type="text" name="DoubleRooms3" size="5" /></div></td> <td> <div align="center"><input type="text" name="total3" size="5" /></div></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> </tr> </tbody> </table> </form>
  24. Good day, I've got a problem getting the value of the parameter on a function I've got this code to append on my div $(' .'+type).append(' <a href="#" id="'+type+'-'+desId+'" class="admin-managers"> <span class="admin-managers" id="'+name+'">'+name+'</span> <span id="'+desId+'" onclick="remove('+type+','+desId+')" class="remove" name="<?php echo $type; ?>"></span></a> '); that is how I append the data and it is working fine, But on the "remove(type,desId)" function on: function remove(type,id){ Alert(type); } the id is working fine, but on the type everytime I alert it it return "javascript:void(0)"> What is that happening,? ?
  25. Hi there, i'm busy with a project but know im stuck at some point. What i want to do is, when someone presses the home button it changes his color. How I wanted to do is swap from image 1 (white) to image 2 (blue). So the person can see on which page he/she is. But when i put this code into the website, it wont show nothing. When i press 2 times it will show the blue image. And when i press many times you see the white and blue image swapping. But it won't stand on the white image, only on the blue image Here is the code i use. --> <a href='' "<?php echo $this->createUrl("/admin/survey/sa/index"); ?>" onclick="edit()"><img id="img1" onclick="imageChange(this)"'<?php echo $sImageURL;?>home.png' alt='<?php $clang->eT("Default administration page");?>' /> <script type="text/javascript"> { var img1 = "/LimeSurvey/styles/scanyours/images/home.png"; var img2 = "/LimeSurvey/styles/scanyours/images/home1.png"; } { var imageChoice = 1; } function imageChange(element) { if (imageChoice == 1) { element.src = img2; imageChoice = 2; } else if (imageChoice == 2) { element.src = img1; imageChoice = 1; } } </script></a>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.