Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   I Sell Pagerank   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-19-2006, 02:05 PM   #1 (permalink)
Junior Member
 
Join Date: 10-06-06
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

thenextbesthang is liked by many
Javascript and images

Heres the deal : I need to write a javascript code that essentially flips a given image over the x-axis. I keep getting an error "error in parsing value for property 'top'. I want to take a picture that is on the screen, make a new div like 100 pixels below it, and then output the upside down picture.

Here's the code:

Code:
<html> <head> <style type="text/css"> div {overflow:hidden; position:absolute;} span {position:absolute;} </style> <script type = "text/javascript"> </script> </head> <body> <span style="left:0px; top:150px; width:750px; height:71px"> <img src="project2.jpg"/> </span> <script type = "text/javascript"><!-- for(var k=71;k>0;k--) { document.write("<div style='left:0; top: (300 + "+k+"); width:750; height:1'>");//create the div block document.write("<span style='left:0; top: -("+k+" - 71);'>");//create the span block inside the div block document.write("<img title='newpic' src='project2.jpg'/>");//put the image in the span document.write("</span></div>");//close everything } //--> </script> </body> </html>
thenextbesthang is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 11-20-2006, 12:06 PM   #2 (permalink)
Contributing Member
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,067
iTrader: 0 / 0%
Latest Blog:
Moved In!

Izzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to beholdIzzmo is a splendid one to behold
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Lol.. I didn't even know you could do this javascript.

I just learned something new today !!
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-20-2006, 04:48 PM   #3 (permalink)
Inactive
 
StupidScript's Avatar
 
Join Date: 09-22-06
Location: Los Angeles
Posts: 678
iTrader: 0 / 0%
Latest Blog:
None

StupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really niceStupidScript is just really nice
How about performing the calculation before attempting to use it?
Code:
for(var k=71;k>0;k--) { t1=300+k; t2=k-71; document.write("<div style='left:0; top: "+t1+"px; width:750; height:1'>");//create the div block document.write("<span style='left:0; top: -"+t2+"px;'>");//create the span block inside the div block document.write("<img title='newpic' src='project2.jpg'/>");//put the image in the span document.write("</span></div>");//close everything }
StupidScript is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-20-2006, 06:28 PM   #4 (permalink)
Junior Member
 
Join Date: 10-06-06
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

thenextbesthang is liked by many
it creates a picture that is the same size as the original, but I don't think that it is flipping it. It essentially just creates 71 of the first line in the image; in this case, just a lot of blue, not blue with text.
thenextbesthang is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-20-2006, 06:32 PM   #5 (permalink)
Junior Member
 
Join Date: 10-06-06
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

thenextbesthang is liked by many
nevermind! Thank you very much for this useful insight!!!!
thenextbesthang is offline  
Add Post to del.icio.us
Reply With Quote
Old 11-20-2006, 06:32 PM   #6 (permalink)
Junior Member
 
Join Date: 10-06-06
Posts: 19
iTrader: 0 / 0%
Latest Blog:
None

thenextbesthang is liked by many
oh just so you know, i did what you suggested, but also took out the minus sign around t2. hehe.
thenextbesthang is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
What type of images and royalty free images do developers and webmasters need? EZRoyaltyFree Web Design Lobby 0 02-26-2008 09:11 AM
How often does google upload images to Google Images? tessatoons Google Forum 6 10-05-2006 05:46 AM
JavaScript, color images, thingy. kwvarga Coding Forum 3 11-27-2005 02:45 PM
Count-up from a particular year + Javascript within Javascript? Help! Azam.biz Coding Forum 3 06-06-2005 06:47 AM
Can I do this with JavaScript? blelisa Coding Forum 2 09-27-2004 02:01 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:58 AM.
© Copyright 2008 V7 Inc