I have to put a site down for about half an hour while we put a second server in place. Using .htaccess, how can I redirect ANY request to domain.com to domain.com/holding_page.php?
I would like to disable client side validation on certain fields in my user form. Currently I have two sets of fields that are displayed depending on the value of a previous drop down list. i.e. if the drop down list is set to value "A" 1 new field appears in the form. If the drop down list is set to value "B" 3 new fields appear in the form (mutually exclusive from the new form field when "A" is selected). Currently my Dojo client side validation fails because the fields that are not shown to the user (and thus no data can be inserted into those fields) fails to validate.
Currently I determined that I can set the "validate" attribute to return true like so:
<input type="text" id="companycity" name="companycity" class="textinput" value="<?php echo set_value('companycity'); ?>" style="<?php if(isset($errorData['companycity'])){echo $errorData['companycity'];} ?>"
dojotype="dijit.form.ValidationTextBox"
required="true" trim="true" validate='return true'"
regexp="([a-zA-Z]{1,25})"
invalidMessage="Invalid value. Must be between 1 and 25 alphabetic characters long.">
This fixes my issue for hidden fields. However this now means that no validation is performed when this field becomes visible to the user (i.e. the validate attribute is still set to return true).
I have tried removing the validate property when a field is displayed to the user like so:
dijit.byId('companycode').attr('validate','');
This just set the attribute to nothing. This however gives errors in firebug saying validate method not found, so I take that to mean I did not remove this attribute correctly or removing this attribute is not the appropriate way to do this.
I have also looked at overriding the validator method here but this doesnt seem like what I want either. I do not want to have to rewrite all the validation methods in place of dojo's.
I just want dojo not to validate if the field is not visible to the user. Thanks for any advice or help.
When I try to insert a link using the TinyMCE link plugin all that happens is I get an empty popup box.
It continuously tries to load:
tiny_mce/utils/mctabs.js
tiny_mce/utils/form_utils.js
tiny_mce/utils/validate.js
tiny_mce/themes/advanced/js/link.js
I've seen solutions where you need to edit a config.php file, but I only have the JS version of TinyMCE
Ok, I have a site, and it serves all images and mp3s through a php script and can be controlled and limited, but I am now worried about overall bandwidth of my site. For example, what if someone just sends a million requests to one of my pages? Does anyone have any suggestions into server methods used to prevent this? Should I use mod_cband http://www.howtoforge.com/mod_cband_apache2_bandwidth_quota_throttling_p2?
Hello all,
There is an application available for jailbroken iPhones called YourTube which adds extra functionality to the stock YouTube application. Info here:
http://forums.macrumors.com/showthread.php?t=754439
My question is... how is this possible and how could I do something similar?
Many thanks,
Stuart
I want to develop a Single-Sign-On(SSO) or centralized authentication server (CAS) project for SSO between asp.net, php and java.
Is there any Single-Sign-On(SSO) or centralized authentication server (CAS) open source project using asp.net c# ?
IF some says to me to build webisite in java. What does that mean.
That means building in core java, java servlets , jsp , java beans , j2ee or what.
What thing i need to learn if some tells me to make webiste in java.
Just like there are ready made login scripts in php , are those available in java as well
thanks
I am using codeigniter. I want to know how to set up a cron job to check a table for expiring users and insert data in to another table with the list of expiring users. How to do that.
When i tried to write a script with controller and model to insert the table
:
Content-type: text/html
Fatal error: Class 'Controller' not found in /home/content/html/test/live/application/controllers/cron.php on line 2
Hello,
I'm looking to evaluate a few opensource e-commerce solutions. Are there any good alternatives to OSCommerce out there ?
I've looked at Thelia and Magento so far, are there any others that are worth looking at ?
They should be :
Free as in freedom
Easy to maintain / extend
Coded in PHP or Python (ideally, but I'm open-minded)
Hello, I need to implement in Html/javascript (or php is possible) a script which works like twitter, when the user writes text in a field a label change showing the characters left.
Can you help me with a simple and easy script example?
When i dump a table with uppercase letters using mysqldump it comes out as lower case in my dump.sql file. I found a report here in 2006, almost 4 years old http://bugs.mysql.com/bug.php?id=19967
A solution here suggest making linux insensitive. I rather not if possible. Whats the easiest way to copy a win32 db into linux?
Greetings,
I will certainly hope someone will be able to provide some enlightenment to my problem.
Currently, I have 2 joomla sites, layout and menus are a replicate of the other.
I noticed that on both Joomla, I will occasionally encounter "Unable to send mail" after a form submission.
Is this the fault of my server, or the fault of Joomla's PHP Mailer ? I will certainly love to approach my hosting company for a solution but I do not want to place a false accusation on them.
http://www.mysite.com/http://www.test.com
I have tried many different methods using .htaccess with no luck. I need to get that second url coming as parameter. Is it possible to redirect it to index.php and get it as $_SERVER["REQUEST_URI"] or other method? Thanks
What could be the easiest way to match all links and e-mail addresses in a string to a list array? I was using preg_match in PHP but in C# it looks like it will be way different.
I'm loading content into several divs with
ajax_loadContent
<div class="content"><div class="container" id="contents2"><!-- Empty div for dynamic content -->Loading content. please wait...</div><script type="text/javascript">ajax_loadContent('contents2','http://www.thewebsite.com/blank.php');</script></div>
Basically, I don't want to load anything until the user clicks on the links I have specified to load content into these instances, please help! Right now, I'm loading a blank file to show nothing in the div.
I have a folder full of files and i want to search some string inside them. The issue is that some files may be zip,exe,ogg,etc.
Can i check somehow what kind of file is it so i only open and search through txt, php, etc files.
I can't rely on the file extension.
Hey
I'd like to know how to use XMLHttpRequest to load the content of a remote URL and have the HTML of the accessed site stored in a JS variable.
Say, if I wanted to load and alert() the HTML of http://foo.com/bar.php, how would I do that?
Thanks!
Hi guys, I've got this table
CREATE TABLE `subevents` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(150) DEFAULT NULL,
`content` text,
`class` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM
Each row can have a different value in the 'class' field.
I'd like to select any number of rows, ordered randomly, as long as the sum of the values in the 'class' field is equal to 100.
How could I accomplish it directly in the MySQL query without doing it later in PHP?
Thanks everybody!
i need my url to be like this
http://google.com/index.php?title=about -> http://google.com/about/
the title more than 50,and same goes to pages
any idea?thanks
Hi all,,,
I am trying to do a small thing, any 1 help me, I really appricciate...
I have a drop down menu,I want when I select the value, it will call the related data, which I am access with php+mysql, I dont want to jump to other page and show
PostgreSQL has allowed me to name a column "campaign_$". I like the name because it's short and to the point, and other potential names like "campaign_receipts" seem longer and less clear.
BUT, I wonder if I'll eventually regret putting a $ symbol in a column name, either in PHP or in some other distant part of the architecture. Should I just stick to letters and underscores?
Thanks!
I want to have an admin page to manage user messages reported as 'spam'. I know how to use MySql and php to have a list of messages reported but I don't know what is the more safe way to access to this page. Local, https,... What strategy use big websites as Facebook, MySpace,... to verify that a message is a true spam and to delete it?
i wonder if there are tutorials that go through the syntax differences for ruby and python?
i have seen a comparison between ruby and php but not between ruby and python.
i have looked at both ruby and python but it would be very useful with this side-by-side comparison for deciding which one to choose.
thanks
how do i load all class files in a folder in codeigniter?
its for when i develop, i create and delete class files very often, i don't want to add/remove everyone manually in autoload.php.
thanks!