| |
| |
| |
|
Page: 1 2 3
Comments:
<0> but, i still cant get to change the images on rollover <1> <1> enigmaa: document.image['imgname'].src='example2.gif'; <1> Hm. That's a typo there too. <1> document.images['home-menu'].src='example2.gif'; <0> where exactly should i put that? I am not trying to annoy you, please have patience, i am new at this. <1> It's important that the paths be relative to where your html file is as well. <0> let me paste my modified code, without the file:/// stuff, just so that you can check for mistakes. What's pastebin ? <0> ah well, you can check the source from the website <0> http://www.colesticos.com/adastra/index.php <1> What website? <0> see the menu? that's what i am trying to make rollover <0> I already created the secondary images for the on mouse rollover <0> but i can't get the javascript to work. <1> Ah. <1> You have the </a> before the <img> <0> I know this is very simple, but its not working for me, and it is somewhat frustrating.
<0> let me see that <1> So it doesn't work because the element you have the onmoueover code on has no size at all. <0> wait wait <0> where's that? <0> where's the misplaced tag? <0> onmouseout="document.home-menu.src='home-menu.gif'"></a><img src="./image <0> that part? <1> Yes. <0> ok, so i only remove </a> ? <1> No, you don't remove it. <0> oh <1> You move it to after the image tag. <2> Hello. <2> I've got a question... is it possible for a link to still have the href="" tag with url, but when the user clicks it, it doesn't do anything? <1> Yes. <2> only the action onClick="" ? <0> Pilum updated, check the website again. It still doesn't work. <1> Just return false; at the end of the onclick, Znuffy. <0> Pilum now its messing with the tables, the whole image broke. Dang. <2> Doesn't Work (tm) <1> enigmaa: And now to update your code to match mine. <1> And to remove that blue thing, set border to 0 on the image. <0> removed <0> document.images['home-menu'].src='example2.gif'; ? <1> Yes. <2> Pilum, this should work, right? <a href="https://url_here" onClick="alert('test') return false"> <1> Znuffy: With a semicolon after the alert, yes. <0> Pilum updated. Still does not work <2> uh, finally <2> hmm, Pilum <2> I've got this function: function disabled() { alert('link is disabled'); } <2> I replace alert() with disabled and it doesn't work anymore <1> enigmaa: Do you enjoy trolling that much? <0> trolling? <1> What else could it be? <1> You're not doing what I say you should. <0> I dont enjoy being frustrated and being stuck in the same thing for long periods of time, if that's what you mean. <1> Then why don't you do what I say instead of ****ing about with totally different code? <0> Pilum What part did i miss? <0> i updated document.images['home-menu'].src='example2.gif' like you told me <1> onmouseover="document.['home-menu'].src=' <0> and took off the blue thing <1> That's what you have. <0> oh, **** <0> im sorry. <1> Znuffy: Naming conflict probably. <0> onmouseover="document.['home-menu'].src='./images/home2-menu.gif'" <0> onmouseout="document.home-menu.src='home-menu.gif' <1> Since disabled is an html attribute. <1> You get the same with submit() when you name your submit button "submit" :-) <0> im missing the onmouseover="document.['home-menu'].src='./images/home2-menu.gif'" <0> onmouseout="document.home-menu.src='home-menu.gif' <0> arrrggg <0> im missing the [] <0> correct? <2> Pilum, renamed the function to dis.abled <2> didn't help <3> doh! <1> ... <2> ?
<1> A period in the function name... <1> enigmaa: Last time. <1> onmouseout="document.images['home-menu'].src='home-menu.gif';" <2> javascript doesn't like periods in function names? I'm pretty sure I've seen tons of functions with periods in the name <1> Then you're doing OOP. <4> javascript is OO, isn't it ? <3> no <0> Pilum I appreciate your patience. <0> Ok, i think i've corrected all of the mistakes, im using IE and its saying "error on page" <2> hmmm, question... I added return false; to the function but it doesn't do what I expected... do I have to add return false everytime ? <0> so, again, still not working. <3> enigmaa, see the channel wiki for instructions on debugging IE <0> I can't believe this, which is supposed to be SO simple, turns out to be so freaking complicated to me <1> No, just once in the event handler. You can return false in the function and then return the function if you wish to do that though. <2> I've got "return false" in the function... in human terms: what do I do next? <0> [Torgo] wikiettiquete? <1> onevent="return functionname();" <2> I see. Thanks. <0> aaaaaaaahhh!!! <0> i cant get this crap to work. ! <3> then give up <0> no! <0> Is the code STILL wrong? <0> oh come on guys, you'll weren't born knowing javascrit/html/etc <2> I think Pilum was... <0> This is my first day working on this. <3> enigmaa, go get a book -- you're starting out at too low a level for this channel <5> you suppose learn to read before knowing html/js <1> You haven't named your image. <0> oh, im missing the name= tag? <2> hmmm, another question (sorry): I've got href="url", can I do so that when I click the link, a new window opens (with javascript, not target="") with the url specified in the href="" attribute ? <1> window.open(this.href) <2> thanks. <0> got it to work! <0> Thanks a lot Pilum, seriously. I really appreciate it. If you need any help in the future regarding network issues, such as bot attacks, etc. Let me know. <2> aren't you that oper ? <2> oh, you are <0> Znuffy what oper?. <2> nickname sounded familiar <0> Znuffy. Well, nice to meet you. <2> ... but I still don't remember where from exactly I know your nickname <0> i used to be a regular in #linuxhelp <0> Im all around, tho. <0> anyway, i need to go an pickup my wife, bbl. <2> oh yeah, #lh <6> hi, i have 2 radio buttons, with onclick functions; my question is how do I make them to autoactivate the function when the page is loaded, depending of what button is checked; thanks <1> That would activate the same function every time wouldn't it? :-) <6> depending which button was last checked <1> Have an init function which checks the cookie, or whatever you use to store which was last checked, and then runs the function. <4> Init.. have the PluginWraper do all the stuff <4> its a property <6> thanks <7> Hey all, if I've got a set of input boxes with the name and id as "degloc[]" , then how do I grab the values from them in javascript to do some form validation? <7> 'var deg = document.forms[0].elements['degloc[]'].value;' doesn't seem to work and I can't get the right syntax down <1> degloc[] is an invakud ID <1> *invalid <1> But document.forms[0].elements['degloc[]'].value should work for the name part, ***uming it's in the first/only form. <7> ok, so names can't be duplicated, but ID's have to be unique? <7> err names CAN be duplicated <1> Yes. <1> And IDs can't contain [] <7> so I can keep the name as "degloc[] <1> But most likely you have no need of the ID at all. <1> Yes. <7> I thought javascript mostly operated on the ID's? <1> Heh no <7> well color me ignorant... <1> It seems to me that getElementById is t3h l337 method to use nowadays, regardless of wether it's a good solution or not. <1> Lo dave-e <7> well that's what I'm using.. more because it works than any other reason... but putting []'s into the ID was what was screwing me up
Return to
#javascript or Go to some related
logs:
jadey+undernet+linuxhelp #c++ #linuxhelp #mirc #linuxhelp #linuxhelp linux x68_64 flash player milki vit
undernet sweetguy #javascript
|
|