I have this function that changes the background color of a table row but it's not working correctly.
function changeColor(activeRow){
alert(document.getElementById("myTable").rows[activeRow].bgColor);
if (document.getElementById("myTable").rows[activeRow].bgColor == '#a2dd51')...
I have this script that allows me to move a table row up and down in a table.
var activeRow = 0;
function setActiveRow(el) {
var rows = document.getElementById('movingTable').rows;
for(var i = 0; i < rows.length; i++) {
if(rows[i] == el) {activeRow = i;}
}
}
function...
Why does this return results:
SELECT * FROM messages WHERE receiver_del = 'yes'
but this doesn't
SELECT * FROM messages WHERE receiver_del != 'yes'
There should be one result returned. there is one record that has the value in receiver_del set as yes.
The rest of the records have that...
I have this little script that works fine in firefox but not IE:
var dropdownIndex = document.getElementById('ship').selectedIndex;
var dropdownValue = document.getElementById('ship')[dropdownIndex].value;
document.getElementById("siteTotal").innerHTML = dropdownValue;
it is invoked by...
I am using the following script which works perfectly in Firefox, but in Internet Explore it's not working as expected. Basically, sometimes, the rollover effect works, and sometimes it doesn't. Also the menu rolls out slower in IE than in firefox.
Any help in debugging this issue would be...
I've been scratching my head for many hours trying to figure out if this is possible.
Basically I have a client who uses a number of different web portals, and he wants a remote login system. Essentially he would log into his site, and we would have a page with links for each one of these...
I have this query:
"SELECT * FROM ads WHERE cats LIKE'%$find%'"
lets say that $find is "Wines and Cheeses"
for some reason, it is selecting records that only have "wines" in them, so it will select "wines and beers"
How can I change this query so it only selects records that have the full...
I have a script that looks like this:
function calcFees(theCheckbox,reset){
var c = 0;
for (var i=0; i < document.forms['form1'].elements[theCheckbox].length; i++){
if (document.forms['form1'].elements[theCheckbox][i].checked){c = c + 1}
}
and it basically counts the number of...
how come this works:
$existing_users=array('roshan','mike','jason');
$user_name="roshan";
//checking weather user exists or not in $existing_users array
if (in_array($user_name, $existing_users))
{
//user name is not availble
echo "no";
}
else
{
//user name is available
echo "yes";
}...
I Have a site that needs a function (email settings).
If a user selects daily, once a week, every other week, every three days, they are supposed to receive an email with listings from a mysql database.
I don't really know how to do this. I think this may be done with cron jobs, but I would...
I had this script that was working fine on the development server and when I moved it to the new server it stopped working. I don't even know how to begin to debug this.
Normally when you select a county the town1 select box gets populated, but on the new server when you select a county...
Ihave this line of code:
if ($_POST["town"] != "" && $_POST['submit'] == "yes"){header("Location: searchresults.php");}
For some reason it will not redirect even if both contitions are met. for some reason if i just use this:
if ($_POST["town"] != ""){header("Location...
I have the following function which is not outputting anything when I'm calling it:
<script language=JAVASCRIPT type="TEXT/JAVASCRIPT">
<!-- Hide script from older browsers
function percentiles(sex,age,value) {
if (sex == 2) {
var percentiles_array = girls_bmi;
} else {
var...
ok, I'm not sure if I should be posting this here or in the asp forum but here it goes.
What I'm trying to do is pass the referrer of an html page to an asp page for processing. The way I'm doing this is:
function getref(){
if (document.referrer&&document.referrer!="")...
If I have a $_post variable that holds the value "red - 45"
and I would like to load that into two different variables:
$color and $price, how would I go about it?
Is there a php script that allows you to visually arrange items in a database by dragging and dropping pictures of the items so they appear in the order you would want them to?
I have 4 tables named:
prod, prod_b, prod_c, prod_d
the tables all have have an identifying prod_id
How can I write a query that pulls all fields from each table for the record where prod_id = 1
SELECT * ...
I need a good web analytics script that does not use a third party server. Something that I could install on my site using javascript and ASP or simply ASP, but I do have an access database to use. Hotscripts.com has tons of web analytics scripts under both ASP and PHP. The problem is that...
I am trying to set the format of this email as html instead of plain text, but I can't figure out how to do it. Maybe you guys can help:
require_once "../pearmail/Mail.php";
$from = "aaaa <info@aaaaa.com>";
$to = "aaaa@daaaa.com"; ;
$subject = "aaaaa.com, a message from ".$_POST['name']...
I have this line of code:
<div onclick="displayRow();" class="menu_selector"><img src="plus.gif" width="9" height="9" class="img_mar_link"> <strong>Presentations</strong></div>
I need to modify the displayRow() function so that when someone clicks on the div, the plus.gif gets replaced by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.