I know what javascript is...so I know that you don't have to download anything in order to make it work on a webpage (besides having the obvious script) so I'm really confused as to what ajax is and how to use it? Is there a whole 'library' you have to download and THEN reference it with a script on a page? I've come across something called jQuery....is this, for all intents and purposes, a 'competitor' to ajax? Used the same way? Different way?? I am attempting to make a form that dending on a radio button choice, greys out/removes a following paragraph...which the hell do I use? Which is better?
3/1/2008 5:28:09 PM
jquery is a javascript framework, like mootools and prototypeajax is a way of using javascript to send query strings to files and read in file contents dynamically, without having to submit the pagejquery might contain an ajax class, to make an ajax function simpler to code but you don't need anything special to execute an ajax functionfor what you are doing, you more than likely don't even need ajax
3/1/2008 5:57:08 PM
what would I need for the bare minimum to do this? I basically have a registration page where there is a question: Do you need a visa? If yes, then a bunch of questions about it either load (or just remain on the page) and if no, then those questions either don't load, (or fade/disappear from page)?
3/1/2008 6:01:21 PM
<script language='JavaScript' type='text/javascript'>function tog(state) { if(state) document.getElementById('other_crap_that_may_dissappear').style.display=""; else document.getElementById('other_crap_that_may_dissappear').style.display="none";}</script><input type="radio" name="loller" id="yes" onclick="tog(1)" /><input type="radio" name="loller" id="no" onclick="tog(0)" /><div id="other_crap_that_may_dissappear">blah</div>
3/1/2008 6:10:29 PM
Yeah, dont really need ajax for this, BUT, you CAN use AJAX for this ... just depends on how much work you want to do.
3/1/2008 6:23:24 PM
NEVER MIND>>>I GOT IT WORKINGOMG I LOVE YOU BIGMAN [Edited on March 1, 2008 at 6:31 PM. Reason : ]
3/1/2008 6:30:34 PM
hrmf.....is there any reason why the placement of the div is causing the script not to work? Its really odd but if I put the question and the div at the top of the page, it 'seems' to work....but otherwise it's not...and now it's all fucked up.....Here's what I've basically got:[Edited on March 1, 2008 at 8:33 PM. Reason : kjdnvk.ndvk .j˜ßc ]
3/1/2008 8:29:45 PM
this page is completely borked
3/1/2008 8:30:53 PM
since It's not working CHECK THE EDIT POST FOR THE CODE]
3/1/2008 8:34:26 PM
don't we have a code /code tag here?
<script language="JavaScript" type="text/javascript">function tog(state) { if(state) document.getElementById('other_crap_that_may_dissappear').style.display=""; else document.getElementById('other_crap_that_may_dissappear').style.display="none";}</script><tr> <td>Do you need a US visa?<input type="radio" name="loller" id="yes" onclick="tog(1)" /> <input type="radio" name="loller" id="no" onclick="tog(0)" /></td></tr> <div id="other_crap_that_may_dissappear"><tr><td>What do you need? <input type="radio" name="need" value="1">Original (only select if REQUIRED) <input type="radio" name="need" value="2">copy via e-mail <br><br><input type="radio" name="need" value="3">Faxed copy <br><br></td></tr><tr><td>What needs to be sent to you directly?? <input type="radio" name="sent" value="1">Original (only select if REQUIRED) <input type="radio" name="sent" value="2">copy via e-mail <br><br><input type="radio" name="sent" value="3">Faxed copy <br><br></td></tr></div>
3/1/2008 8:40:37 PM
And i'm not an HTML/javascript expert or anything, but maybe you need to have default to tog(0) so it's initially blank.
3/1/2008 8:44:00 PM
you're wrapping table rows in divs, that's probably causing something to go kablooey
3/1/2008 9:03:43 PM
Gdamn BigMan.......you ARE THE SHIT.Seriously. You r0x0r I swear it.......my top l33ts on here:BigMan157qntmfredevanNoen
3/1/2008 9:10:42 PM
i'll make the list after i get my huge bump on my face cut open and video it for you haha
3/1/2008 10:08:04 PM
3/2/2008 12:23:08 PM