Click here to Skip to main content
15,895,283 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: What's the meaning of it in CSS ? Pin
Shog98-Oct-08 18:01
sitebuilderShog98-Oct-08 18:01 
GeneralRe: What's the meaning of it in CSS ? Pin
Mohammad Dayyan8-Oct-08 18:15
Mohammad Dayyan8-Oct-08 18:15 
GeneralRe: What's the meaning of it in CSS ? Pin
Shog98-Oct-08 21:14
sitebuilderShog98-Oct-08 21:14 
GeneralRe: What's the meaning of it in CSS ? Pin
Mohammad Dayyan8-Oct-08 21:49
Mohammad Dayyan8-Oct-08 21:49 
QuestionBasic Javascript Questions Pin
brimbis8-Oct-08 6:23
brimbis8-Oct-08 6:23 
AnswerRe: Basic Javascript Questions Pin
Perspx8-Oct-08 7:21
Perspx8-Oct-08 7:21 
GeneralRe: Basic Javascript Questions Pin
brimbis8-Oct-08 7:53
brimbis8-Oct-08 7:53 
AnswerRe: Basic Javascript Questions Pin
Perspx8-Oct-08 8:17
Perspx8-Oct-08 8:17 
Okay:


  1. Any Javascript in the page must be put in <script> tags.
  2. Sorry I didn't make it clear - object and image were just names assigned to the image and the object to demonstrate how you would do it. They must actually be assigned a value (the handle to both objects - see the code below)
  3. As absolute is a string and not a variable, it must be put in speech marks (""s).
  4. It would also be beneficial to put the two bits of Javascript together (it helps to neaten everything up, too).
  5. Also, after looking at your code, it would be better to use the offsetLeft and offsetTop properties of the object, as this will account for any page margins etc.


This comes out as:

<object type="application/x-shockwave-flash" id="object" height="309" width="589" data="http://videos2.videobloom.com/container.swf" allowScriptAccess="never" allowNetworking="internal">
<param name="allowScriptAccess" value="never">
<param name="allowNetworking" value="internal">
<param name="movie" value="http://videos2.videobloom.com/container.swf">
<param name="flashvars" value="contentId=48ea33ceb84fb">
<param name="wmode" value="transparent" ></object>

<img alt="" id="image" src="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" uid="ece60e54-bc33-4328-92ec-6815c5488089" wstxclass="Image" mainsrc="http://app4.websitetonight.com/projects/5/2/0/6/520685/images/video_list_cover_hkpg.jpg" /></p>

<script language="Javascript">
var object = document.getElementById("object");

var top = object.offsetTop;
var left = object.offsetLeft;

var image = document.getElementById("image");
  
image.style.position = "absolute";
image.style.top = top;
image.style.left = left+(589-216);

</script>


Regards,
--Perspx


"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer

"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds

GeneralRe: Basic Javascript Questions Pin
brimbis8-Oct-08 8:39
brimbis8-Oct-08 8:39 
AnswerRe: Basic Javascript Questions Pin
Mohammad Dayyan8-Oct-08 15:48
Mohammad Dayyan8-Oct-08 15:48 
GeneralRe: Basic Javascript Questions Pin
brimbis29-Oct-08 7:42
brimbis29-Oct-08 7:42 
GeneralRe: Basic Javascript Questions Pin
Mohammad Dayyan29-Oct-08 7:58
Mohammad Dayyan29-Oct-08 7:58 
Questionis there provide any php suggestion in this site Pin
UD(IA)8-Oct-08 3:46
UD(IA)8-Oct-08 3:46 
AnswerRe: is there provide any php suggestion in this site Pin
Perspx8-Oct-08 5:45
Perspx8-Oct-08 5:45 
AnswerRe: is there provide any php suggestion in this site Pin
Mohammad Dayyan8-Oct-08 6:10
Mohammad Dayyan8-Oct-08 6:10 
QuestionAvoiding Spam Filters for Legitimate Mail Pin
Waleed Eissa8-Oct-08 2:46
Waleed Eissa8-Oct-08 2:46 
AnswerRe: Avoiding Spam Filters for Legitimate Mail Pin
Ashfield8-Oct-08 3:24
Ashfield8-Oct-08 3:24 
GeneralRe: Avoiding Spam Filters for Legitimate Mail Pin
Waleed Eissa8-Oct-08 14:23
Waleed Eissa8-Oct-08 14:23 
GeneralRe: Avoiding Spam Filters for Legitimate Mail Pin
Ashfield8-Oct-08 19:50
Ashfield8-Oct-08 19:50 
QuestionHow to access Other sql database form web forms Pin
IanJan7-Oct-08 23:43
IanJan7-Oct-08 23:43 
AnswerRe: How to access Other sql database form web forms Pin
Jaffer Mumtaz8-Oct-08 1:39
Jaffer Mumtaz8-Oct-08 1:39 
GeneralRe: How to access Other sql database form web forms Pin
IanJan8-Oct-08 6:26
IanJan8-Oct-08 6:26 
GeneralRe: How to access Other sql database form web forms Pin
Jaffer Mumtaz8-Oct-08 8:32
Jaffer Mumtaz8-Oct-08 8:32 
GeneralRe: How to access Other sql database form web forms Pin
IanJan8-Oct-08 9:32
IanJan8-Oct-08 9:32 
AnswerRe: How to access Other sql database form web forms Pin
Frank Kerrigan8-Oct-08 6:24
Frank Kerrigan8-Oct-08 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.