- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 13
- Posts with Upvotes
- 13
- Upvoting Members
- 12
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
127 Posted Topics
Re: What I end up doing quite a bit, is making the div clickable, but allowing for people without javascript to access the link (such as search spiders). One way to do this is using jquery -- [code=javascript] $(function(){ $('div.link:has(a)').click(function(){ $(this).addClass('linked'); /*Allows for CSS hover and different styles for link clicks.*/ … | |
Re: On a mac, all you have to do is install PHP and use the built-in apache server. If your on linux I'd install a lamp package. However, if you are on windows (which I think so...) I wouldn't really recommend using a package, and doing it by installing the Apache … | |
Re: Couldn't you send emails using the wireless provider's gateway? [email]usernumber@wirelessprovider.tld[/email]? | |
| |
Re: My advice: If you're already using python, and like it, and need a backend interface, definately use django. If you want to learn something new, you can try ruby on rails. But there is no reason to just use rails because everyone else is using it: Rails Example: [url]http://glossedglossary.heroku.com/[/url] [url]http://apps.facebook.com/stuffido[/url] … | |
Re: Javascript Image Rotator: (not PHP) Usage: The switchtime is milliseconds to switch (at 5 seconds right now), The images array is an array of images to be cycled through. They can be a relative or absolute path. [code=javascript] /*CodeJoust Javascript Imagerotator object. */ var imgRotator = { init: function(el){ this.timeout … | |
Re: You also can use a (rather antiquidated, but included) cgi class. The CGI class would be like [code=ruby] #!/usr/bin/env ruby # *-ruby-*- require 'cgi' # Create an instance of CGI, with HTML 4 output cgi = CGI.new("html4") # Send the following to the CGI object's output cgi.out { cgi.html { … | |
Re: It looks like your YAML class is corrupted. Try reinstalling ruby: [icode]C:/ruby1.9/lib/ruby/1.9.1/yaml.rb:9:in `require': no such file to load -- stringio (LoadError)[/icode] means that the stringio library is missing, and essential for yaml to run, which is essential for rubygems to run. | |
Re: In short. No. However, if, as noted before, you are using php files for data access, you can use pure ruby (or sinatra-like frameworks) to work with the data. Rails will be extremely hard to mix code. If your starting from scratch, learn ruby properly, and you won't need all … | |
Re: Start with learning bash and setting up a development linux machine, either virtual or dual-boot. It will really save you in time and effort later down the road. Then, install ruby on rails, and read through and do the first ruby on rails introductory guide [url]http://guides.rubyonrails.org/getting_started.html[/url] and go through that. … | |
Re: Well... I can't seem to load the website, it seems as if the dns is down. | |
Re: Try restarting your computer and stopping a running apache service. There is a webserver running that is conflicting with instant rails. To see what server it is, type localhost into your address bar and see what comes up. | |
Re: I've been quite happy with ubuntu's lamp package, with phusion passenger (on apache) for rails and ruby execution. | |
Re: Depends on what type of free hosting. If it's a host that will show ads, yes. If it's a host that won't let you use your own domains, yes. If it's slow, or goes down frequently, no. Otherwise, you should be fine if you don't normally get a lot of … | |
Re: [QUOTE=weeon;1027802]name database : db_shop table_user : uid_user, name_user table_shop : uid_user, date table_question :uid_user, date Help me.... if user wants to accessing to page question, script php will check formerly will what him buy or not yet in certain, has user answered what not yet in certain? if buy so … | |
Re: Do-- [icode]document.getElementById('myTable').getElementsByTagName('tbody')[0][/icode] to get the tbody instead of the whole table if you want to. Typically, browsers will try to 'fix' your markup by automatically inserting tbody. | |
Re: The bad code flying around on daniweb... yep. But don't be sorry about it... help make it better :). Teach people... | |
Re: Take a look at [URL="http://hpricot.com/"]hpricot[/URL] and [URL="http://nokogiri.rubyforge.org/nokogiri/"]nokogiri[/URL] | |
Re: The part about being different from before, can't be (easily) done through php, you'll need to do it through javascript (shouldn't be too hard). (HTTP is stateless). I'd also just have PHP generate a window open string, which you can put in a window.open() statement if an response is received. … | |
Re: Do you have the site url? Also, are you allowing any tags to work using strip_tags? | |
Re: If it isn't much data, using cookies would do the trick. However, if it's more, just stop the auto-refresh. What are you trying to accomplish? You also can look into a flash-type datastore if you need to store over 10kb of data. | |
Re: Is your database connecting at all? Is this an inherited program? | |
Re: Make an html page that uses a meta redirect and a moved message. Google will interpret that page as a redirect. However, don't use a javascript redirect, because google will not see that. | |
Re: [code=javascript] $(function(){ $("ul.sc_menu a").click(function() { $('#content #mainbg #infobox #trackinfo').animate({opacity:"0"}, function(){ alert('animated'); $.post('projects-agent.php', {'title': $(this).text()}, function(data){ alert(data); $('#content #mainbg #infobox #trackinfo').html(data); $('#content #mainbg #infobox #trackinfo').fadeIn('fast'); }); }); return false; }); }); [/code] Do the alerts go off with the code? It looked like a few syntax errors... They should be cleaned … | |
Re: 1st off - to 'OOP'ize code, you need to seperate views from the actual code. 2nd - Use a database class, an application class, and a main class. 3rd - Try to find a good templating system. I like phptal, and smarty works well too. You also can just include … | |
Re: I'd check your database for rouge entries, users. Double-check your file permissions, and if your on a shared host, it might be a bad security setup in the host, allowing access to the files. Are these scripts served from the db or are they in the source files? Do you … | |
Re: It might be an old version of ie7, thee are versions within versions. Try updating your computer. Also, it might be due to a cache issue, try refreshing holding down shift (Shift+F5) to clear the cache for that page. | |
Re: Save the client's ip (or session cookie id) on the server in the database when the entered information and the date. When that computer visits the website again, you can poll the database and provide that data. | |
Re: Take a look at for information and tutorials: [url]http://iain.codejoust.com/2009/05/learning-php-xhtml-css/[/url] I would recommend to start with [url]http://htmldog.com/[/url] and [url]http://w3schools.com/[/url]. | |
Re: Check the javascript for getting the source, it seems to use IE-only extensions. Also, check for popup blockers, and look in the firefox error console for errors (Tools>>Error Console). | |
Re: Learn javascript in an out. Take a look at the contenteditable property. Also, learn how to find the currently selected text within a textarea. jQuery is good to learn, and take a look at a very simple WYSIWYG javascript editor on how to do stuff (even ckeditor). Hope that helps! | |
Re: Usually programs of this sort are called Content Managament Systems, that keep the content of a website within a database, and shown by a template. Some good CMS solutions and reviews can be found at [url]http://net.tutsplus.com/articles/web-roundups/top-10-most-usable-content-management-systems/[/url]. I'd personally recommend silverstripe or drupal. | |
Re: What is the styling applied by? Is it inline the ajax input, or provided using css classes. Does that html get escaped into visible entitles? Also, try adding ';'s after every function call, it might be a bug. | |
Re: You need to install the command line utilities for PHP: [icode]sudo apt-get install php5-cli[/icode] | |
Re: Learn jquery if you want to quickly and easily do menu switches: [code=javascript] $(function(){ $('a.menu').click(function(){ var loc = $(this).attr('href'); $('#content').load(loc+' #content'); }); }); [/code] If need to put a javascript link to jquery first if you use it, though. It takes the href, the loads the content div of the … | |
Re: From a technical and SEO standpoint: Sometimes you might want to duplicate the content on all domains, pointing them to the same documentroot. If you want to user to think he is on the website name he is on, use php to detect the domain and change the branding accordingly, … | |
Re: AJAX indeed does power Google's AutoSave. The whole back-button conundrum-- was it any better with old-school cgi apps? Those are horrible in comparison. I think web 2.0 is another catchphrase for interactive websites using newer and more powerful technologies such as rich javascript and powerful serverside frameworks and languages. web … | |
Re: Try escaping your forward-slashes and removing the *s. [icode]RewriteRule ^admin\/([^/])\/([^/])$ /admin/2.php?mode=$1&id=$2 [L][/icode] | |
Re: Try This:: [CODE=javascript] function nextdate(userid,weeknum) { weeknum++; var date = document.userform.weekof.value; window.location= 'timesheet.php?userid='+userid+'&ndate='+date+'&wno='+weeknum; } [/CODE] | |
Re: What do you mean? Using a CGI Script, Rails, Sinatra, or HAML/SASS? Could you specify what you want to do. | |
Re: Unless you have a mailserver running on localhost, port 25, PHP cannot send emails. You either need to change the SMTP ports or mail function. SMTP remotely connects to a remote mail server, allowing you to email from it. | |
Re: Look at [url]http://www.magentocommerce.com/[/url] | |
Re: Also, it isn't necessary to echo out the forms...It's a lot easier to directly include them outside the PHP tags. I'd also try to use better variable naming. Why all the nonbreaking spaces? ([icode] [/icode]). If you REALLY need a space, try using CSS to provide that. ([icode]<div style="width:200px; height:200px; position:relative"></div>[/icode]) … | |
Re: You can also try just adding a simple array in a php file, then checking it with [icode]inarray($array, $username)[/icode] in an if. Another option would be to do an sql query:[code=sql] INSERT INTO `users` ... WHERE (SELECT id FROM `invalidusers` WHERE `username` = `{$username}` IS NULL)[/code] | |
Re: I think only the thread starter can delete the thread. | |
Re: I simply would use an expiring session cookie. That way, you wouldn't have to worry about the database usage and cron jobs. Usually, it isn't a good idea to store temporary information on the server. ![]() | |
Re: Be careful to not use overloaded shared hosts. Typically the 'Top Ten' websites are 100% ad-supported. I've had a good experience with [url]http://www.hawkhost.com/[/url] and [url]http://downtownhost.com/[/url], both of which use litespeed and aren't oversold (selling more than they really have), if something is too good to be true, it probably is. … | |
Re: I typically use gedit or notepad++ or textwrangler. But, if you like all the futures of an ide, [url=aptana.com]Aptana[/url], which is built upon eclipse, is a good choice. It has inline debugging, code suggest, code outlining, phpdoc, etc. The only problem with it is it is slightly bloated (as with … | |
Re: I don't quite understand what you mean? You can trigger children elements on hover like: [code=css]body:hover form {background:red;} /*or*/ body:hover div#form-cover { display:visible; } #form-cover { position:absolute; z-index:20; background:black; margin-top:-(1/2 height of the element)px; margin-left:-(1/2 width of the element)px; height:(height of element)px; width:(width of element)px; } [/code] |
The End.