719 Posted Topics
Re: That is easily accomplished with css, use position [B]fixed[/B]. Fixed position is relative to the browser window, so it will never move even if the page scrolls. Good luck. | |
Re: I'd say to try this: [CODE] $(document).ready(function(){ $('input[name=button1]'.click(function(){ $("p").hide(); }); }); [/CODE] | |
Re: Here is a demo: [CODE] <html> <script> function slcMes_change() { document.getElementById("slcDia").options.length = 0; for(var i=0; i < 31; i++) { document.getElementById("slcDia").options[i] = new Option(i+1, i+1); } } </script> <body> <select id="slcMes" size="1" onchange="slcMes_change()"> <option value="0">Select</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <select id="slcDia" size="1"></select> </body> </html> [/CODE] … | |
Re: This thread discuss the same thing: [URL="http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/405660"]http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/405660[/URL] | |
Re: JQuery UI has a good drag and drop functionality. When adding the drag on drop functionality you must specify the drop event listener, so you can do the redirection. ![]() | |
Re: You have the logic, you just need to get the divs instead of the images. To do that use: document.getElementsByTagName("div"). And don't forget to loop throw the array, cause in your code you are justing change the image indexed at 0. | |
Re: Yes, it's possible and not much complicated. There's another post about this. See here: [URL="http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/405660"]http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/405660[/URL]. There he is doing with pure javascript, i would do it with JQuery, it would be much easier. Good luck. | |
Re: What do you want to display on the homepage? The users? If so, use asp:repeater to create a box for each one. To store multiple images you can do it both ways, as you said it. But i prefer to store it on disk and store the file path in … | |
Re: href="mailto:no-reply@mydomain.com" specify to use the mailto protocol with the [email]no-replay@mydomain.com[/email] as a parameter. To do what you want you need to create a javascript function that will make an ajax request to change the session variable and return the content you want. Hope it helps. | |
Re: Your code looks ok, did you check those itens: - From e-mail and from password are really ok? - Gmail port is really 587? If it's ok, try those things: - Don't set EnableSsl - Don't set UseDefaultCredentials - Don't set DeliveryMethod i used gmail smpt and never set those, … | |
Re: IE 9 it's even better =D | |
Re: I won't code it for you, but the solution is quite simple: You want to have the same functionality in the top box and in each added row, so you need to use the same logic, same functions and same css classes. But you need to make sure that it … | |
Re: When you set the selectedValue with javascript it does not update the UI, for it to work, as you wish, you have to set the [B]selectedIndex[/B] property. If you don't have the selected index you may loop the select options and test the values to find the right index. Hope … | |
Re: Take a look at this: [URL="http://javascriptsource.com/page-details/highlighted-text.html"]http://javascriptsource.com/page-details/highlighted-text.html[/URL] | |
| |
Re: JQuery make this very easy: [CODE] <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script type="text/javascript"> $(function() { $("#menu > li").click(function() { $(this).children("ol").slideToggle(); }); }); </script> </head> <body> <ul id="menu"> <li>Menu Item 1 <ol> <li><a href="#">Sub Item 1.1</a></li> <li><a href="#">Sub Item 1.2</a></li> <li><a href="#">Sub Item 1.3</a></li> </ol> </li> </ul> </body> </html> [/CODE] Hope … | |
Re: [CODE] echo '<button onclick="jabutton">Run</button>'; [/CODE] You can't put an <button> inside an <script>. | |
Re: There was a couple of problems with your code... i've adapted to work somewhat: [CODE] <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <style type="text/css"> .cancasing { margin-left: 200px; margin-top: 100px; border-style:solid; border-width:1px; width:900px; height:500px; } </style> </head> <script type="text/javascript"> jQuery.fn.extend({ // Extends JQuery methods drawRect: function(options) { // add drawRect method var … | |
Re: Jean, I didn't fully understood what you are trying to do, but I suggest you use Regular Expression for such comparisons. | |
Re: Please post the code for gallery.php. The parameter 'g' is being passed thru the link, but maybe is not being used on gallery.php. | |
Re: What you want is a horizontal accordion menu. There's a lot of example on the web. Here's a couple, using JQuery: [url]http://designreviver.com/tutorials/jquery-examples-horizontal-accordion/[/url] [url]http://www.portalzine.de/Horizontal_Accordion_Plugin_2/index.html[/url] Hope it helps. | |
Re: I'd suggest that you first create the HTML and CSS of the image displayer(the 3 layers your friend told you about). When the look is the way you want, you hide it(display: none; for example) and then start playing with JS e JQuery to open the displayer and set the … | |
Re: Man, you posted 900 lines of code. Sorry, but I don't think anyone will go thru all that. Post only the section you need help with. Cheers. | |
Re: The syntax is wrong. This should work: [CODE] (function($){ $.fn.randomize = function() { var defaults = {}; var options = $.extend(defaults, options); return this.each(function() { obj = $(this); alert(obj); }); } })(jQuery); [/CODE] | |
Re: To get the text box is very simple, you can use the class selector to match all text boxes with that class: [CODE] <script> $(".contentbox").keyup(function() { ... }); </script> <input type="text" class="contentbox" /> [/CODE] For each dynamically created text box you will have an count box? If so you'll have … | |
Re: You should only create the elements by JS when needed. You can create the table in pure html and then just add the dynamic rows. Something like this: [CODE] <html> <head> <title>Future Value Calculation</title> <style type = "text/css"> table { width: 100% } th { text-align : left } th … | |
Re: I didn't understood much of what you said. But PHP cannot hold a JS var, PHP can only execute JS by writing it and JS can only execute PHP by a server request. Is something like this you want? [CODE] <?php echo('<script type="text/string">window.open(....);</script>'); ?> [/CODE] | |
Re: The best way to validate e-mail address is with regular expression. Here's the one I use: [CODE] // returns true or false function isEmail(str) { var regExp = /\b([\w-\.]+\@([\w-]+\.)+[\da-zA-Z]{2,4})\b/; regExp.test(str); } [/CODE] Hope it helps. | |
Re: From inf.php you want to be able to access the ft.php fields? | |
Re: In a <select> you must use the onChange event to do this kind of stuff. Because click event will be fired before the user select some option. | |
Re: When you use the keyboard to select the options and then send the form, witch value does it have? If you alert the value of a select, using keyboard to select it, what happens? It's undefined or a wrong value? | |
Re: Javascript can't connect direct with the database. You have to send the data to the PHP page that will handle it. You can use JQuery to do it cleanly with AJAX. [CODE] // Send a post request to PHP_PAGE.PHP with the image data $.post("PHP_PAGE.PHP", { image: myImageVar }, function(response) // … | |
![]() | Re: Use location.search to get the query from the url. Like this: [CODE] $(function(){ var path = location.pathname.substring(1); if ( location.search ) path += location.search; if ( path ) $('#nav ul#navigation li a[href$="' + path + '"]').attr('class', 'selected'); }); [/CODE] Hope it helps. ![]() |
Re: You are alerting "req.value", witch doesen't exists. And you cannot set a <select> innerHTML, you must add options to it. The PHP page should return just the data, without the HTML. You could do it with XML, JSON or with your own syntax. If you in the future need to … | |
Re: What do you mean? Your code is working ok. I mean, it's adding text inputs and buttons, and the button reset works fine too. | |
Re: IE needs to be configured to accept ActiveXObjects in the advanced properties. If the browser is set to not accept it, you'll receive "Access Denied" error. | |
Re: It's quite simple with JQuery. The boring part is to make the css. Check this simple example: [CODE] <html> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script> //document ready $(function() { $(".item").hover(function() { $(this).css("z-index", 999); // Set item to be on top of everybody else $(this).children(".label").slideUp(); // Hide label on mouse over $(this).children(".description").slideDown(); // … | |
Re: To learn the basics: [URL="http://w3schools.com"]w3schools[/URL] JS References: [URL="http://www.devguru.com/technologies/ecmascript/quickref/javascript_index.html"]DevGuru[/URL] [URL="http://javascript-reference.info/"]javascript-reference[/URL] PHP Referece: [URL="http://php.net/docs.php"]http://php.net/docs.php[/URL] XHTML Tutorial: [URL="http://www.webheadstart.org/xhtml/"]http://www.webheadstart.org/xhtml/[/URL] XHTML Reference: [URL="http://www.w3.org/TR/xhtml1/"]http://www.w3.org/TR/xhtml1/[/URL] AJAX Tutorials: [URL="http://www.php4every1.com/tutorials/jquery-ajax-tutorial/"]http://www.php4every1.com/tutorials/jquery-ajax-tutorial/[/URL] [URL="http://www.sitepoint.com/ajax-jquery/"]http://www.sitepoint.com/ajax-jquery/[/URL] Good luck with the studies. | |
Re: Hi, you have to loop the existing rows and see if the values matches. And one advice, don't use ////////// in comments. Instead use //------ or /******/. Here is the loop code: [CODE] //------------------------------------------ // here is my code to change quantity //------------------------------------------ if ( tab.rows.length > 2 ) { … | |
Re: It would be something like this? [CODE] <html> <head> <script language="javascript"> window.onload = function() { var divImages = getById('images'); for(var i=0; i < divImages.children.length; i++) { divImages.children[i].onclick = function() { getById('images-list').innerHTML += '<img src="' + this.src + '" width="100" height="100" />'; } } } function getById(id) { return document.getElementById(id); } … | |
Re: I don't think you can do it directly. You would have to use some PHP MVC framework. Natively PHP is executed by a file request, not an method request. | |
Re: And what's the problem? You can't get the textarea object or you can't just get it's value? | |
Re: You are using Windows Forms or ASP.NET? In asp.net there is the Session object. That you can use like this: [CODE] Session["myVar"] = 10; int myVar = (int)Session["myVar"]; [/CODE] If you are using windows forms and don't know if there is anything like that. But you could use static variables … | |
Re: I've add somethings to your code to make it work like you would like it to. To update the total and grand total after changing the value you need to listen to the input change event, so you know when to recalculate it. [CODE] <html> <head> <script type="text/javascript"> function updateSum(formID, … | |
Re: Use [URL="http://jquery.com"]JQuery[/URL] my friend. They have the best selectors. [CODE] //To set the innerHTML of <li class="item31"> // # is the ID select // . is the class selector $('.item31').html('My new HTML'); [/CODE] JQuery it's a very useful JS lib, learn it and it'll save u time =) Seeya. |
The End.