Extract Variable from Database query

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

Just play around with that snippet. it'll come around :wink:
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post by facets »

Is something like this on the right track?

if (ProdServList[val] == 'Service') {
document.write('onload=\"javascript:hidediv()\"');
}
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

yeah! but a little change reqd. :)

Code: Select all

Service = document.getElementById('serviceDiv');
Product = document.getElementById('productDiv');
if (ProdServList[val] == 'Service')
{ 
 Service.style.display = "";
 Product.style.display = "none";
} 
else
{ 
 Service.style.display = "none";
 Product.style.display = "";
}
Post Reply