Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,015 members, 7,817,992 topics. Date: Sunday, 05 May 2024 at 02:28 AM

My Javascript Codes Are Not Working - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / My Javascript Codes Are Not Working (1365 Views)

Complete Tutorials On Designing A Wapka.m0bi Site.(codes/scripts Etc) / Pin Codes Generation For My Joomla Website / Phpmailer Not Working (2) (3) (4)

(1) (Reply) (Go Down)

My Javascript Codes Are Not Working by lanbaba: 5:15pm On Jan 13, 2010
when i paste javascript codes, it does not work.i mean codes that
are copied from a book. or are they suppose to work only when
you are connected to the internet? of course i have javascript enabled in my browser.please what are the possible causes or what am i not doing well.
Re: My Javascript Codes Are Not Working by DualCore1: 5:22pm On Jan 13, 2010
do well to paste your codes here please smiley
Re: My Javascript Codes Are Not Working by lanbaba: 5:47pm On Jan 13, 2010
three jpg format pictures named: first, second and third are required for this.
this is the visual basic version of the code

<html>
<head>
<SCRIPT LANGUAGE=VBScript>
function fadethem()
myimage.filters.item(0).Apply()
myimage.src=”second.jpg”
myimage.filters.item(0).Play()
end function
</SCRIPT>
<style>
H1 {font-size: 42px;padding-left: 3%;}
BODY {background-image: url(texture.jpg);}
</style>
</HEAD>
<BODY>
<br>
<H1> Join us! We Have all Styles of Houses</h1>
<IMG ID=myimage width=60% height=70%
src=”first.jpg”
style=”filter:progid:DXImageTransform.Microsoft.
fade(Duration=2);
border= 14px solid peru inset; position=relative; left=20%;”>
<br><br>
<INPUT type=button style=”position=relative;left=83%;fontweight:
lighter;
font-size: 20px; width: 120px; font-family: ‘times new
roman’; height: 44px”
value=”See More” onClick=”fadethem()”>
<IMG src=”first.jpg” style=”width:1;
height:1;visibility:hidden”>
<IMG src=”second.jpg” style=”width:1; height:1;
visibility:hidden”>
</BODY>
</html>



for the javascript version:
<SCRIPT LANGUAGE=JavaScript>
function fadethem()
{
myimage.filters.item(0).Apply();
myimage.src=”second.jpg”;
myimage.filters.item(0).Play();
}
</SCRIPT>
Re: My Javascript Codes Are Not Working by lanbaba: 5:59pm On Jan 13, 2010
The script is suppose tow ork like this:you click the button
once to exchange the images — no toggling.

only the image named texture is been displayed on my system both with IE and FF
Re: My Javascript Codes Are Not Working by DualCore1: 6:01pm On Jan 13, 2010
I think this is the first time i'm seeing a VBScript script  tongue
scratch it off, lets face javascript.


look at this

<H1> Join us! We Have all Styles of Houses</h1>
<IMG ID=myimage width=60% height=70%
src=”first.jpg”


shouldn't myimage be enclosed in quotation marks? like <img id="myimage"
Re: My Javascript Codes Are Not Working by DualCore1: 6:03pm On Jan 13, 2010
Then again. I dont think this will work on anything other than Internet Explorer

filter:progid:DXImageTransform.Microsoft.
fade(Duration=2)
Re: My Javascript Codes Are Not Working by DualCore1: 6:07pm On Jan 13, 2010
see this.

<INPUT type=button style=”position=relative;left=83%;[/b]fontweight:

should be [b]position:relative

and left:83%


sorry, dunno why w3c didnt stick to the name = value tradition that was there before even in was born. in css its name:value
Re: My Javascript Codes Are Not Working by lanbaba: 6:15pm On Jan 13, 2010
the truth is i havent learnt javascript, just like i said, i copied the codes from a book. i will correct what you said. wld love 2 talk to you one- on-one. cant sign in messenger. . , i  search ken sawyer and saw more than a billion people, want to discuss somethings. which ken is your our search for me and add me
Re: My Javascript Codes Are Not Working by DualCore1: 6:25pm On Jan 13, 2010
you searched for "sawyerr ken" in EFCC's watch list and got several entries? wow that's a relief. i can't be pinned now grin

i'm one call away, you know the digits tongue
Re: My Javascript Codes Are Not Working by lanbaba: 6:30pm On Jan 13, 2010
still not working. although am not trying to use it now.  just wanna see the wonders of javascript. will download the e-books tonight. thats from css e-book. dont even understand a line of code there.
yeah was trying to chat with you through trudigits. guess i will call you then.
Re: My Javascript Codes Are Not Working by DualCore1: 6:38pm On Jan 13, 2010
trudigits customer support chat was offline for about 10 minutes. its back online now.


Yea i think you should just keep going nice and easy with html and css. When you're grounded in those, then you can slap in javascript.
Re: My Javascript Codes Are Not Working by yawatide(f): 6:47pm On Jan 13, 2010
It could be that it's because I haven't eaten yet but I believe I see 2 functions that are being called but which don't exist: Apply() and Play()
Re: My Javascript Codes Are Not Working by DualCore1: 6:54pm On Jan 13, 2010
yawa-ti-de:

It could be that it's because I haven't eaten yet but I believe I see 2 functions that are being called but which don't exist: Apply() and Play()

You and I having dinner. . .
then I slip my hand into my jacket and pull out a little box. . .
I open it, you see it. . . no reaction.
I pull out my check book from the other pocket,
Crest "five million naira only" and put the ink on the dotted lines,
Now you react! . . .with a nodding yes yes yes
Ring in finger now.

well. . .lets eat



yea i think that's the solution to this thing, those 2 missing function declarations. na wa o, you get sense o. Upon my 2 cores, i no think reach dia.
Re: My Javascript Codes Are Not Working by lanbaba: 6:58pm On Jan 13, 2010
but how come those stuffs that dont exist are in the book
Re: My Javascript Codes Are Not Working by DualCore1: 7:09pm On Jan 13, 2010
Is this a book I have? What's the title of the book and page number.
Re: My Javascript Codes Are Not Working by yawatide(f): 8:23pm On Jan 13, 2010
Because the authors, contrary to popular belief, aren't gods or demi-gods but human.

Other possible reasons:
1) Could be the functions are referenced but somewhere shortly thereafter, you are told that you aren't to worry that the code will be provided later on.

2) many books come with a website. Maybe the code on that site has been updated, albeit after the book went to print.

Either way, sometimes I take such errors as a chance to play around with the code to see what it can do (for example, I am learning Code Igniter right now and I purposely deviated from the book by plugging in data from a database that I already have running (as opposed to running the scripts in the book). I ran into issues along the way but in the end, I got it to work, it has been all good ever since.

Here is what I do before downloading/buying any book:

I visit amazon.com to check out what it's about. I check the table of contents then I check just 1 highest-ranking comment and ALL low rankings. Why ALL of the latter? because, IMHO, those comments could be the reason why the book isn't for me. Typos and bad code are nothing new as far as coding books are concerned and many comments reflect that. I mean, chances are I am new to the language which means I have a steep learning curve coming in. Why muck the waters up even more by spending time wondering why code isn't working and it isn't my fault?

Once I am convinced that it is a book I will like, I then proceed to download/buy. Ever since I came up with this process, I have NEVER been disappointed. NEVER!
Re: My Javascript Codes Are Not Working by lanbaba: 9:20pm On Jan 13, 2010
@ dual Dat css dummies,page 243 of d book.pls dnt condemn dat book 4 it,its a good book. @Yawa good method
Re: My Javascript Codes Are Not Working by DualCore1: 9:53pm On Jan 13, 2010
Seen. No idea what they up to there. beyond my comprehension now.
The book is a good book though, its one of the very few ebooks i've read and completed reading. lol. Most times i never finish reading a book.
Re: My Javascript Codes Are Not Working by Nobody: 11:58pm On Jan 13, 2010
Encountered the same shit while learning, It is simply because u havven't cared to know how to write them on your own rather than copy and paste, the main issue is due to the fact that u use a ” ” rather than a " " and almost all pdf mistake the later for the former and that causes error!!!
Re: My Javascript Codes Are Not Working by lanbaba: 12:45am On Jan 14, 2010
never noticed that two versions of that sign exist. i cant even find the first one on my keyboard. so what you are saying in essence is, if a code is copied from a pdf document,one should manually change those signs to quotation marks""""""". with time i will learn it. just looking for the appropriate materials
Re: My Javascript Codes Are Not Working by Nobody: 12:50am On Jan 14, 2010
xactly!!!! You mean a good book on javascript!!! I could help out even on any web design and even programming book ,
Re: My Javascript Codes Are Not Working by lanbaba: 1:17am On Jan 14, 2010
yeah help me get it.
Re: My Javascript Codes Are Not Working by Nobody: 1:23am On Jan 14, 2010
just sign up on my site www.marknollis.com i will upload a great javascript book there by 5am today so by tommorow u can download it, but other books are there on even ajax technique,

Still coding on the site, so a lot of functionalit skills are not yet in place, but the validation of the signup is on both ends,

Thanks
Re: My Javascript Codes Are Not Working by MyHonour(m): 7:15am On Jan 15, 2010
i can use vbscript as well as javascript. But note that vbscript will only work with internet explorer browser only.
Send me an email and i will mail you a good book on javascript - email - support@.com and state
your request. I dont advise that you learn vbscript since it is not crossplatform. But if you are interested in learning
vbscript, let me know.
Re: My Javascript Codes Are Not Working by Nobody: 9:24am On Jan 15, 2010
lanbaba send me ur mail i have a javascript reference Guide that will jump start u, but i am no guru in Javascript, this will jumpstart u then u can move to jquery. just add me on ur messenger, but i must warn u,are u prepared to find out deep the rabbit hole is (*always wanted to use that line grin)
Re: My Javascript Codes Are Not Working by yawatide(f): 10:52am On Jan 15, 2010
donpozu:
Your site froze my browser for a few minutes. Na by force that I should bookmark? Just provide a link somewhere and let me make the decision for myself. I believe it is called "user-initiated interaction"

angry angry angry angry grin angry angry angry angry
Re: My Javascript Codes Are Not Working by lanbaba: 1:56pm On Jan 15, 2010
lanreogunya@yahoo.com
lanreogunya@gmail.com

(1) (Reply)

I Need A Webhosting With Mssql Database And Glassfish Server / Harvard And MIT Are Offering Free Online Courses / Wapka Seo:how To Index Your Site Content At Google In Minutes @ Naijagaze.com

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 35
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.