Jul 26, 2008

Changing Php Classes Using Onclick

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > HTML, XML etc..

free web hosting

Changing Php Classes Using Onclick

fffanatics
Hey everyone. I am currently trying to finish my navigation bar on the left side of my website and i am running in to some trouble with the css. I know how to change the items class when a user clicks it using onClick = "this.class = newClass"; but i need to know have to change a different class when a user clicks that link. AKA, how do i get the this part of a class that isnt that current one. For instance if i have a class called subMenu and i want to change it to showSubMenu when a user clicks a link that is of class menu how would i do this not using javascript but just pure css? Thanks for your help because i just cant really find anything good on google for this and it would be awesome to implent this feature on my navigation bar. Thanks again.

Reply

rldowling03
i'm confused. What are you trying to do

Reply

Tyssen
QUOTE(rldowling03 @ Apr 22 2006, 04:19 PM) *

i'm confused. What are you trying to do

Same here. Got no idea what you want.

Reply

fffanatics
Ok first of all i screwed up the title. It should be CSS and not PHP. But this is what i want to do without javascript. I want to use the onClick function of the a tag to change the property of a css tag that is not the current links class. Here is an example but it doesnt work:

Styles:
CODE
.menu { text-decoration : underline; }
.subMenu { display : none; }


CODE

<div class="menu" onClick="subMenu.display = block;">Menu</div>
<div class="subMenu">Submenu</div>


Thus, i need the onClick of menu to change the property of the subMenu css class. Anyone know how to do this? Sorry about the bad explaination on the previous post but it was late and i was frustrated with it and was looking for some help. Ill be sure to try to make my questions clearer from now on. Thanks again.

Reply

Tyssen
You mean like on this site: http://www.nwfs.com.au/

Reply

fffanatics
Pretty much except i was hoping to do it without and javascript involved so that it would be compatible with non-javascript enabled browsers. I tried that with javascript disabled and it just went to a different page and that would not work for me since i use includes and you just wont ever get the submenu. I will try to maybe fool with it and see if i can get it to work using part of their style.

Reply

Tyssen
Onclick is a javascript function, not PHP. You can't use PHP to do anything that isn't submitted to the server first.

Reply

fffanatics
Like i said i mistitled this topic. However, i would like to thank tyssen for the website link. After messing with their code for like 10 minutes and disabling javascript in my browser, i still was able to get the code to work the way i wanted it to. I realized that if i put it in a link and not just the surrounding div, that if javascript was disabled, it would change the page to the href thus allowing me to use the post a variable to say show this class. Thanks a ton cuase with out that site i probably would have gone crazy trying to figure this out. Thanks again

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : changing, php, classes, onclick

  1. Question About Changing Domain Names.
    (8)
  2. The Worst Experience In My Life Yesterday
    life changing (1)
    i was with one of my friends. we went to a roller rink. it was around 9:00 pm she was giving 6
    people rides home so theres 8 people in the van. i new 1 out of the 6 people. she new them all.
    1guy5girls me and my friend Kaitlyn. one of the girls in the middle row sed "lets ride on the bumper
    agen" i didn't no what they rely where going to go. we pulled to a back road and 2 of the girls
    got out and got on the back bumper and held on to the top railing. 3 people including me where
    telling them this is not a good idea they sed " don't worry we did this before" we dr....
  3. Changing Root Script
    (0)
    I decided to go with paid hosting with computinghost.com. When I chose my initial installation, in
    my ignorance, I didn't know you couldn't install both the Joomla installation and the
    Soholaunch website builder, so I checked both. They installed the Joomla and not the Soho. Since I
    have never looked at Joomla and know nothing about using it, I would like the other installation. I
    first tried live chat, but they said contact sales. So I sent an email and got a ticket number.
    BPM-881376 When I try to check on the status I get this message: Fatal error: ERROR: You ....
  4. Changing From Free Hosted To Paid Hosted [resolved]
    How dows it affect my account (3)
    I recently purchased a paid hosting account and since I was a previous trap 17 free hosted account
    user I wanted to knwo what will the changes be and and how will i see the upgrade on my account.
    Will the server completely change from the gamma server that im currently on to the delta server or
    will it remain the same. Also I did purchase 3S. Thanks......
  5. How Do I Change The Default Windows Font Size?
    Without changing DPI, of course. (3)
    I know there's an option in Ubuntu to change all the font sizes of the general system, the
    windows, and etc. Now I'm trying to do this in Windows. I've changed everything about
    the windows except for the general system size. How do I do this?....
  6. Changing Trap17 Domain?
    (2)
    Hello. I think I've heard about this somewhere or another on this site, but am not sure.
    Currently, my domain is http://sherwoodinfo.trap17.com ...is there any way I can get it changed to
    http://sherwood.trap17.com , I checked and it seems that is available. Thank you!!....
  7. What Is Fun Anymore?
    Changing the definition of 'fun' (5)
    Child comes home, flips on the flips on the tv. Toasts the waffle, spreads the peanut butter with a
    grim face. Ready for some 'fun.' But this isn't the fun that you and I know and have
    come to love. I remember when fun used to be playing in the park, building a castle out of my
    sister's leftover girl scout cookie boxes. But not anymore, that is boring, a waste of time. I
    remember when being creative was fun thing to do. Why is it, that when a child of today is
    asked whether they would like to game, they remark, 'Sure, what site?'....
  8. Changing Dns Records
    How to change my DNS records? (5)
    I need to change my DNS records, that is, to add several CNAME records... Now, I registered my top
    level domain (.net) through my ISP, and they in turn registered my domain at some other registrar...
    Now, my ISP doesn't give me CPanel to update my DNS info, if I don't buy their hosting plan
    (which is pathetic compared to Trap17 free account)... I had them change my nameservers to Trap17
    servers, and now, they tell me I need to edit CNAME records on Trap17 nameservers... I must admit
    I'm not really familiar with how all that DNS administration works, so I want....
  9. Changing Domain Names Question
    (1)
    i know where to go to change my domain name for 15 credits, but before i do, i need a question
    answered my subdomain on trap is wildcat-exotics. i just recieved my free domain
    name(wildcatexotics.com) and used it as an addon domain. i don't wish to do this. i also have
    another addon domain to my trap account called petsxpress.info for a total of two addon domains to
    my wildcat-exotics account. my question is, when i change domains from wildcat-exotics.trap17.com
    to wildcatexotics.com, do i need to change anything or delete anything in my cpanel? how will my
    addon d....
  10. Changing Domain Name Without Losing High Traffic To My Site
    Need Answer From Admin (13)
    I have a doubt to do what i want, so i am going to the point, m ysituation is that i have a trap17
    free subdomain where i have my free flash clocks website, and its link is
    http://free-flash-clocks.trap17.com . Recently i bought a domain name, its link is
    www.freeflashclocks.com , and what i want to and i am not certain if i can is that i want to,
    redirect all the visits of my free subdmain to my new domain, just for 1 or 2 months, if that is
    possible, i apreciate it if it is not but you allow it because i have thousands of visitors a day
    (~7000/day) and it is growing....
  11. Question About Changing Hosting Type.
    (5)
    I was wondering if it is possible to do the following thing with my trap17 account. Since school
    has come by again I keep finding it harder and harder to keep my credits up because a lot of nights
    I don't even get to look at the computer. I also have noticed that I am not really using trap17
    for hosting a lot of websites but more files and such not. I was wondering if I am able to
    downgrade my account for the time being to the account with the "One text ad" version. But a
    question on that, that I have is: if I host an image with my account that way and put the ima....
  12. More Streaming At A Younger Age And More Randomly Split Classes.
    (7)
    This topic was an idea formed from the PDA (Public display of affection) topic in which Cerebral
    Stasis posted his view on streaming, and I'd have to agree. I for one completely agree with
    streaming from an early age (I.E, from the start of high school). Teachers and the heads of school
    have this idealistic and verging on communist view that putting less intelligent (Thick as bloody
    posts) students in the same classes as the smarter kids for the majority of classes up until year 10
    (I'm in year 9). Year 7 & 8 have been good for as I was placed into a bright class....
  13. Changing Mac Of Ethernet Card
    (2)
    Now you can change Mac address of your ethernet card in windows xp step 1: Double Click on Network
    icons step 2: Select properties step 3: click on configure step 4: On pop up window goto advanced
    tab step 5: now on settings goto locally administered address step 6: Changes the MAC address used
    by this network adapter. The address is a 12-digit hexadecimal number in this range: 0000 0000 0001
    - FEFF FFFF FFFF CAUTION: Make sure no other systems on the network use this address. ....
  14. Classes
    (3)
    I was watching the news last night and it surprised me how apparent the class divide still is
    within contemporary British society. A working class woman from Merseyside, Jacqueline Simpson, is
    currently in court for manslaughter after getting drunk at New Year and allowing her pet pitbull
    into the house while she was babysitting her granddaughter, Ellie. She says she turned her back for
    a moment and the dog savaged the child, killing her almost instantly. On the other hand the middle
    class parents of Madaleine McCann are considered to be national heroes, any criticism....
  15. Making Changes To Subdomain Name
    Changing the bit before"trap17" (2)
    I have read somewhere in the forums it is possible to change your subdomain (i.e. the part of your
    name that comes before 'trap17.com'). I have not found anywhere how to do so, however. So,
    sorry if it was already posted somewhere and I missed it, but could someone let me know how this is
    done? At the moment I have vlaanderen-flanders.trap17.com, how could I change the
    'vlaanderen-flanders' bit? All help will be much appreciated. ....
  16. I Finally Paid For My Acting Classes!
    (4)
    In February, I found a cheap local acting shcool online. About a month or so ago, I started to talk
    on their message board. The teacher saw that I wanted to act so bad that he offered me a free class.
    I took it last Sunday. Afterwards, he offered me a discount because my finances aren't great at
    the moment. So, I paid it the next day and I start tomorrow! /happy.gif"
    style="vertical-align:middle" emoid="^_^" border="0" alt="happy.gif" /> The original price is
    $150 for five weeks. Instead, I paid $40 for weeks and one free class with it!
    $40 f....
  17. Changing Domains
    (2)
    Well, my site is www.d24cheap.trap17.com and I was going to buy a domain so that it doesn't have
    trap17 in it. I know that we can change domain name for 15 hosting credits but if I do that what
    happens to new site? I want all the stuff on my current site to be moved onto new site.....
  18. I.p Download Manager
    changing upload limit (0)
    I recently purchased I.P Download Manager(The download manger that you can purchase from invision
    power services) for my forum. When you go to make categories in the AdminCP, there is a field where
    you can edit the upload limit. This is what it says: QUOTE Maximum screenshot file sizes
    allowed (in kB) Your host has limited the maximum file upload size to 2M. You cannot set this value
    any higher than the maximum your host has set. Is there anyway I can make the upload limit
    larger than 2mb? I have another downloads manger which is unrelated to the forum, on this....
  19. Question About Accesing Site After Changing Domain [resolved]
    Anyone have answers (2)
    Just wanted to make sure that I didnt screw up things. Either way i just currently had the domain
    name changed here on Trap17. So I have made that change as well as I also pointed the servers for
    my domain to trap 17. So now my question is to i need to wait until the servers read my domain..
    beore i can access anything or should I be able to already do taht. Reaso is Now once i go to my
    domain I see the default page from the domian company i bought from. But I can access the CPanel
    for my hosting here. and it shows it made the change on the domain, but I cannot ....
  20. Changing Careers
    (0)
    Hi everyone! I was wondering if any of you have some constructive advice for me. I'll tell
    you about my situation. I'm seriously looking into getting back to Canada to re-integrate
    myself back into life there and re-enter the workforce. Due to recent circumstances, I have come to
    the realization that what I'm doing now does not suit my personality (I'm more of the quiet,
    creative type who is much better at writing and designing), and I want to go back to a position that
    involves writing (or even "ghost-writing")...or at best, something that involves ....
  21. Changing You Sub-domain
    (1)
    Is it posiible for me to change my sub-domain? It is currently www.tru-comm.qupis.com? I need it
    changed please /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
    /> Thank you Qupis Team!....
  22. Changing The Windows Xp Splash Screen
    another quick tutorial (10)
    First make create 16 bit 640*480 image and save it as boot.bmp in 'c:\windows'
    directory Click Start|Run and type c:\boot.ini. The file opens in Notepad. Look for an entry
    similar to this. CODE
    "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
    Windows XP Professional" /noexecute=optin /fastdetect" Add /noguiboot /bootlogo at the
    end of the line so that it looks like this. CODE
    "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft
    ....
  23. Changing Billing Info Online
    There should be some way to change billing details on line (2)
    It would be very nice to be able to change billing details online, especially to change the credit
    card used to pay for the site.....
  24. Changing Sotw To Sotm
    (16)
    I've been allowing SOTW entries to run for 2 weeks to get more entrants, as well as voting. So
    I'm figuring, 1 SOTW is lasting nearly a month. So why don't we have a SOTM? (Sig of the
    Month). Nothing would change, the rules are the same. It'd just be an official change to allow
    more time. I'm open for suggestions, it won't change until we get everyone's input - I
    don't want some unautorized change. Graphic Crew members I really want your input on this. Vote
    yes or no for the change, and give a reason. Everyones input is welcome - espessi....
  25. Changing Legal Age For Driving
    (43)
    Now this is a good debate I think as it's something I'm not happy with as I have haven't
    passed yet. I first started having driving lesson at 17 and I didn't fully understand that I
    would have to take quite a few as I have learning disabilities and I quit them. As for my brother
    he has been taking them for a couple of months now bu the thing that has pissed him off quite a bit
    is that they are supposedly chnaging the age of when a newbie can learn how to drive and that will
    include even when they have passed. They are supposed to be poutting the age of ....
  26. C++ Class
    teach me classes (6)
    ok i know the basics of c++ exept for classes i just dont quite get them can someone teach me of
    point me to a good (video is nice) tutorial....
  27. Changing Background Color In Php
    usefull for templating. (5)
    Tutorial on how to change background color with PHP I will be descibing to similiar ways that
    you can change the background color of your website with php and leave it at that till the user
    changes it again. We are going to do this with CSS. You can either have your cSS info on your page
    or in a spereate document. The first thing youll have to do is decide if your going for the linked
    stylesheet or directly on your page. IF you link it you'll need to have this code in you
    tags. CODE <style type="text/css"> <?php include ("st....
  28. Changing A Gmail Password
    how do u do it? (7)
    hi i have a gmail account well a couple of them and i know that someone has been getting on my
    account and screwing with it however i dont know how im supposed to get on and change my password.
    i've tried even getting them to send me information and what not when i forget my password but
    all the same i can never get to a point where i can change it and it kinda is making me upset. my ex
    gets on my account and yells at my friends telling them that i've changed and that i dont want
    anything to do with them and thats wrong i love my friends. anywayz if you know how ....
  29. Verizon Phone Book Transfer
    changing phones... (3)
    ok well u know how Cingular and AT&T have sim cards so when u switch phones u can just put the sim
    card in there so u dont have to re do ur phone book and stuff...and i was just wondering if there
    was on for Verison...because im changing fones soon and its annoying adding my fone book again...
    o and also is the new razor fone only for cingular? because i always thought it was but then a
    friend of mine told me it is for veriZon to...but i think he heard wrong...anybody knows? Topic
    title should be clear and related to posting message. Edited topic title and spelling.....
  30. Changing A Dynamic Ip
    How to change your dynamic IP. (18)
    In this tutorial I will tell you how to change a dynamic IP if you have Windows XP. First of all go
    to - Start >> Run - and type 'cmd'. A window with a black background and grey text. In
    this window type 'ipconfig' and text should come up saying: IP Address ............. *IP
    HERE* Subnet Mask ................ *SUBNET MASK HERE* Default Gateway .......... *DEFAULT GATEWAY*
    Write this down on a bit of paper on in notepad. You will need them later. Now type
    'ipconfig/release' - this will terminate your internet connection - but don't g....

    1. Looking for changing, php, classes, onclick

Searching Video's for changing, php, classes, onclick
advertisement



Changing Php Classes Using Onclick



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE